Skip to Content
0
Former Member
Feb 14, 2006 at 05:03 AM

How to create a new property in Property Metadata through KM API?

37 Views

I wrote a program that create new properties for the folder. Here is a portion of my code:

Code Start:

IPropertyName brandPropertyName =

new PropertyName("com.xxx.portal.km", propertyName);

IProperty p = new Property(brandPropertyName, brand);

IMutableProperty newBrandProperty = p.getMutable();

brandFile.setProperty(newBrandProperty);

xxxxx Code End xxxxxxxx

It created a new virtual property, but it would not appear in the Property Metadata (just like the Custom Property we create that will not exist in the Proeprty Metadata).

As I need to render this property using the Custom Property that I create, without physically create a property in Property Metadata, I actually can't assign a particular Property Renderer to it.

Question:

How do I make the property physically in the Property Metadata through KM API, without we ourselves go and set it up.

I ever thinking about writting a program to generate the metaData.xml (with the new property configuration), and let's the program deploy the the metaData.xml into the portal (I means through the Property Metadata Services.)

Thanks for suggestions in advance.

Kent