cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Property NameSpace

Former Member
0 Kudos

Hi All,

I am very new to KM. I have a custom property called "hitscount" under PropertyMetadata, which shows the hitscounts for all documents. But the NameSpace of the customproperty shows "default".

How can i create a NameSpace For the Customproperty? Can anyone provide sample code for creating a namespace for the custom property?

Regards,

Divya

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

answered

Former Member
0 Kudos

Hi Divya,

You need to declare a namespace first, that matches your property.

Can't tell you which namespace to use, try around...


Resource res = ....
String myNameSpace= "http://mynamespace.com/xmlns/cm";
String myProperty = "hitscount";

IPropertyName propertyname = new PropertyName(myNameSpace, myProperty);
IProperty prop = new Property(propertyname, "hitscountValue");
res.setProperty(prop);

"hitscountValue" will contain the value for the property.

Maybe the code helps you!?

regards,

Christian