Question

I am developing a universal CMIS 1.1 client application in JAVA using Apache Chemistry and CXF.

Currently I'm strugling with the hold capability of CMIS described here: http://docs.oasis-open.org/cmis/CMIS/v1.1/os/CMIS-v1.1-os.html#x1-13200016

When I create a secondary type in the InMemory repository with the id "cmis:rm_hold" and add this type to properties (cmis:secondaryObjectTypeIds) to any cmis:document the file still can be deleted.

Perhaps this is not the right way to do it.

Can someone please point me to the right direction to have this feature implemented?

The code I'm using to add the property:

CmisPropertiesType properties = new CmisPropertiesType();

CmisPropertyId propertyId = new CmisPropertyId();
propertyId.setPropertyDefinitionId("cmis:secondaryObjectTypeIds");
propertyId.getValue().add("cmis:rm_hold");
properties.getProperty().add(propertyId);

objectServicePort.updateProperties(
    cmisContext.getRepositoryId(), 
    new Holder<String>(id.getDocId()), null, properties, null);

Thank you, Miretz

Was it helpful?

Solution

Sorry, but the InMemory repository does not support Retention & Holds. The predefined types from the spec for retention and hold are not exposed from the InMemory server by default. If you create such a type afterwards, the server will recognize the type and properties but it will not know the semantics associated with properties like hold. In fact you shouldn't try to add predefined types (those starting with cmis: ) at runtime because their presence indicates if the functionality is supported or not.

For testing retention and holds the InMemory server is not an appropriate server. The InMemory server is limited to basic functionality.

Hope this helps...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top