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 info of fields where converted request parameters are directly set according to a converter annotation.Returns info of fields where a converted request parameter is directly set according to a list converter annotation.Returns info of fields where a converted request parameters are directly set according to the default converter for the data type.Returns info list of non-pair fields processing failed.Returns info list of pair fields processing failed.Returns table of parameters parsed into field name and index, lookup by field name.Returns info of 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 info of fields that will be validated and converted from request parameters using form code.booleanReturns whether Action is ModelDriven.Returns info of string fields set from a request parameter without conversion.Returns info for string/non-string field pairs where the string field stores the unconverted request parameters and non-string field has the converted values.Returns info for single string/non-string list field pairs where the string field stores the unconverted request parameter and non-string field has the converted values.Returns info for string fields that are set from request parameters with no validation or other policies.getStep()Returns current, top-level processing step.Returns info list of non-pair fields that were successfully processed.Returns info list of pair fields that were successfully processed.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.Returns recipient of error and warning messages, which can be null if not provided by Action.org.apache.logging.log4j.LoggerReturns Log4j2 logger for logging conversion and validation failures.voidreset()voidvoidsetAutoParameterConversionFields(List<InterceptorCommonLibrary.FieldUsage<?>> autoParameterConversionFields) voidsetAutoParameterListConversionFields(List<InterceptorCommonLibrary.FieldUsage<?>> autoParameterListConversionFields) voidsetDefaultParameterConversionFields(List<InterceptorCommonLibrary.FieldUsage<?>> defaultParameterConversionFields) voidsetFailedFields(List<InterceptorCommonLibrary.FieldUsage<?>> failedFields) voidsetFailedPairFields(List<InterceptorCommonLibrary.PairFieldUsage<?>> failedPairFields) voidsetFieldParsedParameterListTable(Map<String, FieldParsedParameterList> fieldParsedParameterListTable) voidsetFileFields(List<InterceptorCommonLibrary.FieldUsage<?>> fileFields) voidstatic voidvoidsetInvocation(ActionInvocation invocation) voidsetManualParameterConversionFields(List<InterceptorCommonLibrary.FieldUsage<?>> manualParameterConversionFields) voidsetModelDriven(boolean modelDriven) voidsetNoConversionFields(List<InterceptorCommonLibrary.FieldUsage<?>> noConversionFields) voidsetPairConversionFields(List<InterceptorCommonLibrary.PairFieldUsage<?>> pairConversionFields) voidsetPairListConversionFields(List<InterceptorCommonLibrary.PairFieldUsage<?>> pairListConversionFields) voidsetSetOnlyFields(List<InterceptorCommonLibrary.FieldUsage<?>> setOnlyFields) voidvoidsetSuccessfulFields(List<InterceptorCommonLibrary.FieldUsage<?>> successfulFields) voidsetSuccessfulPairFields(List<InterceptorCommonLibrary.PairFieldUsage<?>> successfulPairFields) voidsetTextProvider(TextProvider textProvider) voidsetValidationAware(ValidationAware validationAware) voidsetValidationAware2(ValidationAware2 validationAware2) 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
-
getValidationAware2
Returns recipient of error and warning messages, which can be null if not provided by Action. -
setValidationAware2
-
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) -
getFieldParsedParameterListTable
Returns table of parameters parsed into field name and index, lookup by field name. -
setFieldParsedParameterListTable
public void setFieldParsedParameterListTable(Map<String, FieldParsedParameterList> fieldParsedParameterListTable) -
getAutoParameterConversionFields
Returns info of fields where converted request parameters are directly set according to a converter annotation. -
setAutoParameterConversionFields
public void setAutoParameterConversionFields(List<InterceptorCommonLibrary.FieldUsage<?>> autoParameterConversionFields) -
getAutoParameterListConversionFields
Returns info of fields where a converted request parameter is directly set according to a list converter annotation. -
setAutoParameterListConversionFields
public void setAutoParameterListConversionFields(List<InterceptorCommonLibrary.FieldUsage<?>> autoParameterListConversionFields) -
getDefaultParameterConversionFields
Returns info of fields where a converted request parameters are directly set according to the default converter for the data type. -
setDefaultParameterConversionFields
public void setDefaultParameterConversionFields(List<InterceptorCommonLibrary.FieldUsage<?>> defaultParameterConversionFields) -
getFileFields
Returns info of fields that receive file parameters created by the FileUploadInterceptor. -
setFileFields
-
getManualParameterConversionFields
Returns info of fields that will be validated and converted from request parameters using form code. -
setManualParameterConversionFields
public void setManualParameterConversionFields(List<InterceptorCommonLibrary.FieldUsage<?>> manualParameterConversionFields) -
getNoConversionFields
Returns info of string fields set from a request parameter without conversion. -
setNoConversionFields
-
getPairConversionFields
Returns info for string/non-string field pairs where the string field stores the unconverted request parameters and non-string field has the converted values. -
setPairConversionFields
public void setPairConversionFields(List<InterceptorCommonLibrary.PairFieldUsage<?>> pairConversionFields) -
getPairListConversionFields
Returns info for single string/non-string list field pairs where the string field stores the unconverted request parameter and non-string field has the converted values. -
setPairListConversionFields
public void setPairListConversionFields(List<InterceptorCommonLibrary.PairFieldUsage<?>> pairListConversionFields) -
getSetOnlyFields
Returns info for string fields that are set from request parameters with no validation or other policies. -
setSetOnlyFields
-
getSuccessfulFields
Returns info list of non-pair fields that were successfully processed. -
setSuccessfulFields
-
getFailedFields
Returns info list of non-pair fields processing failed. -
setFailedFields
-
getSuccessfulPairFields
Returns info list of pair fields that were successfully processed. -
setSuccessfulPairFields
public void setSuccessfulPairFields(List<InterceptorCommonLibrary.PairFieldUsage<?>> successfulPairFields) -
getFailedPairFields
Returns info list of pair fields processing failed. -
setFailedPairFields
-