Class BaseUriDecorator
- java.lang.Object
-
- org.forgerock.openig.decoration.helper.AbstractDecorator
-
- org.forgerock.openig.decoration.helper.AbstractHandlerAndFilterDecorator
-
- org.forgerock.openig.decoration.baseuri.BaseUriDecorator
-
- All Implemented Interfaces:
Decorator
public class BaseUriDecorator extends AbstractHandlerAndFilterDecorator
The baseURI decorator can decorate bothFilterandHandlerinstances.It has to be declared inside of the heap objects section:
To decorate a component, just add the decorator declaration next to the{ "name": "myBaseUri", "type": "BaseUriDecorator" }configelement:{ "type": "...", "myBaseUri": "http://www.example.com", "config": { ... } }The baseURI has to be a string otherwise, the decoration will be ignored.
N.B: The Gateway Servlet creates a default BaseUriDecorator named "baseURI" at startup time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBaseUriDecorator.HeapletCreates and initializes a baseUri in a heap environment.
-
Constructor Summary
Constructors Constructor Description BaseUriDecorator(String name)Builds a newBaseUriDecorator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.forgerock.http.FilterdecorateFilter(org.forgerock.http.Filter delegate, org.forgerock.json.JsonValue decoratorConfig, Context context)Decorates the provideddelegateFilterinstance with the provideddecoratorConfigconfiguration.protected org.forgerock.http.HandlerdecorateHandler(org.forgerock.http.Handler delegate, org.forgerock.json.JsonValue decoratorConfig, Context context)Decorates the provideddelegateHandlerinstance with the provideddecoratorConfigconfiguration.-
Methods inherited from class org.forgerock.openig.decoration.helper.AbstractHandlerAndFilterDecorator
accepts, decorate
-
Methods inherited from class org.forgerock.openig.decoration.helper.AbstractDecorator
getLogger
-
-
-
-
Constructor Detail
-
BaseUriDecorator
public BaseUriDecorator(String name)
Builds a newBaseUriDecorator.- Parameters:
name- The name of this decorator.
-
-
Method Detail
-
decorateFilter
protected org.forgerock.http.Filter decorateFilter(org.forgerock.http.Filter delegate, org.forgerock.json.JsonValue decoratorConfig, Context context) throws HeapExceptionDescription copied from class:AbstractHandlerAndFilterDecoratorDecorates the provideddelegateFilterinstance with the provideddecoratorConfigconfiguration.- Specified by:
decorateFilterin classAbstractHandlerAndFilterDecorator- Parameters:
delegate- Filter instance to be decorateddecoratorConfig- the decorator configuration to applycontext- contextual information of the decorated instance- Returns:
- a decorated filter instance (or original filter delegate)
- Throws:
HeapException- when decoration fails
-
decorateHandler
protected org.forgerock.http.Handler decorateHandler(org.forgerock.http.Handler delegate, org.forgerock.json.JsonValue decoratorConfig, Context context)Description copied from class:AbstractHandlerAndFilterDecoratorDecorates the provideddelegateHandlerinstance with the provideddecoratorConfigconfiguration.- Specified by:
decorateHandlerin classAbstractHandlerAndFilterDecorator- Parameters:
delegate- Handler instance to be decorateddecoratorConfig- the decorator configuration to applycontext- contextual information of the decorated instance- Returns:
- a decorated handler instance (or original handler delegate)
-
-