use of org.alfresco.opencmis.dictionary.ItemTypeDefinitionWrapper in project alfresco-repository by Alfresco.
the class CMISConnector method createObjectId.
public String createObjectId(NodeRef nodeRef, boolean dropStoreRef) {
QName typeQName = nodeService.getType(nodeRef);
TypeDefinitionWrapper type = getOpenCMISDictionaryService().findNodeType(typeQName);
if (type instanceof ItemTypeDefinitionWrapper) {
return constructObjectId(nodeRef, null);
}
if (type instanceof FolderTypeDefintionWrapper) {
return constructObjectId(nodeRef, null, dropStoreRef);
}
Serializable versionLabel = getNodeService().getProperty(nodeRef, ContentModel.PROP_VERSION_LABEL);
if (versionLabel == null) {
versionLabel = CMISConnector.UNVERSIONED_VERSION_LABEL;
}
return constructObjectId(nodeRef, (String) versionLabel, dropStoreRef);
}
Aggregations