mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +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);
|
NodeRef targetNodeRef = cmisObjectsUtils.getIdentifierInstance(targetObjectId, AlfrescoObjectType.ANY_OBJECT);
|
||||||
|
|
||||||
Map<String, Object> propertiesMap = propertiesUtil.getPropertiesMap(properties);
|
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);
|
CMISTypeDefinition relationshipType = cmisDictionaryService.findType(typeId);
|
||||||
if (relationshipType == null || relationshipType.getTypeId() == null || relationshipType.getTypeId().getScope() != CMISScope.RELATIONSHIP)
|
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.setProductName("Alfresco Repository (" + serverDescriptor.getEdition() + ")");
|
||||||
repositoryInfoType.setProductVersion(serverDescriptor.getVersion());
|
repositoryInfoType.setProductVersion(serverDescriptor.getVersion());
|
||||||
repositoryInfoType.setRootFolderId(propertiesUtil.getProperty(cmisService.getDefaultRootNodeRef(), CMISDictionaryModel.PROP_OBJECT_ID, (String) null));
|
repositoryInfoType.setRootFolderId(propertiesUtil.getProperty(cmisService.getDefaultRootNodeRef(), CMISDictionaryModel.PROP_OBJECT_ID, (String) null));
|
||||||
|
repositoryInfoType.setThinClientURI(repositoryId);
|
||||||
CmisRepositoryCapabilitiesType capabilities = new CmisRepositoryCapabilitiesType();
|
CmisRepositoryCapabilitiesType capabilities = new CmisRepositoryCapabilitiesType();
|
||||||
capabilities.setCapabilityMultifiling(true);
|
capabilities.setCapabilityMultifiling(true);
|
||||||
capabilities.setCapabilityUnfiling(false);
|
capabilities.setCapabilityUnfiling(false);
|
||||||
@@ -180,7 +181,15 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
|||||||
public CmisTypeDefinitionType getTypeDefinition(String repositoryId, String typeId) throws CmisException
|
public CmisTypeDefinitionType getTypeDefinition(String repositoryId, String typeId) throws CmisException
|
||||||
{
|
{
|
||||||
checkRepositoryId(repositoryId);
|
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);
|
return getCmisTypeDefinition(typeDef, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,7 +211,15 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
|||||||
}
|
}
|
||||||
else
|
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)
|
if (null == typeDef)
|
||||||
{
|
{
|
||||||
@@ -573,22 +590,38 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
|||||||
case DOCUMENT:
|
case DOCUMENT:
|
||||||
CmisTypeDocumentDefinitionType documentDefinitionType = new CmisTypeDocumentDefinitionType();
|
CmisTypeDocumentDefinitionType documentDefinitionType = new CmisTypeDocumentDefinitionType();
|
||||||
setCmisTypeDefinitionProperties(documentDefinitionType, typeDef, includeProperties);
|
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()));
|
documentDefinitionType.setContentStreamAllowed(contentStreamAllowedEnumMapping.get(typeDef.getContentStreamAllowed()));
|
||||||
result = documentDefinitionType;
|
result = documentDefinitionType;
|
||||||
break;
|
break;
|
||||||
case FOLDER:
|
case FOLDER:
|
||||||
CmisTypeFolderDefinitionType folderDefinitionType = new CmisTypeFolderDefinitionType();
|
CmisTypeFolderDefinitionType folderDefinitionType = new CmisTypeFolderDefinitionType();
|
||||||
|
if ((null != typeDef.getParentType()) && (null != typeDef.getParentType().getTypeId()))
|
||||||
|
{
|
||||||
|
folderDefinitionType.setParentId(typeDef.getParentType().getTypeId().getId());
|
||||||
|
}
|
||||||
setCmisTypeDefinitionProperties(folderDefinitionType, typeDef, includeProperties);
|
setCmisTypeDefinitionProperties(folderDefinitionType, typeDef, includeProperties);
|
||||||
result = folderDefinitionType;
|
result = folderDefinitionType;
|
||||||
break;
|
break;
|
||||||
case POLICY:
|
case POLICY:
|
||||||
CmisTypePolicyDefinitionType policyDefinitionType = new CmisTypePolicyDefinitionType();
|
CmisTypePolicyDefinitionType policyDefinitionType = new CmisTypePolicyDefinitionType();
|
||||||
|
if ((null != typeDef.getParentType()) && (null != typeDef.getParentType().getTypeId()))
|
||||||
|
{
|
||||||
|
policyDefinitionType.setParentId(typeDef.getParentType().getTypeId().getId());
|
||||||
|
}
|
||||||
setCmisTypeDefinitionProperties(policyDefinitionType, typeDef, includeProperties);
|
setCmisTypeDefinitionProperties(policyDefinitionType, typeDef, includeProperties);
|
||||||
result = policyDefinitionType;
|
result = policyDefinitionType;
|
||||||
break;
|
break;
|
||||||
case RELATIONSHIP:
|
case RELATIONSHIP:
|
||||||
CmisTypeRelationshipDefinitionType relationshipDefinitionType = new CmisTypeRelationshipDefinitionType();
|
CmisTypeRelationshipDefinitionType relationshipDefinitionType = new CmisTypeRelationshipDefinitionType();
|
||||||
|
if ((null != typeDef.getParentType()) && (null != typeDef.getParentType().getTypeId()))
|
||||||
|
{
|
||||||
|
relationshipDefinitionType.setParentId(typeDef.getParentType().getTypeId().getId());
|
||||||
|
}
|
||||||
setCmisTypeDefinitionProperties(relationshipDefinitionType, typeDef, includeProperties);
|
setCmisTypeDefinitionProperties(relationshipDefinitionType, typeDef, includeProperties);
|
||||||
result = relationshipDefinitionType;
|
result = relationshipDefinitionType;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user