|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.impl.ComponentConfigurationSupport
public abstract class ComponentConfigurationSupport
Useful base class for implementations of ComponentConfiguration
| Field Summary | |
|---|---|
protected Component |
component
|
| Constructor Summary | |
|---|---|
ComponentConfigurationSupport(Component component)
|
|
| Method Summary | |
|---|---|
List<String> |
completeEndpointPath(String completionText)
A helper method for tools such as CLIs, IDEs or web tools that provides a completion list for Endpoint Paths rather like bash tab completion or Karaf attribute or option completion handers. |
void |
configureEndpoint(Endpoint endpoint)
Configures the properties on the given endpoint |
Endpoint |
createEndpoint()
Converts the configuration into a URI and then looks up the endpoint in the CamelContext
which typically results in a new Endpoint instance being created. |
String |
createParameterJsonSchema()
Creates a JSON schema representation of the configuration parameters for this endpoint and the types and validation rules. |
String |
getBaseUri()
Returns the base URI without any scheme or URI query parameters (property values) |
Object |
getParameter(String name)
Returns the parameter value for the given name |
ParameterConfiguration |
getParameterConfiguration(String name)
Returns the URI query parameter configuration for the given parameter name or null if it does not exist |
Map<String,Object> |
getParameters()
Returns the current parameters of the configuration (usually encoded as ?foo=bar&whatnot=something URI query parameters) |
String |
getUriString()
Returns the URI string (without schema) with query parameters for the current configuration which can then be used to create an Endpoint |
void |
setBaseUri(String baseUri)
Sets the base URI without any query parameters added |
void |
setParameter(String name,
Object value)
Sets the parameter value of the given name |
void |
setParameters(Map<String,Object> newValues)
Sets the parameter values of this configuration |
void |
setUriString(String uri)
Sets the URI string (without schema but with optional query parameters) which will update the ComponentConfiguration.getBaseUri() and the ComponentConfiguration.getParameters() values |
protected void |
validatePropertyName(String name)
Allow implementations to validate whether a property name is valid and either throw an exception or log a warning of an unknown property being used |
protected Object |
validatePropertyValue(String name,
Object value)
Allow implementations to validate whether a property name is valid and either throw an exception or log a warning of an unknown property being used and to convert the given value to the correct type before updating the value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.camel.ComponentConfiguration |
|---|
getEndpointParameter, getParameterConfigurationMap, setEndpointParameter |
| Field Detail |
|---|
protected final Component component
| Constructor Detail |
|---|
public ComponentConfigurationSupport(Component component)
| Method Detail |
|---|
public Map<String,Object> getParameters()
ComponentConfiguration
getParameters in interface ComponentConfigurationpublic void setParameters(Map<String,Object> newValues)
ComponentConfiguration
setParameters in interface ComponentConfigurationpublic Object getParameter(String name)
ComponentConfiguration
getParameter in interface ComponentConfigurationname - the name of the URI query parameter to get
public void setParameter(String name,
Object value)
ComponentConfiguration
setParameter in interface ComponentConfigurationname - the name of the URI query parametervalue - the new value of the parameterpublic String getBaseUri()
getBaseUri in interface ComponentConfigurationpublic void setBaseUri(String baseUri)
ComponentConfiguration
setBaseUri in interface ComponentConfiguration
public Endpoint createEndpoint()
throws Exception
ComponentConfigurationCamelContext
which typically results in a new Endpoint instance being created.
createEndpoint in interface ComponentConfigurationExceptionpublic void configureEndpoint(Endpoint endpoint)
configureEndpoint in interface ComponentConfigurationpublic String getUriString()
ComponentConfigurationEndpoint
getUriString in interface ComponentConfiguration
public void setUriString(String uri)
throws URISyntaxException
ComponentConfigurationComponentConfiguration.getBaseUri() and the ComponentConfiguration.getParameters() values
setUriString in interface ComponentConfigurationuri - the new URI string with query arguments
URISyntaxExceptionpublic ParameterConfiguration getParameterConfiguration(String name)
ComponentConfiguration
getParameterConfiguration in interface ComponentConfigurationpublic List<String> completeEndpointPath(String completionText)
ComponentConfiguration
completeEndpointPath in interface ComponentConfigurationcompletionText - the prefix text used to complete on (usually a matching bit of text)
public String createParameterJsonSchema()
ComponentConfiguration
createParameterJsonSchema in interface ComponentConfigurationprotected void validatePropertyName(String name)
protected Object validatePropertyValue(String name,
Object value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||