03-29-2018 12:37 PM
Hi everyone, this is my first question and I hope that can be resolved.
I have a Maven proyect using cmis, and i need to get a clean uuid, because i need to put it in a DTO Object
and only I get:
"uuid": "[workspace://SpacesStore/6a8dbd45-26a5-4f66-944f-deb0696cde63;1.0]",
my code to check the uuid is
docFilter.setUuid(newDoc.getProperty(PropertyIds.OBJECT_ID).getValuesAsString());
Thanks in advice
03-30-2018 06:42 AM
Which CMIS API / version are you using? With CMIS 1.1 Browser binding you should only get the UUID with the version suffix, not the whole NodeRef + version.
Anyway, it should be quite simple to just split the object ID on the client side to only extract the UUID, i.e. take antyhing between last '/' and first ';', between start and first ',' (if no '/' found), or entire object ID (if no '/' and no ';' found, i.e. in CMIS 1.1 object ID for a folder).
Explore our Alfresco products with the links below. Use labels to filter content by product module.