org.apache.camel.blueprint
Class BlueprintPropertiesParser

java.lang.Object
  extended by org.apache.camel.component.properties.DefaultPropertiesParser
      extended by org.apache.camel.blueprint.BlueprintPropertiesParser
All Implemented Interfaces:
org.apache.camel.component.properties.PropertiesParser

public class BlueprintPropertiesParser
extends org.apache.camel.component.properties.DefaultPropertiesParser

Blueprint 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.


Field Summary
 
Fields inherited from class org.apache.camel.component.properties.DefaultPropertiesParser
log
 
Constructor Summary
BlueprintPropertiesParser(org.osgi.service.blueprint.container.BlueprintContainer container, org.apache.camel.component.properties.PropertiesParser delegate)
           
 
Method Summary
 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)
           
 
Methods inherited from class org.apache.camel.component.properties.DefaultPropertiesParser
parseUri
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlueprintPropertiesParser

public BlueprintPropertiesParser(org.osgi.service.blueprint.container.BlueprintContainer container,
                                 org.apache.camel.component.properties.PropertiesParser delegate)
Method Detail

lookupPropertyPlaceholderIds

public String[] lookupPropertyPlaceholderIds()
Lookup the ids of the Blueprint property placeholder services in the Blueprint container.

Returns:
the ids, will be an empty array if none found.

addPropertyPlaceholder

public void addPropertyPlaceholder(String id)
Adds the given Blueprint property placeholder service with the given id

Parameters:
id - id of the Blueprint property placeholder service to add.

parseProperty

public String parseProperty(String key,
                            String value,
                            Properties properties)
Specified by:
parseProperty in interface org.apache.camel.component.properties.PropertiesParser
Overrides:
parseProperty in class org.apache.camel.component.properties.DefaultPropertiesParser


Apache CAMEL