mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Fix/mnt 16641 cmis applying aspects including protected properties (REPO-1065) (#20)
* REPO-1065 : Service Pack: MNT-16641 CMIS API: Applying aspects including protected properties results in CmisInvalidArgumentException: Property is read-only! Remove code from CMISConnector.processSecondaryTypes, that for each aspect added, it will search all of his properties in repository and add them with a null value(if not included in the propsToAdd). Add an extra check to CMISTest.testUpdatePropertiesSetDeleteContentVersioning now adding the P:cm:lockable aspect to a document (before this fix failing). Added CMISConnector.isUpdatable returns true/false if a property is updatable
This commit is contained in:
committed by
GitHub
parent
344952540b
commit
366a0e773e
@@ -3352,7 +3352,19 @@ public class CMISTest
|
||||
|
||||
cmisService.updateProperties(repositoryId, new Holder<String>(fileInfo.getNodeRef().toString()), null, properties, null);
|
||||
}
|
||||
|
||||
//This extra check was added due to MNT-16641.
|
||||
{
|
||||
PropertiesImpl properties = new PropertiesImpl();
|
||||
properties.addProperty(new PropertyStringImpl(PropertyIds.SECONDARY_OBJECT_TYPE_IDS, "P:cm:lockable"));
|
||||
|
||||
Set<QName> existingAspects = nodeService.getAspects(docs.get(0).getNodeRef());
|
||||
cmisService.updateProperties(repositoryId,new Holder<String>(docs.get(0).getNodeRef().toString()), null, properties, null);
|
||||
Set<QName> updatedAspects = nodeService.getAspects(docs.get(0).getNodeRef());
|
||||
updatedAspects.removeAll(existingAspects);
|
||||
|
||||
assertEquals(ContentModel.ASPECT_LOCKABLE, updatedAspects.iterator().next());
|
||||
|
||||
}
|
||||
return repositoryId;
|
||||
}
|
||||
}, CmisVersion.CMIS_1_1);
|
||||
|
Reference in New Issue
Block a user