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, useAbstractDecorator
as a replacement along with the class service/factory.An AbstractHandlerAndFilterDecorator is the base implementation for decorators working only onFilter
andHandler
.Implementors just have to implement the dedicated
decorateFilter(Filter, JsonValue, Context)
anddecorateHandler(Handler, JsonValue, Context)
for decorating Filter and Handler respectively.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractHandlerAndFilterDecorator(String name)
Deprecated.Forces to give the name of the decorator.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
accepts(Class<?> type)
Deprecated.Returnstrue
if this decorator is compatible with the provided component type.DecorationHandle
decorate(Object delegate, JsonValue decoratorConfig, Context context)
Deprecated.Decorates the provideddelegate
instance with the provideddecoratorConfig
configuration.protected abstract DecorationHandle
decorateFilter(Filter delegate, JsonValue decoratorConfig, Context context)
Deprecated.protected abstract DecorationHandle
decorateHandler(Handler delegate, JsonValue decoratorConfig, Context context)
Deprecated.-
Methods inherited from class org.forgerock.openig.decoration.helper.AbstractDecorator
getLogger
-
-
-
-
Constructor Detail
-
AbstractHandlerAndFilterDecorator
protected AbstractHandlerAndFilterDecorator(String name)
Deprecated.Forces to give the name of the decorator.- Parameters:
name
- The name of the decorator.
-
-
Method Detail
-
accepts
public final boolean accepts(Class<?> type)
Deprecated.Description copied from interface:Decorator
Returnstrue
if this decorator is compatible with the provided component type. Note that a return value oftrue
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 provideddelegate
instance with the provideddecoratorConfig
configuration. The implementation should take care of not changing the base type of the delegate.- Parameters:
delegate
- instance to be decorateddecoratorConfig
- the decorator configuration to applycontext
- 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.- Parameters:
delegate
- Handler instance to be decorateddecoratorConfig
- the decorator configuration to applycontext
- 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.- Parameters:
delegate
- Filter instance to be decorateddecoratorConfig
- the decorator configuration to applycontext
- contextual information of the decorated instance- Returns:
- a handle to the decoration
- Throws:
HeapException
- when decoration fails
-
-