Package com.spun.util.servlets
Class ValidationError
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.spun.util.servlets.ValidationError
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionValidationError(Enum<?>[] enumumations) ValidationError(String[] assertions) -
Method Summary
Modifier and TypeMethodDescriptionadd(String prefix, int index, ValidationError error) add(String prefix, ValidationError error) addForRange(String prefix, int startInclusive, int endExclusive, ValidationError error) voidString[]getErrorDescription(Enum<?> assertion) getErrorDescription(String assertion) This get the description of the errorstatic StringgetPrefixForIndex(String prefix, int index) booleanisOk()booleanisOnlyProblem(Enum<?> e) booleanbooleanvoidvoidvoidsetIfValid(String assertion, boolean isError, String errorDescription) intsize()toString()Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
EMPTY
-
-
Constructor Details
-
ValidationError
-
ValidationError
-
ValidationError
public ValidationError()
-
-
Method Details
-
getMessage
- Overrides:
getMessagein classThrowable
-
toString
-
getTracker
-
set
-
setError
-
setIfValid
-
add
-
addForRange
public ValidationError addForRange(String prefix, int startInclusive, int endExclusive, ValidationError error) -
getPrefixForIndex
-
add
-
isOk
public boolean isOk() -
isValid
-
isValid
-
size
public int size() -
getErrorDescription
-
getErrorDescription
This get the description of the error- Returns:
- The text description of the error or "" if the assertion was valid
-
getAllErrorTitles
-
assertValid
public void assertValid() -
isOnlyProblem
-