public class BlueprintPropertiesParser extends DefaultPropertiesParser
PropertiesParser
which supports looking up
property placeholders from the Blueprint Property Placeholder Service.
This implementation will sit on top of any existing configured
PropertiesParser
and will delegate to those in case Blueprint could not
resolve the property.log
Constructor and Description |
---|
BlueprintPropertiesParser(PropertiesComponent propertiesComponent,
org.osgi.service.blueprint.container.BlueprintContainer container,
PropertiesParser delegate) |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyPlaceholder(String id)
Adds the given Blueprint property placeholder service with the given id
|
String[] |
lookupPropertyPlaceholderIds()
Lookup the ids of the Blueprint property placeholder services in the
Blueprint container.
|
String |
parseProperty(String key,
String value,
Properties properties)
While parsing the uri using
parseUri each
parsed property found invokes this callback. |
getPropertiesComponent, parseUri, parseUri, setPropertiesComponent
public BlueprintPropertiesParser(PropertiesComponent propertiesComponent, org.osgi.service.blueprint.container.BlueprintContainer container, PropertiesParser delegate)
public String[] lookupPropertyPlaceholderIds()
public void addPropertyPlaceholder(String id)
id
- id of the Blueprint property placeholder service to add.public String parseProperty(String key, String value, Properties properties)
PropertiesParser
parseUri
each
parsed property found invokes this callback.
This strategy method allows you to hook into the parsing and do custom lookup and return the actual value to use.parseProperty
in interface PropertiesParser
parseProperty
in class DefaultPropertiesParser
key
- the keyvalue
- the valueproperties
- the properties resolved which values should be looked upCopyright © 2007–2016 The Apache Software Foundation. All rights reserved.