1

I am trying to retrive all properties from CmisObject but I cant see the custom defined properties which are present in Documentum system.

Document sourceDocument = (Document)getCmisObject(sourceSession, sourceObjectId);

Iterator<Property<?>> propertie =  sourceDocument.getProperties().iterator();
while(propertie.hasNext()){
    System.out.println("Display Name:"+propertie.next().getDisplayName());
    System.out.println("Value:"+propertie.next().getValue().toString());
}

I tried above code . I also tried

Map<String, Object> properties = CMISHelper.objectProperties(sourceDocument);

But coulden't get all custom properties which are present in Documentum system.

Kalebere Gaurav
  • 69
  • 2
  • 13
  • 2
    Have you set a property filter in the operation context that selects your properties? See https://chemistry.apache.org/docs/cmis-samples/samples/operation-context/index.html#property-filter – Florian Müller May 16 '18 at 11:35
  • Florian Müller Thanks it worked. Now i am little confused as i used same code to retrive custom properties(Source of Document object was Alfresco) and it worked fine but I just changed Source to Documentum and faced above problem. – Kalebere Gaurav May 16 '18 at 12:10
  • 2
    you're using `next()` twice in a single loop – fantaghirocco May 16 '18 at 14:12
  • Kalebere, please post an answer explaining how you solved the problem, thanks! – Nicolas Raoul Jul 19 '18 at 03:15

0 Answers0