Constructor and Description |
---|
FilteredConnectorWrapper(Connector targetConnector,
Filter filter) |
Modifier and Type | Method and Description |
---|---|
void |
addConnector(Connector connector)
Add a Connector if you needed inside the
Connector.init() Methode. |
byte[] |
getContent(String key)
return a byte[]-Value for the given key or
null if no file-content for the key where found. |
String |
getName()
Return The name Of this Connector.
|
Object |
getObject(String key)
return a Object-Value for the given key.
|
String |
getString(String key)
return a String-Value for the given key.
|
void |
init()
Will be called after all properties have been set.
|
void |
setContentResolver(ContentResolver contentResolver)
set a ContentResolver as Helper for
Connector.getContent(String) . |
void |
setName(String name)
Set the name of the Connector defined in the settings4j.xml configuration:
--------------------------------------
<connector name="PropertyFileConnector" ....
|
void |
setObjectResolver(ObjectResolver objectResolver)
set a ObjectResolver as Helper for
Connector.getObject(String) . |
public void addConnector(Connector connector)
Connector
Connector.init()
Methode.
Or you can use this connectors inside the settings4j.xml to set a parameter/property
Example configuration in settings4j.xml: -------------------------------------- <connector name="PropertyFileConnector" class="org.settings4j.connector.PropertyFileConnector"> <param name="propertyFromContent" value="${connectors.content['org/settings4j/config/propertyFile.properties']}" /> <contentResolver-ref ref="DefaultContentResolver" /> <connector-ref ref="ClasspathConnector" /> </connector> --------------------------------------
addConnector
in interface Connector
connector
- the Connector to set.public byte[] getContent(String key)
Connector
null
if no file-content for the key where found.
The concrete implementation can use the ContentResolver if required
getContent
in interface Connector
key
- the Key for the configuration-property. e.g.: "com/mycompany/myapp/myParameterKey"public String getName()
Connector
Settings4j
.set*(..., String connectorName) Methods.public Object getObject(String key)
Connector
The concrete implementation can use the ObjectResolver if required
public String getString(String key)
Connector
public void init()
Connector
public void setContentResolver(ContentResolver contentResolver)
Connector
Connector.getContent(String)
.setContentResolver
in interface Connector
contentResolver
- the ContentResolver to set.public void setName(String name)
Connector
-------------------------------------- <connector name="PropertyFileConnector" ....> .... </connector> --------------------------------------
public void setObjectResolver(ObjectResolver objectResolver)
Connector
Connector.getObject(String)
.setObjectResolver
in interface Connector
objectResolver
- the ObjectResolver to set.Copyright © 2008–2016 Brabenetz Harald, Austria. All rights reserved.