Class AbstractHandlerAndFilterDecorator

java.lang.Object
org.forgerock.openig.decoration.helper.AbstractDecorator
org.forgerock.openig.decoration.helper.AbstractHandlerAndFilterDecorator
All Implemented Interfaces:
Decorator

@Deprecated(since="7.1") public abstract class AbstractHandlerAndFilterDecorator extends AbstractDecorator
Deprecated.
in 7.1, use AbstractDecorator as a replacement along with the class service/factory.
An AbstractHandlerAndFilterDecorator is the base implementation for decorators working only on Filter and Handler.

Implementors just have to implement the dedicated decorateFilter(Filter, JsonValue, Context) and decorateHandler(Handler, JsonValue, Context) for decorating Filter and Handler respectively.

  • Constructor Details

    • AbstractHandlerAndFilterDecorator

      protected AbstractHandlerAndFilterDecorator(String name)
      Deprecated.
      Forces to give the name of the decorator.
      Parameters:
      name - The name of the decorator.
  • Method Details

    • accepts

      public final boolean accepts(Class<?> type)
      Deprecated.
      Description copied from interface: Decorator
      Returns true if this decorator is compatible with the provided component type. Note that a return value of true does not necessarily indicate that decoration will be performed since it may also depend on other factors
      Parameters:
      type - type under test
      Returns:
      true if the decorator can decorate instance of the given type, false otherwise.
    • decorate

      public final DecorationHandle decorate(Object delegate, JsonValue decoratorConfig, Context context) throws HeapException
      Deprecated.
      Description copied from interface: Decorator
      Decorates the provided delegate instance with the provided decoratorConfig configuration. The implementation should take care of not changing the base type of the delegate.
      Parameters:
      delegate - instance to be decorated
      decoratorConfig - the decorator configuration to apply
      context - contextual information of the decorated instance
      Returns:
      a handle of the decoration that was setup, never null.
      Throws:
      HeapException - when decoration fails
    • decorateHandler

      protected abstract DecorationHandle decorateHandler(Handler delegate, JsonValue decoratorConfig, Context context) throws HeapException
      Deprecated.
      Decorates the provided delegate Handler instance with the provided decoratorConfig configuration.
      Parameters:
      delegate - Handler instance to be decorated
      decoratorConfig - the decorator configuration to apply
      context - contextual information of the decorated instance
      Returns:
      a handle to the decoration
      Throws:
      HeapException - when decoration fails
    • decorateFilter

      protected abstract DecorationHandle decorateFilter(Filter delegate, JsonValue decoratorConfig, Context context) throws HeapException
      Deprecated.
      Decorates the provided delegate Filter instance with the provided decoratorConfig configuration.
      Parameters:
      delegate - Filter instance to be decorated
      decoratorConfig - the decorator configuration to apply
      context - contextual information of the decorated instance
      Returns:
      a handle to the decoration
      Throws:
      HeapException - when decoration fails