|
Oracle® Fusion Middleware Java API Reference for Oracle Unified Directory 11g Release 2 (11.1.2.2.0) E38583-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.oud.plugin.PluginContext
public class PluginContext
This class defines a context that is associated to the a plugin. This class provides access to services such as type factories, logger, ...
Nested Class Summary | |
---|---|
static interface |
PluginContext.ControlBuilder This interface is a builder to create new Control instances. |
static interface |
PluginContext.TypeBuilder This interface is a builder to create new type instances. |
static interface |
PluginContext.Utils This interface provides various services. |
Method Summary | ||
---|---|---|
static
|
getConfiguration(java.lang.Class<T> configurationInterface, PluginConfiguration pluginConfiguration) Returns an instance of the provided configuration interface that attempts to provide a parsed view of the raw configuration. |
|
PluginContext.ControlBuilder |
getControlBuilder() Retrieves the Control builder associated to this context. |
|
PluginContext.TypeBuilder |
getTypeBuilder() Retrieves the type builder associated to this context. |
|
PluginContext.Utils |
getUtils() Retrieves the Utils associated to this context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T extends PluginConfiguration> T getConfiguration(java.lang.Class<T> configurationInterface, PluginConfiguration pluginConfiguration)
The relations to the raw configuration properties are determined by reflection on the provided Java interface.
The rules are the following - the provided interface must extend the PluginConfiguration and define getters in the forms '<type> getX()' or 'boolean isY()' - the returned values are constructed from type defined in the provided configuration interface by calling thevalueOf(String)
method (eg. String.valueOf(String)) - String getX() attempts to parse the value of the raw configuration property defined by x=value using the String.valueOf(String) method - if a property is multivalued then the returned type of the method defined in the provided configuration interface must be of type java.util.Collection
and the type contained type contained in that collection must be defined using the annotation ConfigurationProperty
(String is the default type).
Beware that parsing the raw configuration can throw undeclared exceptions.
T
- the type of the configuration interface that attempts to provide the parsed configuration.configurationInterface
- the interface that defines the types and the names of the parsed configuration properties.pluginConfiguration
- the configuration providing the raw properties.public PluginContext.Utils getUtils()
public PluginContext.TypeBuilder getTypeBuilder()
public PluginContext.ControlBuilder getControlBuilder()
|
Oracle® Fusion Middleware Java API Reference for Oracle Unified Directory 11g Release 2 (11.1.2.2.0) E38583-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |