public abstract class AbstractFilter extends ConditionalExecution implements RenderFilter
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractFilter.AjaxRequestCondition |
static class |
AbstractFilter.AnyOfCondition
Evaluates to
true if any of the underlying conditions
evaluates to true. |
static class |
AbstractFilter.ConfigurationCondition |
static class |
AbstractFilter.EditModeCondition
Evaluates to
true if the current mode equals to the
specified one |
static interface |
AbstractFilter.ExecutionCondition |
static class |
AbstractFilter.MainResourceCondition
Evaluates to
true if the current resource is the main resource |
static class |
AbstractFilter.ModeCondition
Evaluates to
true if the current mode equals to the
specified one |
static class |
AbstractFilter.ModuleCondition
Evaluates to
true if the current resource's template type
matches the provided one. |
static class |
AbstractFilter.NodeTypeCondition
Evaluates to
true if the current resource's node has the
specified node type. |
static class |
AbstractFilter.NotCondition
Inverts the result of the underlying condition.
|
static class |
AbstractFilter.PatternCondition
Evaluates to
true if the current resource's template type
matches the provided one. |
static class |
AbstractFilter.RequestAttributeCondition
Filter execution condition that evaluates to true if the specified request attribute matches the specified value.
|
static class |
AbstractFilter.RequestCondition
Filter execution condition that evaluates to true if the specified request item matches the specified value.
|
static class |
AbstractFilter.RequestHeaderCondition
Filter execution condition that evaluates to true if the specified request header matches the specified value.
|
static class |
AbstractFilter.RequestParameterCondition
Filter execution condition that evaluates to true if the specified request parameter matches the specified value.
|
static class |
AbstractFilter.SiteTemplateSetCondition
Evaluates to
true if the current site's template set matches the specified one |
static class |
AbstractFilter.TemplateCondition
Evaluates to
true if the current resource's template matches the provided one. |
static class |
AbstractFilter.TemplateTypeCondition
Evaluates to
true if the current resource's template type
matches the provided one. |
static class |
AbstractFilter.WebflowRequestCondition
Checks that the current request is processing a Webflow action.
|
| Modifier and Type | Field and Description |
|---|---|
protected RenderService |
service |
| Constructor and Description |
|---|
AbstractFilter()
Initializes an instance of this class.
|
AbstractFilter(AbstractFilter.ExecutionCondition... conditions)
Initializes an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
areConditionsMatched(RenderContext renderContext,
Resource resource) |
int |
compareTo(RenderFilter filter) |
boolean |
equals(Object obj) |
String |
execute(String previousOut,
RenderContext renderContext,
Resource resource,
RenderChain chain) |
void |
finalize(RenderContext renderContext,
Resource resource,
RenderChain renderChain) |
String |
getContentForError(RenderContext renderContext,
Resource resource,
RenderChain renderChain,
Exception e) |
String |
getDescription()
Returns a human-readable description of this filter.
|
float |
getPriority()
Get the priority number of the filter.
|
int |
hashCode() |
boolean |
isDisabled() |
String |
prepare(RenderContext renderContext,
Resource resource,
RenderChain chain) |
void |
setDescription(String description)
Sets a human-readable description of this filter.
|
void |
setDisabled(boolean disabled) |
void |
setPriority(float priority) |
void |
setRenderService(RenderService service)
Injects an instance of the
RenderService into the current bean. |
String |
toString() |
addCondition, addCondition, getConditionsSummary, setApplyOnConfigurations, setApplyOnEditMode, setApplyOnMainResource, setApplyOnModes, setApplyOnModules, setApplyOnNodeTypes, setApplyOnSiteTemplateSets, setApplyOnTemplates, setApplyOnTemplateTypes, setConditions, setSkipOnAjaxRequest, setSkipOnConfiguration, setSkipOnConfigurations, setSkipOnEditMode, setSkipOnMainResource, setSkipOnModes, setSkipOnModules, setSkipOnNodeTypes, setSkipOnTemplates, setSkipOnTemplateTypes, setSkipOnWebflowRequestprotected RenderService service
public AbstractFilter()
public AbstractFilter(AbstractFilter.ExecutionCondition... conditions)
conditions - the execution conditions to be matched.public boolean areConditionsMatched(RenderContext renderContext, Resource resource)
areConditionsMatched in interface RenderFilterareConditionsMatched in class ConditionalExecutionpublic int compareTo(RenderFilter filter)
compareTo in interface Comparable<RenderFilter>public String execute(String previousOut, RenderContext renderContext, Resource resource, RenderChain chain) throws Exception
execute in interface RenderFilterpreviousOut - Result from the previous filterrenderContext - The render contextresource - The resource to renderchain - The render chainExceptionpublic void finalize(RenderContext renderContext, Resource resource, RenderChain renderChain)
finalize in interface RenderFilterpublic String getDescription()
public float getPriority()
getPriority in interface RenderFilterpublic boolean isDisabled()
public String getContentForError(RenderContext renderContext, Resource resource, RenderChain renderChain, Exception e)
getContentForError in interface RenderFilterpublic String prepare(RenderContext renderContext, Resource resource, RenderChain chain) throws Exception
prepare in interface RenderFilterrenderContext - The render contextresource - The resource to renderchain - The render chainExceptionpublic void setDescription(String description)
description - a human-readable description of this filterpublic void setDisabled(boolean disabled)
public void setPriority(float priority)
public final void setRenderService(RenderService service)
RenderServiceAwareRenderService into the current bean.setRenderService in interface RenderServiceAwareservice - an instance of the RenderServiceCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.