AnsweredAssumed Answered

How to Obtain a full list of properties of specified type?

Question asked by razieltd on Jan 4, 2011
Latest reply on Jan 5, 2011 by razieltd
Hi!

i have this problem:
in my ws Java-backed iam searching to get all properties of a node that has a type of my custom-model. In my custom-model i have one type with a lot of property (principal) and some others types that has only the parent (parent=principal).

If in the ftl file i do this:


<#assign props = node.properties?keys>
<#list props as qn>
    <#if node.properties[qn]?exists>
        ${node.properties[qn]}
    <#else>
        null
    </#if>
</#list>
I just get the properties valued  :shock:  and the others properties?

I tried in the java file to write this


                String uuid=req.getParameter("uuid");
      if(uuid!=null && !uuid.isEmpty())
         node=new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE,uuid);
      QName type=nodeService.getType(node);
      DataTypeDefinition dataTypeDefinition=dictionaryService.getDataType(type);
      ModelDefinition modelDefinition=dataTypeDefinition.getModel();
      Collection<QName> propsType=dictionaryService.getProperties(modelDefinition.getName());

but not work  :cry:

ok so i tried this


dictionaryService.getAllProperties(dataTypeDefinition.getName());

but the result is 0  :shock:

what can i do to get all properties (valorized or not) of a specified type??

Outcomes