Class GlobalDecorator
java.lang.Object
org.forgerock.openig.decoration.global.GlobalDecorator
- All Implemented Interfaces:
Decorator
A GlobalDecorator stores decorators configuration in order to re-apply them when requested
to decorate a given heap object instance.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGlobalDecorator
(Decorator parent, JsonValue config, Heap heap, String... reservedFieldNames) Builds a new GlobalDecorator using given decorators JSON object element. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if this decorator is compatible with the provided component type.Decorate the given object instance with the previously declared set of decorations instead of the provided one.
-
Field Details
-
GLOBAL_DECORATOR_HEAP_KEY
Heap Key for the global decorator(s). They may be local to each Heap.- See Also:
-
-
Constructor Details
-
GlobalDecorator
Builds a new GlobalDecorator using given decorators JSON object element.- Parameters:
parent
- the parent global decorator from which additional global decorators may be inherited. May benull
config
- a JSON configurationheap
- the heap where this global decorator is declared (nevernull
)reservedFieldNames
- the names of reserved top level fields in the config which
-
-
Method Details
-
accepts
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 -
decorate
public DecorationHandle decorate(Object delegate, JsonValue ignored, Context context) throws HeapException Decorate the given object instance with the previously declared set of decorations instead of the provided one.- Specified by:
decorate
in interfaceDecorator
- Parameters:
delegate
- instance to decorateignored
- ignored (may probably benull
)context
- Context of the heap object to be decorated- Returns:
- the decorated instance or the original delegate (if no decorator could apply)
- Throws:
HeapException
- if one of the decorator failed to decorate the instance
-