Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Unified Directory
11g Release 2 (11.1.2.2.0)

E38583-02


oracle.oud.plugin
Class PluginContext

java.lang.Object
  extended by oracle.oud.plugin.PluginContext

Direct Known Subclasses:
RequestContext

public class PluginContext
extends java.lang.Object

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
<T extends PluginConfiguration>
T
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

getConfiguration

public static <T extends PluginConfiguration> T 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.

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 the valueOf(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.

Type Parameters:
T - the type of the configuration interface that attempts to provide the parsed configuration.
Parameters:
configurationInterface - the interface that defines the types and the names of the parsed configuration properties.
pluginConfiguration - the configuration providing the raw properties.
Returns:
an instance of the provided configuration interface that attempts to provide a parsed view of the raw configuration.

getUtils

public PluginContext.Utils getUtils()
Retrieves the Utils associated to this context.
Returns:
the Utils associated to this context.

getTypeBuilder

public PluginContext.TypeBuilder getTypeBuilder()
Retrieves the type builder associated to this context.
Returns:
the type builder associated to this context.

getControlBuilder

public PluginContext.ControlBuilder getControlBuilder()
Retrieves the Control builder associated to this context.
Returns:
the type Control associated to this context.

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Unified Directory
11g Release 2 (11.1.2.2.0)

E38583-02


Copyright © 2013, Oracle and/or its affiliates. All rights reserved.