Class DefaultBehaviorProvider<T>

java.lang.Object
org.forgerock.opendj.config.DefaultBehaviorProvider<T>
Type Parameters:
T - The type of values represented by this provider.
Direct Known Subclasses:
AbsoluteInheritedDefaultBehaviorProvider, AliasDefaultBehaviorProvider, DefinedDefaultBehaviorProvider, RelativeInheritedDefaultBehaviorProvider, UndefinedDefaultBehaviorProvider

public abstract class DefaultBehaviorProvider<T> extends Object
An interface for determining the default behavior of a property. A property exhibits default behavior when it has no values defined. There are four different types of default behavior:
  1. there is no default behavior - e.g. leaving a "description" unset has no side-effects. This default behavior is represented using the UndefinedDefaultBehaviorProvider implementation
  2. the property defaults to one or more real values of the property. This default behavior is represented using the DefinedDefaultBehaviorProvider implementation
  3. the property defaults to some special behavior that cannot be represented using real property values. This default behavior is represented using the AliasDefaultBehaviorProvider implementation
  4. the property inherits its values from property held in another managed object (e.g. the parent managed object). This default behavior is represented using the AbsoluteInheritedDefaultBehaviorProvider and RelativeInheritedDefaultBehaviorProvider implementations.
An application can perform actions based on the type of the default behavior by implementing the DefaultBehaviorProviderVisitor interface.
  • Constructor Details

    • DefaultBehaviorProvider

      protected DefaultBehaviorProvider()
      Creates a new default behavior provider.
  • Method Details

    • accept

      public abstract <R, P> R accept(DefaultBehaviorProviderVisitor<T,R,P> v, P p)
      Apply a visitor to this default behavior provider.
      Type Parameters:
      R - The return type of the visitor's methods.
      P - The type of the additional parameters to the visitor's methods.
      Parameters:
      v - The default behavior visitor.
      p - Optional additional visitor parameter.
      Returns:
      Returns a result as specified by the visitor.
    • initialize

      protected void initialize() throws Exception
      Performs any run-time initialization required by this default behavior provider. This may include resolving managed object paths and property names.

      The default implementation is to do nothing.

      Throws:
      Exception - If this default behavior provider could not be initialized.