mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged CMIS063 to HEAD
15526: MOB-1100: Update Web Services to 0.62 final. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17233 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -281,7 +281,7 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
NodeRef targetNodeRef = cmisObjectsUtils.getIdentifierInstance(targetObjectId, AlfrescoObjectType.ANY_OBJECT);
|
||||
|
||||
Map<String, Object> propertiesMap = propertiesUtil.getPropertiesMap(properties);
|
||||
String typeId = (String) propertiesMap.get(CMISDictionaryModel.DOCUMENT_TYPE_ID);
|
||||
String typeId = (String) propertiesMap.get(CMISDictionaryModel.PROP_OBJECT_TYPE_ID);
|
||||
|
||||
CMISTypeDefinition relationshipType = cmisDictionaryService.findType(typeId);
|
||||
if (relationshipType == null || relationshipType.getTypeId() == null || relationshipType.getTypeId().getScope() != CMISScope.RELATIONSHIP)
|
||||
|
@@ -149,6 +149,7 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
repositoryInfoType.setProductName("Alfresco Repository (" + serverDescriptor.getEdition() + ")");
|
||||
repositoryInfoType.setProductVersion(serverDescriptor.getVersion());
|
||||
repositoryInfoType.setRootFolderId(propertiesUtil.getProperty(cmisService.getDefaultRootNodeRef(), CMISDictionaryModel.PROP_OBJECT_ID, (String) null));
|
||||
repositoryInfoType.setThinClientURI(repositoryId);
|
||||
CmisRepositoryCapabilitiesType capabilities = new CmisRepositoryCapabilitiesType();
|
||||
capabilities.setCapabilityMultifiling(true);
|
||||
capabilities.setCapabilityUnfiling(false);
|
||||
@@ -180,7 +181,15 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
public CmisTypeDefinitionType getTypeDefinition(String repositoryId, String typeId) throws CmisException
|
||||
{
|
||||
checkRepositoryId(repositoryId);
|
||||
CMISTypeDefinition typeDef = cmisDictionaryService.findType(typeId);
|
||||
CMISTypeDefinition typeDef;
|
||||
try
|
||||
{
|
||||
typeDef = cmisDictionaryService.findType(typeId);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException(e.toString(), EnumServiceException.INVALID_ARGUMENT);
|
||||
}
|
||||
return getCmisTypeDefinition(typeDef, true);
|
||||
}
|
||||
|
||||
@@ -202,7 +211,15 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
}
|
||||
else
|
||||
{
|
||||
CMISTypeDefinition typeDef = cmisDictionaryService.findType(typeId);
|
||||
CMISTypeDefinition typeDef = null;
|
||||
try
|
||||
{
|
||||
typeDef = cmisDictionaryService.findType(typeId);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException(e.toString(), EnumServiceException.INVALID_ARGUMENT);
|
||||
}
|
||||
|
||||
if (null == typeDef)
|
||||
{
|
||||
@@ -573,22 +590,38 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
case DOCUMENT:
|
||||
CmisTypeDocumentDefinitionType documentDefinitionType = new CmisTypeDocumentDefinitionType();
|
||||
setCmisTypeDefinitionProperties(documentDefinitionType, typeDef, includeProperties);
|
||||
documentDefinitionType.setVersionable(typeDef.isVersionable());
|
||||
if ((null != typeDef.getParentType()) && (null != typeDef.getParentType().getTypeId()))
|
||||
{
|
||||
documentDefinitionType.setParentId(typeDef.getParentType().getTypeId().getId());
|
||||
}
|
||||
documentDefinitionType.setVersionable(true); // FIXME: this attribute MUST be setted with typeDef.isVersionable()
|
||||
documentDefinitionType.setContentStreamAllowed(contentStreamAllowedEnumMapping.get(typeDef.getContentStreamAllowed()));
|
||||
result = documentDefinitionType;
|
||||
break;
|
||||
case FOLDER:
|
||||
CmisTypeFolderDefinitionType folderDefinitionType = new CmisTypeFolderDefinitionType();
|
||||
if ((null != typeDef.getParentType()) && (null != typeDef.getParentType().getTypeId()))
|
||||
{
|
||||
folderDefinitionType.setParentId(typeDef.getParentType().getTypeId().getId());
|
||||
}
|
||||
setCmisTypeDefinitionProperties(folderDefinitionType, typeDef, includeProperties);
|
||||
result = folderDefinitionType;
|
||||
break;
|
||||
case POLICY:
|
||||
CmisTypePolicyDefinitionType policyDefinitionType = new CmisTypePolicyDefinitionType();
|
||||
if ((null != typeDef.getParentType()) && (null != typeDef.getParentType().getTypeId()))
|
||||
{
|
||||
policyDefinitionType.setParentId(typeDef.getParentType().getTypeId().getId());
|
||||
}
|
||||
setCmisTypeDefinitionProperties(policyDefinitionType, typeDef, includeProperties);
|
||||
result = policyDefinitionType;
|
||||
break;
|
||||
case RELATIONSHIP:
|
||||
CmisTypeRelationshipDefinitionType relationshipDefinitionType = new CmisTypeRelationshipDefinitionType();
|
||||
if ((null != typeDef.getParentType()) && (null != typeDef.getParentType().getTypeId()))
|
||||
{
|
||||
relationshipDefinitionType.setParentId(typeDef.getParentType().getTypeId().getId());
|
||||
}
|
||||
setCmisTypeDefinitionProperties(relationshipDefinitionType, typeDef, includeProperties);
|
||||
result = relationshipDefinitionType;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user