cancel
Showing results for 
Search instead for 
Did you mean: 

How to get property values

masofcon
Champ in-the-making
Champ in-the-making
Hello.

I have made my model and I need to find documents by some criterea and get property values from outside program.
How can I get property values using web services if I have NodeRef to this document?

Best regards,
George.
1 REPLY 1

openpj
Elite Collaborator
Elite Collaborator
When you have Node object of a single content, you can implement an iteration as the snippet below:

for (int i = 0; i < node.getProperties().length; i++) {
   if("{" + Constants.NAMESPACE_CONTENT_MODEL + "}content".equals(node.getProperties(i).getName())){
   //set the default content model property content in your custom POJO
   …
   } else if("{"+YOUR_CUSTOM_CONTENT_MODEL+"}yourCustomContentProperty".equals(node.getProperties(i).getName())){
   //set your custom content model property in your custom POJO
   …
   }
}
Hope this helps.