|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jaxfront.core.type.ErrorController
public class ErrorController
The TypeController controls any value changes in the underlying JAXFront DOM. If a value changed the TypeController checks all relevant rules defined in the XUI document. He keeps track of all occured validation errors. In case of a validation error, a ValidationChangeEvent gets fired.
Constructor Summary | |
---|---|
ErrorController(TypeController controller)
|
Method Summary | |
---|---|
void |
addError(Error error)
Adds a validationError |
void |
addError(Error error,
boolean shouldFireEvent)
Adds a validationError |
void |
addValidationChangeListener(ValidationChangeListener newListener)
Adds a validationChangeListener. |
void |
fireUnhandledValidationExceptions()
|
java.util.Collection |
getAllErrors()
|
java.util.Collection |
getAllErrors(java.util.Comparator comparator)
|
java.util.Hashtable |
getErrors()
Returns all current validationErrors. |
java.util.Vector |
getErrorsForClassification(java.lang.String errorClassification)
Returns all current validationErrors for the given category (e.g. error, info, question, ...). |
java.util.Vector |
getErrorsForType(Type source)
|
java.util.Vector |
getErrorsForType(Type source,
int errorType)
|
java.util.Vector |
getPageErrors(Type type)
Returns all errors of the given type's represented tree node parent. |
void |
handleValidationException(Type type,
ValidationException exception)
|
boolean |
hasPageErrors(Type type)
Returns whether a type's represented tree node parent has errors or not. |
boolean |
hasValidationErrors()
Returns whether any current validationErrors exist or not. |
boolean |
isBlocked()
|
void |
maintainErrors(Type removedType)
Removes validation errors for all errors where the source type is derived from the passing type. |
void |
release()
Releases rules, validationErrors, validationChangeListener and propertyChangeSupport. |
void |
removeAllErrors(boolean fireEvent)
Removes all current validation errors of the given DOM. |
void |
removeConditionalError(ConditionExpression condition,
Type sourceType)
|
void |
removeError(Error error)
Removes the validationError of the give source type. |
void |
removeError(Error error,
boolean shouldFireEvent)
Removes the validationError of the give source type. |
void |
removeErrors(java.util.List errors)
|
void |
removeMandatoryAndCardinalityValidationErrors()
Removes all mandatory violation exceptions. |
void |
removeMandatoryAndCardinalityValidationErrors(Type type)
Removes all mandatory violation exceptions for a given type. |
void |
removeUserError(java.lang.Object identifierObject,
Type sourceType)
|
void |
removeValidationChangeListener(ValidationChangeListener newListener)
Removes the given ValidationChangeListener. |
void |
removeValidationError(Type sourceType)
|
void |
setBlocked(boolean blocked)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ErrorController(TypeController controller)
Method Detail |
---|
public void addError(Error error)
ex
- a validation exception that should be addedsource
- the type on which the error occuredpublic void addValidationChangeListener(ValidationChangeListener newListener)
newListener
- a validationChangeListener that should be addedpublic void addError(Error error, boolean shouldFireEvent)
ex
- a validation exception that should be addedshouldFireEvent
- indicates if an validationChanged Event should be firedpublic void removeMandatoryAndCardinalityValidationErrors()
public void removeMandatoryAndCardinalityValidationErrors(Type type)
public java.util.Vector getPageErrors(Type type)
type
- a type of which the errors of its represented tree node parent
are returned
public java.util.Vector getErrorsForType(Type source)
public java.util.Vector getErrorsForType(Type source, int errorType)
public java.util.Hashtable getErrors()
public java.util.Vector getErrorsForClassification(java.lang.String errorClassification)
public boolean hasPageErrors(Type type)
type
- the type of which the represented tree node parent will be
checked for errors
public boolean hasValidationErrors()
public void release()
public void removeAllErrors(boolean fireEvent)
dom
- a document for which the validation errors should be removedpublic void removeErrors(java.util.List errors)
public void removeValidationChangeListener(ValidationChangeListener newListener)
listener
- a ValidationChangeListener that should be removedpublic void removeError(Error error)
source
- a type that has an errorpublic void removeConditionalError(ConditionExpression condition, Type sourceType)
public void removeUserError(java.lang.Object identifierObject, Type sourceType)
public void removeValidationError(Type sourceType)
public void removeError(Error error, boolean shouldFireEvent)
source
- a type that has an errorpublic void maintainErrors(Type removedType)
removedType
- type which has been removed from DOMpublic void fireUnhandledValidationExceptions()
public void handleValidationException(Type type, ValidationException exception)
public java.util.Collection getAllErrors()
public java.util.Collection getAllErrors(java.util.Comparator comparator)
public void setBlocked(boolean blocked)
public boolean isBlocked()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |