cancel
Showing results for 
Search instead for 
Did you mean: 

PropertyFilter: how to derive a property from other properties?

0 Kudos

Hi!

I need to derive a property from a couple of other properties of the resource in the READ property filter. The source properties are ordinary static properties. My filter combines information from them for another datatype presentation.

In the filter() code, I tried to get values of the source properties via the predecessorFilter and directly from the resource.

If I try to get the source properties from the predecessor filter:

IPropertyMap map = this.predecessorFilter.filter();
map.get(...)

the returned map doesn't always contain these static properties.

If I try to use the getProperty() method of the resource:

this.getResource().getProperty(...)

then I fall into a recursive cycle: the getProperty() somehow calls my property filter again, which calls getResource().getProperty(...) again, which in turn leads to another call for this filter and so ad infinitum.

Is it possible to get the static properties of the resource in the filter() method at all? Or is there any other way to write a READ filter for deriving properties from another properties?

BTW, the predecessorFilter.filter() map always contains the static properties for the WRITE filter. Actually, that's how the problem is solved for now (I derive the property in the WRITE filter and store the value in the resource properties), but I don't like this solution. This derived property is for technical reasons, doesn't contain additional information, and shouldn't be stored but should be produced in the read mode.

Best regards,

Ilja Deryabin.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi!

Probably you don't get these properties because you

don't specify their names in your IPropertyFilter.getPropertyNameList() method.

Another way might be to return PropertyFilterMode.ALL_PROPERTIES in your IPropertyFilter.getFilterMode() method.

Hope that helps.

Kind regards, Dirk

0 Kudos

Hi!

Thanks for your answer. Could you please point me to the documentation which describes use of these methods or briefly describe how they work?

Best regards,

Ilja.

Former Member
0 Kudos

Hi!

Just have a look into the KMC Dev Guide:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/knowledge management and collaboration developers guide.html

In the section "Introduction to the KMC Platform"/"The Foundation..."/"RF Extensions"/"Property Filters" you find the doc.

bye, Dirk

Answers (0)