|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.jaxfront.core.schema.ValidationException
public class ValidationException
This exception is thrown if setting a value to a JAXFront type violates a XML Schema facet restriction, a cardinality restriction or a user defined cross field validation (xui rule).
SimpleType.validate(String,boolean)
,
Serialized FormField Summary | |
---|---|
static int |
CARDINALITY_EXCEPTION
|
static int |
DUPLICATE_ID_EXCEPTION
|
static int |
DUPLICATE_KEY_EXCEPTION
|
static int |
EXCEPTION_NOT_DEFINED
|
static int |
INVALID_CODESET_EXCEPTION
|
static int |
LIST_ADD_ENTRY
|
static int |
LIST_NO_CHANGE
|
static int |
LIST_REMOVE_ENTRY
|
static int |
MANDATORY_EXCEPTION
|
static int |
MISSING_KEY_EXCEPTION
|
Constructor Summary | |
---|---|
ValidationException(ConditionExpression condition)
Creates a ValidationException based on a Condition. |
|
ValidationException(Type source)
Creates a ValidationException based on user specific message. |
|
ValidationException(Type source,
boolean needingUserAcceptance)
Creates a ValidationException based on a user specific text message and a flag saying that the occurance of this exception needs a user commitment. |
|
ValidationException(Type source,
boolean needingUserAcceptance,
boolean showDialog)
Creates a ValidationException based on a user specific text message and a flag saying that the occurance of this exception needs a user commitment. |
|
ValidationException(Type source,
boolean needingUserAcceptance,
boolean showDialog,
boolean isMandatoryException)
Creates a ValidationException based on a user specific text message and a flag saying that the occurance of this exception needs a user commitment. |
|
ValidationException(Type source,
boolean needingUserAcceptance,
boolean showDialog,
boolean isMandatoryException,
java.lang.String classification)
Creates a ValidationException based on a user specific text message and a flag saying that the occurance of this exception needs a user commitment. |
|
ValidationException(Type source,
java.lang.Exception e,
java.lang.String classification)
Creates a ValidationException based on a nested exception. |
|
ValidationException(Type source,
java.lang.String messageText,
boolean needingUserAcceptance,
boolean showDialog,
boolean isMandatoryException,
java.lang.String classification)
Creates a ValidationException based on a user specific text message and a flag saying that the occurance of this exception needs a user commitment. |
Method Summary | |
---|---|
static ValidationException |
createCardinalityException(ListType type)
Factory method to create a cardinality violation exception. |
static ValidationException |
createDuplicateIDException(SimpleType type,
java.lang.String invalidValue)
Factory method to create a duplicate ID exception. |
static ValidationException |
createDuplicateKeyException(SimpleType type,
java.lang.String invalidValue)
Factory method to create a duplicate key exception. |
static ValidationException |
createInvalidCodeSetCodeException(SimpleType type,
java.lang.String invalidValue)
Factory method to create an invalid codeset value exception. |
static ValidationException |
createMandatoryException(Type type)
Factory method to create a mandatory violation exception. |
static ValidationException |
createMissingKeyException(SimpleType type,
java.lang.String invalidValue)
Factory method to create a duplicate key exception. |
java.lang.String |
getClassification()
Returns the classification of this exception. |
ConditionExpression |
getCondition()
Returns the underlying condition or null; |
int |
getExceptionType()
|
java.lang.String |
getMessage()
Returns the validation text message. |
java.lang.Exception |
getOccuredException()
|
Type |
getSource()
|
boolean |
isCardinalityException()
Returns true if this is a cardinality violation exception. |
boolean |
isDuplicateIDException()
Returns true if this is a cardinality violation exception. |
boolean |
isDuplicateKeyException()
Returns true if this is a cardinality violation exception. |
boolean |
isMandatoryException()
Returns true if this is a mandatory violation exception. |
boolean |
isMissingKeyException()
Returns true if this is a mandatory violation exception. |
boolean |
isNeedingUserAcceptance()
Indicates if a validation exception needs a user commitment. |
boolean |
isShowingDialog()
Returns true if this exception should be shown in a dialog when catched. |
void |
setClassification(java.lang.String classification)
Sets the classification for this exception. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int EXCEPTION_NOT_DEFINED
public static final int MANDATORY_EXCEPTION
public static final int CARDINALITY_EXCEPTION
public static final int DUPLICATE_KEY_EXCEPTION
public static final int MISSING_KEY_EXCEPTION
public static final int INVALID_CODESET_EXCEPTION
public static final int DUPLICATE_ID_EXCEPTION
public static final int LIST_NO_CHANGE
public static final int LIST_ADD_ENTRY
public static final int LIST_REMOVE_ENTRY
Constructor Detail |
---|
public ValidationException(ConditionExpression condition)
condition
- condition which caused a ValidationExceptionpublic ValidationException(Type source, boolean needingUserAcceptance, boolean showDialog, boolean isMandatoryException, java.lang.String classification)
source
- exception sourceclassification
- the classification of the message (e.g. warning, hint, information,...)showDialog
- if true, the message will be shown in a dialogneedingUserAceptance
- a flag saying if this validation exception needs a user commitmentisMandatoryException
- a flag saying if this validation is a mandatory exceptionpublic ValidationException(Type source, boolean needingUserAcceptance, boolean showDialog, boolean isMandatoryException)
source
- exception sourceshowDialog
- if true, the message will be shown in a dialogneedingUserAceptance
- a flag saying if this validation exception needs a user commitmentisMandatoryException
- a flag saying if this validation is a mandatory exceptionpublic ValidationException(Type source, boolean needingUserAcceptance, boolean showDialog)
source
- exception sourceshowDialog
- true if the message should be displayed in a dialogneedingUserAceptance
- a flag saying if this validation exception needs a user commitmentpublic ValidationException(Type source, boolean needingUserAcceptance)
source
- exception sourceneedingUserAceptance
- a flag saying if this validation exception needs a user commitmentpublic ValidationException(Type source, java.lang.Exception e, java.lang.String classification)
e
- nested validation exceptionclassification
- validation classificationpublic ValidationException(Type source, java.lang.String messageText, boolean needingUserAcceptance, boolean showDialog, boolean isMandatoryException, java.lang.String classification)
source
- exception sourcemessageText
- message textclassification
- the classification of the message (e.g. warning, hint, information,...)showDialog
- if true, the message will be shown in a dialogneedingUserAceptance
- a flag saying if this validation exception needs a user commitmentisMandatoryException
- a flag saying if this validation is a mandatory exceptionpublic ValidationException(Type source)
source
- exception sourceMethod Detail |
---|
public static ValidationException createMandatoryException(Type type)
type
- source typepublic static ValidationException createCardinalityException(ListType type)
type
- source typepublic static ValidationException createInvalidCodeSetCodeException(SimpleType type, java.lang.String invalidValue)
type
- source typetext
- message textpublic static ValidationException createDuplicateKeyException(SimpleType type, java.lang.String invalidValue)
type
- source typeinvalidValue
- invalid keypublic static ValidationException createMissingKeyException(SimpleType type, java.lang.String invalidValue)
type
- source typeinvalidValue
- invalid keypublic static ValidationException createDuplicateIDException(SimpleType type, java.lang.String invalidValue)
type
- source typeinvalidValue
- invalid keypublic ConditionExpression getCondition()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public boolean isNeedingUserAcceptance()
public boolean isMandatoryException()
public boolean isCardinalityException()
public boolean isMissingKeyException()
public boolean isDuplicateKeyException()
public boolean isDuplicateIDException()
public int getExceptionType()
public boolean isShowingDialog()
public java.lang.String getClassification()
Message.#getClassification()
public void setClassification(java.lang.String classification)
classification
- public java.lang.Exception getOccuredException()
public Type getSource()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |