cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

as far as I know the PropertyConfigurationService does not allow the creation of properties which are stored in the configuration.

Regards,

Achim

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kent

please go through the link:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/645d4357-0701-0010-07bd-a2e...

This link contains the codes examples.

Hope this will help you.

Regards

Vineetha

Former Member
0 Kudos

I went through this doucment before I wrote this message. This is not really what I want. The metadata extension just help me to create a set of property allowed values dynamically , but I still have to create a property in property metadata through the configuration (I need to create the property in property metadata through KM API).

Anyway, thanks for your input. I adward some points to you.