Skip to Content
author's profile photo Former Member
Former Member

How to retrieve the custom property of a collection?

Hi all,

I've added a custom property (for example, property "SELF_GROUP" with value "Group_1") to a collection in KM. I tried to get the property with following code segment.

IPropertyName propName = new PropertyName(PropertyName.createDisplayname().getNamespace(), "SELF_GROUP");

IProperty property = Resource.getProperty(propName);

However, I can't get the property and it return null.

Do any one know how can I retrieve the custom property?

Besides, how can I retrieve the full list of property (name and value) of a resource?

Thanks for attention & any help


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2004 at 07:10 PM


    are you sure, your namespace parameter is correct? Please double check you you have configured your custom property in the respective KM admin console. Try to hard-code the namespace, ie:

    IPropertyName propName = new PropertyName("http://my.namespace/", "SELF_GROUP");

    Regardding your second question, .getProperties() should be the right for you. This will return an IPropertyMap object, for which you can create an iterator and query every property's name/value on by another.




    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Dear Yoav,

      Thanks for your kindly help. I can found the namespace for the custom property in the EP finally and it works.

      The location that store the namespace value in EP5 is "KM Admin > Configuration > Content Management > Global Services > Property Metadata > Namespaces"



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.