SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-877
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Shay Banon
Reporter: landon kuhn
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Compass

expose property name prefix to custom converter/marshal API

Created: 15/Jun/09 10:14 AM   Updated: 15/Jun/09 12:08 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None


 Description  « Hide
I would like my custom converter to respect the @SearchableComponent prefix settings for properties it adds. I need a way to get the concatenated prefixes to the object being marshaled.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Shay Banon added a comment - 15/Jun/09 12:08 PM
I have added an attribute to the MarshallingContext (which you get during marshalling and unmarshalling) that holds a list of strings which are the current set of prefixes that needs to be taken into account.

Basically, you can do: List<String> prefixes = context.getAttriute(MarshallingEnvironment.ATTRIBUTE_PREFIXES);

Note, prefixes can be null.

I have committed it, so you can give it a go and see if it solves your problem.