Class DefaultAnnotationValidatior.InterceptorContext
java.lang.Object
name.matthewgreet.strutscommons.util.DefaultAnnotationValidatior.InterceptorContext
- Enclosing class:
DefaultAnnotationValidatior
Thread local execution state of algorithm. Use
getInstance()
to obtain the current state. Properties
are set as the algorithm progresses and these are divided into sets, shown below. Documentation of each library
function defines the sets in use as well as its purpose.
Property set 1
Property set 2
Property set 3
Property set 4
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Describes processing step. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns current Action.org.apache.struts2.dispatcher.HttpParameters
Returns request parameters that have passed parameter filtering step.Returns policies for fields where a converted request parameter is directly set according to a converter annotation.Returns policies for fields where a converted request parameter is directly set according to the default converter for the data type.getForm()
Returns whatever's the Action's form, whether it's the Action itself, or the model for a ModelDriven Action.Retrieves processing state.com.opensymphony.xwork2.ActionInvocation
Returns Action's execution state.Returns fields that will be validated and converted from request parameters using form code.boolean
Returns whether Action is ModelDriven.Returns policies for string fields set from a request parameter without conversion.Returns policies for string/non-string field pairs where the string field stores the unconverted request parameter and non-string field has the converted value.Returns string fields that are set from a request parameter with no validation or other policies.getStep()
Returns current, top-level processing step.com.opensymphony.xwork2.TextProvider
Returns message key translator, which can be null if not provided by Action.com.opensymphony.xwork2.interceptor.ValidationAware
Returns recipient of error messages, which can be null if not provided by Action.void
reset()
void
void
setAllowedRequestParameters
(org.apache.struts2.dispatcher.HttpParameters allowedRequestParameters) void
setAutoParameterConversionFields
(Collection<InterceptorCommonLibrary.FieldUsage<?>> autoParameterConversionFields) void
setDefaultParameterConversionFields
(Collection<InterceptorCommonLibrary.FieldUsage<?>> defaultParameterConversionFields) void
static void
void
setInvocation
(com.opensymphony.xwork2.ActionInvocation invocation) void
setManualParameterConversionFields
(Collection<InterceptorCommonLibrary.FieldUsage<?>> manualParameterConversionFields) void
setModelDriven
(boolean modelDriven) void
setNoConversionFields
(Collection<InterceptorCommonLibrary.FieldUsage<?>> noConversionFields) void
setPairConversionFields
(Collection<InterceptorCommonLibrary.PairFieldUsage<?>> pairConversionFields) void
setSetOnlyFields
(Collection<InterceptorCommonLibrary.FieldUsage<?>> setOnlyFields) void
void
setTextProvider
(com.opensymphony.xwork2.TextProvider textProvider) void
setValidationAware
(com.opensymphony.xwork2.interceptor.ValidationAware validationAware)
-
Constructor Details
-
InterceptorContext
protected InterceptorContext()
-
-
Method Details
-
getInstance
Retrieves processing state. -
setInstance
-
reset
public void reset() -
getStep
Returns current, top-level processing step. -
setStep
-
getInvocation
public com.opensymphony.xwork2.ActionInvocation getInvocation()Returns Action's execution state. -
setInvocation
public void setInvocation(com.opensymphony.xwork2.ActionInvocation invocation) -
getAction
Returns current Action. -
setAction
-
getForm
Returns whatever's the Action's form, whether it's the Action itself, or the model for a ModelDriven Action. -
setForm
-
getModelDriven
public boolean getModelDriven()Returns whether Action is ModelDriven. -
setModelDriven
public void setModelDriven(boolean modelDriven) -
getTextProvider
public com.opensymphony.xwork2.TextProvider getTextProvider()Returns message key translator, which can be null if not provided by Action. -
setTextProvider
public void setTextProvider(com.opensymphony.xwork2.TextProvider textProvider) -
getValidationAware
public com.opensymphony.xwork2.interceptor.ValidationAware getValidationAware()Returns recipient of error messages, which can be null if not provided by Action. -
setValidationAware
public void setValidationAware(com.opensymphony.xwork2.interceptor.ValidationAware validationAware) -
getAllowedRequestParameters
public org.apache.struts2.dispatcher.HttpParameters getAllowedRequestParameters()Returns request parameters that have passed parameter filtering step. -
setAllowedRequestParameters
public void setAllowedRequestParameters(org.apache.struts2.dispatcher.HttpParameters allowedRequestParameters) -
getAutoParameterConversionFields
Returns policies for fields where a converted request parameter is directly set according to a converter annotation. -
setAutoParameterConversionFields
public void setAutoParameterConversionFields(Collection<InterceptorCommonLibrary.FieldUsage<?>> autoParameterConversionFields) -
getDefaultParameterConversionFields
Returns policies for fields where a converted request parameter is directly set according to the default converter for the data type. -
setDefaultParameterConversionFields
public void setDefaultParameterConversionFields(Collection<InterceptorCommonLibrary.FieldUsage<?>> defaultParameterConversionFields) -
getManualParameterConversionFields
Returns fields that will be validated and converted from request parameters using form code. -
setManualParameterConversionFields
public void setManualParameterConversionFields(Collection<InterceptorCommonLibrary.FieldUsage<?>> manualParameterConversionFields) -
getNoConversionFields
Returns policies for string fields set from a request parameter without conversion. -
setNoConversionFields
public void setNoConversionFields(Collection<InterceptorCommonLibrary.FieldUsage<?>> noConversionFields) -
getPairConversionFields
Returns policies for string/non-string field pairs where the string field stores the unconverted request parameter and non-string field has the converted value. -
setPairConversionFields
public void setPairConversionFields(Collection<InterceptorCommonLibrary.PairFieldUsage<?>> pairConversionFields) -
getSetOnlyFields
Returns string fields that are set from a request parameter with no validation or other policies. -
setSetOnlyFields
-