Check whether cmis:contentStreamFilename is Orderable

79 Views Asked by At

The CMIS 1.1 standard says at 2.1.4.3.3 that cmis:contentStreamFileName has a Orderable property which CMIS repositories can choose to set to true or false.

As a CMIS client having a session on a particular repository, how to tell whether this repository has an Orderable of true or false for cmis:contentStreamFileName.

Preferably using DotCMIS or PortCMIS or OpenCMIS.

The Chemistry samples website has samples showing how to get repository capabilities, but not of this kind.

1

There are 1 best solutions below

0
Jeff Potts On BEST ANSWER

You can get the definition of types and then for the type you are interested in, check the property you are interested in, like this Java example using OpenCMIS:

ObjectType typeDef = getSession().getTypeDefinition("cmis:document");
Map<String, PropertyDefinition<?>> propDefs = typeDef.getPropertyDefinitions();
PropertyDefinition<?> propDef = propDefs.get("cmis:contentStreamFileName");
System.out.println(String.format("Is %s orderable? %s", propDef.getId(), propDef.isOrderable()));

Running this against Alfresco 5.2 CE and against Chemistry 0.11 returns false in both cases:

Is cmis:contentStreamFileName orderable? false