com.jaxfront.core.error
Class AbstractError

java.lang.Object
  extended by com.jaxfront.core.error.AbstractError
All Implemented Interfaces:
Error
Direct Known Subclasses:
ConditionalError, UserError, ValidationError

public abstract class AbstractError
extends java.lang.Object
implements Error

This class represents a ValidationError. ValidationErrors occur, if any value changes of the JAXFront DOM are not conform with the rules defined in the XUI document.

Version:
1.50

Field Summary
static int ALL_ERROR
           
static int CONDITIONAL_ERROR
           
static int USER_ERROR
           
static int VALIDATION_ERROR
           
 
Fields inherited from interface com.jaxfront.core.error.Error
CLASSIFICATION_ERROR, CLASSIFICATION_HINT, CLASSIFICATION_INCOMPLETE, CLASSIFICATION_INFO, CLASSIFICATION_QUESTION, CLASSIFICATION_WARNING
 
Constructor Summary
AbstractError(java.lang.Object identifierObject, Type source)
           
AbstractError(Type source)
          Creates a new ValidationError based on a nestec excpetion and the source type.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
abstract  java.lang.String getClassification()
          Returns the classification type of this error.
 Type getErrorHolder()
          Gets the source type on which the ValidationError occured.
 java.lang.String getHolderXPath()
          Returns the xpath location of the source type.
 java.lang.String getMessageClassification()
          Returns the translated classification of this error.
abstract  java.lang.String getMessageClassificationForIcon()
          Returns the message classification for a icon.
 java.lang.String getMessageContext()
          Returns the context xpath of this error. e.q.: /item[3]/partNum
 javax.swing.ImageIcon getMessageContextIcon()
          Returns the tree icon of the source type of this error.
 javax.swing.ImageIcon getMessageIcon()
          Returns the corresponding message object of the current Validation Error.
 Type getRaiser()
          Gets the source type on which the ValidationError occured.
 java.lang.Object getUniqueIdentification()
           
 boolean isCardinalityError()
           
 boolean isMandatoryError()
           
 void markError()
          Makes the validation error visible on the source type's visualizer.
 void release()
           
 void resetError()
          Removes the validation error from the source type's visualizer.
 void setFocus()
          Sets the focus to the source type's visualizer.
 void setRaiser(Type raiser)
          Gets the source type on which the ValidationError occured.
 boolean shouldMarkError()
          Returns true if error is of type INCOMPLETE or ERROR.
 java.lang.String toString()
          Returns the current validation exception as String.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.jaxfront.core.error.Error
getErrorType, getMessageText, isNeedingUserAcceptance, isShowingDialog
 

Field Detail

ALL_ERROR

public static final int ALL_ERROR
See Also:
Constant Field Values

VALIDATION_ERROR

public static final int VALIDATION_ERROR
See Also:
Constant Field Values

CONDITIONAL_ERROR

public static final int CONDITIONAL_ERROR
See Also:
Constant Field Values

USER_ERROR

public static final int USER_ERROR
See Also:
Constant Field Values
Constructor Detail

AbstractError

public AbstractError(Type source)
Creates a new ValidationError based on a nestec excpetion and the source type.

Parameters:
ex - a ValidationException that occured
source - the type on which the exception occured

AbstractError

public AbstractError(java.lang.Object identifierObject,
                     Type source)
Method Detail

getErrorHolder

public Type getErrorHolder()
Gets the source type on which the ValidationError occured.

Specified by:
getErrorHolder in interface Error
Returns:
the source type on which the ValidationError occured

release

public void release()
Specified by:
release in interface Error

markError

public void markError()
Makes the validation error visible on the source type's visualizer.

Specified by:
markError in interface Error

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

resetError

public void resetError()
Removes the validation error from the source type's visualizer.

Specified by:
resetError in interface Error

setFocus

public void setFocus()
Sets the focus to the source type's visualizer.


toString

public java.lang.String toString()
Returns the current validation exception as String.

Overrides:
toString in class java.lang.Object
Returns:
the current validation exception as String

getMessageClassification

public java.lang.String getMessageClassification()
Returns the translated classification of this error.

Specified by:
getMessageClassification in interface Error

getClassification

public abstract java.lang.String getClassification()
Returns the classification type of this error.

Specified by:
getClassification in interface Error

getMessageClassificationForIcon

public abstract java.lang.String getMessageClassificationForIcon()
Returns the message classification for a icon. In cause of the nls the icon name shouldn't be translate

Returns:

getMessageIcon

public javax.swing.ImageIcon getMessageIcon()
Returns the corresponding message object of the current Validation Error.

Specified by:
getMessageIcon in interface Error
Returns:
Returns a message object.

getHolderXPath

public java.lang.String getHolderXPath()
Returns the xpath location of the source type.

Specified by:
getHolderXPath in interface Error

getMessageContext

public java.lang.String getMessageContext()
Returns the context xpath of this error. e.q.: /item[3]/partNum

Specified by:
getMessageContext in interface Error

getMessageContextIcon

public javax.swing.ImageIcon getMessageContextIcon()
Returns the tree icon of the source type of this error.

Specified by:
getMessageContextIcon in interface Error

getUniqueIdentification

public java.lang.Object getUniqueIdentification()
Specified by:
getUniqueIdentification in interface Error

shouldMarkError

public boolean shouldMarkError()
Returns true if error is of type INCOMPLETE or ERROR.

Specified by:
shouldMarkError in interface Error

isMandatoryError

public boolean isMandatoryError()
Specified by:
isMandatoryError in interface Error

isCardinalityError

public boolean isCardinalityError()
Specified by:
isCardinalityError in interface Error

setRaiser

public void setRaiser(Type raiser)
Gets the source type on which the ValidationError occured.


getRaiser

public Type getRaiser()
Gets the source type on which the ValidationError occured.

Specified by:
getRaiser in interface Error
Returns:
the source type on which the ValidationError occured