Class DefaultViewElementPostProcessor<T extends ViewElement>
java.lang.Object
com.foreach.across.modules.web.ui.DefaultViewElementPostProcessor<T>
- All Implemented Interfaces:
ViewElementPostProcessor<T>
public final class DefaultViewElementPostProcessor<T extends ViewElement>
extends Object
implements ViewElementPostProcessor<T>
Implementation that looks for a collection of ViewElementPostProcessor
s on the
ViewElementBuilderContext
and applies all of them. All ViewElementBuilderSupport
instances will automatically execute this post processor when building.
The easiest way to add a default ViewElementPostProcessor
is to use the static
add(ViewElementBuilderContext, ViewElementPostProcessor)
method.
- Author:
- Arne Vandamme
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Name of the attribute that contains theCollection
holding the post processors.static final DefaultViewElementPostProcessor
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
add
(ViewElementBuilderContext builderContext, ViewElementPostProcessor<?> postProcessor) Add an additional post processor to theViewElementBuilderContext
.void
postProcess
(ViewElementBuilderContext builderContext, ViewElement element) static boolean
remove
(ViewElementBuilderContext builderContext, ViewElementPostProcessor postProcessor) Remove a registered post processor from the builder context.
-
Field Details
-
INSTANCE
-
ATTRIBUTE_NAME
Name of the attribute that contains theCollection
holding the post processors.
-
-
Method Details
-
postProcess
- Specified by:
postProcess
in interfaceViewElementPostProcessor<T extends ViewElement>
-
add
public static void add(ViewElementBuilderContext builderContext, ViewElementPostProcessor<?> postProcessor) Add an additional post processor to theViewElementBuilderContext
. This post processor will be executed by allViewElementBuilder
s that are executed in the builder context and have theINSTANCE
configured.- Parameters:
builderContext
- in which to register the post processorpostProcessor
- instance
-
remove
public static boolean remove(ViewElementBuilderContext builderContext, ViewElementPostProcessor postProcessor) Remove a registered post processor from the builder context.- Parameters:
builderContext
- from which to remove the post processorpostProcessor
- instance that should be removed- Returns:
- true if the post processor was found
-