Class DefaultAnnotationValidator.FieldContext<T>
java.lang.Object
name.matthewgreet.strutscommons.util.DefaultAnnotationValidator.FieldContext<T>
- Enclosing class:
DefaultAnnotationValidator
Thread local execution state of algorithm about a field. 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
conversionModeparsedParametersfieldUsagepairFieldUsageannountationEntriesannotatedFieldNamefieldMultiplicitypairFieldMultiplicity
Property set 3
Property set 4
Property set 5
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns name of field, which is the string field in a pair conversion.Returns configured policies to apply.booleanReturns whether conversion or list conversion failed of any parameter.booleanReturns whether any non-conversion validation failed of any parameter.booleanReturns whether processing of any parameter failed.booleanReturns whether any post conversion validation failed of any parameter.Returns the policy being processed.Returns conversion mode, defining how form field is set from a request parameter.Returns results of conversions of each parameter for field.booleanReturns whether conversion or list conversion failed for current parameter.Returns results of conversions of parameter currently being processed.booleanReturns whether any non-conversion validation failed for current parameter.Returns result of non-conversion validations of parameter currently being processed.Returns result of non-conversion validations of parameter currently being processed.Returns converted value, successful or not, of parameter currently being processedbooleanReturns whether any post conversion validation failed for current parameter.Returns results of post-conversion validation of parameter currently being processed.Returns whether field, or formatted half of a pair field, is single value, array or collection.Returns the list of parsed request parameters applying to the form field.Returns field and configured policies to apply except for pair conversion mode.intgetIndex()Returns index (0 based) of request parameter value being processed.static <T> DefaultAnnotationValidator.FieldContext<T> Returns results of list post conversion validations.Returns results of non-conversion validations of each parameter for field.Returns whether unformatted half of pair field is single value, array or collection.Returns field and configured policies to apply for pair conversion mode.booleanReturns whether processing a parameter failed validation or conversion.Returns parsed parameters for field, which is just one for single value fields.Returns converted values, successful or not.Returns results of post-conversion validations of each parameter for field.getStep()Returns current, field-level processing step.voidsetAnnotatedFieldName(String annotatedFieldName) voidsetAnnountationEntries(InterceptorCommonLibrary.AnnotationEntries<T> annountationEntries) voidsetConfiguredPolicy(InterceptorCommonLibrary.ConfiguredPolicy<T> configuredPolicy) voidvoidsetConversionResults(List<ConversionResult<T>> conversionResults) voidsetCurrentConversionResult(ConversionResult<T> currentConversionResult) voidsetCurrentNonConversionValidationResult(List<ValidationResult> currentValidationResults) voidsetCurrentParsedParameter(ParsedParameter currentParsedParameter) voidsetCurrentParsedValue(T currentParsedValue) voidsetCurrentPostConversionValidationResults(List<ValidationResult> currentPostConversionValidationResult) voidsetFieldMultiplicity(InterceptorCommonLibrary.FieldMultiplicity fieldMultiplicity) voidsetFieldParsedParameterList(FieldParsedParameterList fieldParsedParameterList) voidsetFieldUsage(InterceptorCommonLibrary.FieldUsage<T> fieldUsage) voidsetIndex(int index) static <T> voidvoidsetListPostConversionValidationResults(List<ValidationResult> listPostConversionValidationResults) voidsetNonConversionValidationResults(List<List<ValidationResult>> nonConversionValidationResults) voidsetPairFieldMultiplicity(InterceptorCommonLibrary.FieldMultiplicity pairFieldMultiplicity) voidsetPairFieldUsage(InterceptorCommonLibrary.PairFieldUsage<T> pairFieldUsage) voidsetParsedParameters(List<ParsedParameter> parsedParameters) voidsetParsedValues(List<T> parsedValues) voidsetPostConversionValidationResults(List<List<ValidationResult>> postConversionValidationResults) void
-
Constructor Details
-
FieldContext
protected FieldContext()
-
-
Method Details
-
getInstance
-
setInstance
-
getAnyConversionFailed
public boolean getAnyConversionFailed()Returns whether conversion or list conversion failed of any parameter. -
getAnyNonConversionValidationFailed
public boolean getAnyNonConversionValidationFailed()Returns whether any non-conversion validation failed of any parameter. -
getAnyPostConversionValidationFailed
public boolean getAnyPostConversionValidationFailed()Returns whether any post conversion validation failed of any parameter. -
getAnyParsedParameterFailed
public boolean getAnyParsedParameterFailed()Returns whether processing of any parameter failed. -
getCurrentConversionFailed
public boolean getCurrentConversionFailed()Returns whether conversion or list conversion failed for current parameter. -
getCurrentConversionResult
Returns results of conversions of parameter currently being processed. -
setCurrentConversionResult
-
getCurrentNonConversionValidationFailed
public boolean getCurrentNonConversionValidationFailed()Returns whether any non-conversion validation failed for current parameter. -
getCurrentNonConversionValidationResults
Returns result of non-conversion validations of parameter currently being processed. -
setCurrentNonConversionValidationResult
public void setCurrentNonConversionValidationResult(List<ValidationResult> currentValidationResults) -
getCurrentParsedParameter
Returns result of non-conversion validations of parameter currently being processed. -
setCurrentParsedParameter
-
getCurrentParsedValue
Returns converted value, successful or not, of parameter currently being processed -
setCurrentParsedValue
-
getCurrentPostConversionValidationFailed
public boolean getCurrentPostConversionValidationFailed()Returns whether any post conversion validation failed for current parameter. -
getCurrentPostConversionValidationResults
Returns results of post-conversion validation of parameter currently being processed. -
setCurrentPostConversionValidationResults
public void setCurrentPostConversionValidationResults(List<ValidationResult> currentPostConversionValidationResult) -
getParsedParameterFailed
public boolean getParsedParameterFailed()Returns whether processing a parameter failed validation or conversion. -
getStep
Returns current, field-level processing step. -
setStep
-
getConversionMode
Returns conversion mode, defining how form field is set from a request parameter. -
setConversionMode
public void setConversionMode(DefaultAnnotationValidator.FieldContext.ConversionMode conversionMode) -
getFieldParsedParameterList
Returns the list of parsed request parameters applying to the form field. -
setFieldParsedParameterList
-
getFieldUsage
Returns field and configured policies to apply except for pair conversion mode. -
setFieldUsage
-
getPairFieldUsage
Returns field and configured policies to apply for pair conversion mode. -
setPairFieldUsage
-
getAnnountationEntries
Returns configured policies to apply. -
setAnnountationEntries
public void setAnnountationEntries(InterceptorCommonLibrary.AnnotationEntries<T> annountationEntries) -
getAnnotatedFieldName
Returns name of field, which is the string field in a pair conversion. -
setAnnotatedFieldName
-
getFieldMultiplicity
Returns whether field, or formatted half of a pair field, is single value, array or collection. -
setFieldMultiplicity
-
getPairFieldMultiplicity
Returns whether unformatted half of pair field is single value, array or collection. Ignored if not using pair conversion. -
setPairFieldMultiplicity
public void setPairFieldMultiplicity(InterceptorCommonLibrary.FieldMultiplicity pairFieldMultiplicity) -
getParsedParameters
Returns parsed parameters for field, which is just one for single value fields. -
setParsedParameters
-
getIndex
public int getIndex()Returns index (0 based) of request parameter value being processed. -
setIndex
public void setIndex(int index) -
getConfiguredPolicy
Returns the policy being processed. -
setConfiguredPolicy
-
getNonConversionValidationResults
Returns results of non-conversion validations of each parameter for field. -
setNonConversionValidationResults
public void setNonConversionValidationResults(List<List<ValidationResult>> nonConversionValidationResults) -
getConversionResults
Returns results of conversions of each parameter for field. -
setConversionResults
-
getParsedValues
Returns converted values, successful or not. Use index to get the currently processed value. -
setParsedValues
-
getPostConversionValidationResults
Returns results of post-conversion validations of each parameter for field. -
setPostConversionValidationResults
public void setPostConversionValidationResults(List<List<ValidationResult>> postConversionValidationResults) -
getListPostConversionValidationResults
Returns results of list post conversion validations. -
setListPostConversionValidationResults
public void setListPostConversionValidationResults(List<ValidationResult> listPostConversionValidationResults)
-