本文整理汇总了Java中org.alfresco.opencmis.dictionary.TypeDefinitionWrapper.getTypeDefinition方法的典型用法代码示例。如果您正苦于以下问题:Java TypeDefinitionWrapper.getTypeDefinition方法的具体用法?Java TypeDefinitionWrapper.getTypeDefinition怎么用?Java TypeDefinitionWrapper.getTypeDefinition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.alfresco.opencmis.dictionary.TypeDefinitionWrapper
的用法示例。
在下文中一共展示了TypeDefinitionWrapper.getTypeDefinition方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTypeDefinition
import org.alfresco.opencmis.dictionary.TypeDefinitionWrapper; //导入方法依赖的package包/类
@Override
public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension)
{
checkRepositoryId(repositoryId);
// find the type
TypeDefinitionWrapper tdw = connector.getOpenCMISDictionaryService().findType(typeId);
if (tdw == null)
{
throw new CmisObjectNotFoundException("Type '" + typeId + "' is unknown!");
}
// return type definition
return tdw.getTypeDefinition(true);
}
示例2: getDocumentDefaultVersioningState
import org.alfresco.opencmis.dictionary.TypeDefinitionWrapper; //导入方法依赖的package包/类
/**
* Gets default value of <code>VersioningState</code> based on whether document is versionable or not.
*
* @param versioningState
* @param type
* @return <code>VersioningState.MAJOR</code> if versioningState is {@code null} and object is versionable
* <code>VersioningState.NONE</code> if versioningState is {@code null} and object is not versionable
* versioningState if it's value is not {@code null}
*/
private VersioningState getDocumentDefaultVersioningState(VersioningState versioningState, TypeDefinitionWrapper type)
{
if (versioningState == null)
{
DocumentTypeDefinition docType = (DocumentTypeDefinition) type.getTypeDefinition(false);
versioningState = docType.isVersionable() ? VersioningState.MAJOR : VersioningState.NONE;
}
return versioningState;
}