Class DefaultAnnotationValidator.InterceptorContext
java.lang.Object
name.matthewgreet.strutscommons.util.DefaultAnnotationValidator.InterceptorContext
- Enclosing class:
DefaultAnnotationValidator
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 enumDescribes processing step. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns current Action.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.Returns fields that receive file parameters created by the FileUploadInterceptor.getForm()Returns whatever's the Action's form, whether it's the Action itself, or the model for a ModelDriven Action.Retrieves processing state.Returns Action's execution state.Returns fields that will be validated and converted from request parameters using form code.booleanReturns 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.Returns message key translator, which can be null if not provided by Action.Returns recipient of error messages, which can be null if not provided by Action.org.apache.logging.log4j.LoggerReturns Log4j2 logger for logging conversion and validation failures.voidreset()voidvoidsetAllowedRequestParameters(HttpParameters allowedRequestParameters) voidsetAutoParameterConversionFields(Collection<InterceptorCommonLibrary.FieldUsage<?>> autoParameterConversionFields) voidsetDefaultParameterConversionFields(Collection<InterceptorCommonLibrary.FieldUsage<?>> defaultParameterConversionFields) voidsetFileFields(Collection<InterceptorCommonLibrary.FieldUsage<?>> fileFields) voidstatic voidvoidsetInvocation(ActionInvocation invocation) voidsetManualParameterConversionFields(Collection<InterceptorCommonLibrary.FieldUsage<?>> manualParameterConversionFields) voidsetModelDriven(boolean modelDriven) voidsetNoConversionFields(Collection<InterceptorCommonLibrary.FieldUsage<?>> noConversionFields) voidsetPairConversionFields(Collection<InterceptorCommonLibrary.PairFieldUsage<?>> pairConversionFields) voidsetSetOnlyFields(Collection<InterceptorCommonLibrary.FieldUsage<?>> setOnlyFields) voidvoidsetTextProvider(TextProvider textProvider) voidsetValidationAware(ValidationAware validationAware) voidsetValidationLogger(org.apache.logging.log4j.Logger validationLogger)
-
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
Returns Action's execution state. -
setInvocation
-
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
Returns message key translator, which can be null if not provided by Action. -
setTextProvider
-
getValidationAware
Returns recipient of error messages, which can be null if not provided by Action. -
setValidationAware
-
getValidationLogger
public org.apache.logging.log4j.Logger getValidationLogger()Returns Log4j2 logger for logging conversion and validation failures. -
setValidationLogger
public void setValidationLogger(org.apache.logging.log4j.Logger validationLogger) -
getAllowedRequestParameters
Returns request parameters that have passed parameter filtering step. -
setAllowedRequestParameters
-
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) -
getFileFields
Returns fields that receive file parameters created by the FileUploadInterceptor. -
setFileFields
-
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
-