|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--com.sssw.rt.util.AgoException | +--com.sssw.rt.util.AgoValidationException
Exception thrown by an AgiPropertyValidationListener.
AgiPropertyValidationListener
, Serialized FormField Summary | |
static int |
VALIDATION_FAIL
Indicates that validation test has failed. |
static int |
VALIDATION_SUCCEED
Indicates that validation test succeeded. |
Constructor Summary | |
AgoValidationException(int disposition)
Deprecated. This constructor is deprecated. Use one of the static factory methods; they are more precise. |
|
AgoValidationException(int disposition,
String message,
Object newValue)
Deprecated. This constructor is deprecated. Use one of the static factory methods; they are more precise. |
|
AgoValidationException(String message)
Deprecated. This constructor is deprecated. Use one of the static factory methods; they are more precise. |
Method Summary | |
static AgoValidationException |
correction(Object newValue)
Static factory method which returns an exception indicating a successful validation by specifying a replacement (corrected) value. |
static AgoValidationException |
failure()
Static factory method which returns an exception indicating a validation failure with no associated message. |
static AgoValidationException |
failure(String message)
Static factory method which returns an exception indicating a validation failure with an associated message. |
static AgoValidationException |
failure(String message,
Object newValue)
Static factory method which returns an exception indicating validation failure with an associated message and suggested new value. |
int |
getDisposition()
Returns the disposition code of the exception. |
Object |
getNewValue()
Retrieves the corrected value, if any, from the validation exception. |
static AgoValidationException |
success()
Static factory method which returns an exception indicating a successful validation with no new value. |
Methods inherited from class com.sssw.rt.util.AgoException |
copyTo,
getExceptionHTML,
getExceptionMessage,
getExceptionMessage,
getHTML,
getMessage,
getMessage,
getParentException,
printStackTrace,
printStackTrace,
printStackTrace,
setHTML |
Methods inherited from class java.lang.Throwable |
fillInStackTrace,
getLocalizedMessage,
printStackTrace,
printStackTrace,
printStackTrace,
toString |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Methods implemented from interface com.sssw.rt.util.AgiParentedException |
getExceptionParent |
Field Detail |
public static int VALIDATION_FAIL
public static int VALIDATION_SUCCEED
Constructor Detail |
public AgoValidationException(String message)
message
- A message explaining the failurepublic AgoValidationException(int disposition)
disposition
- Specifies whether the validation succeeded or failed.public AgoValidationException(int disposition, String message, Object newValue)
disposition
- Specifies whether the validation succeeded or failed.message
- A validation error message. Used if the disposition
indicates failure.newValue
- A replacement value. This new value is used instead
of the proposed value, even if null.Method Detail |
public static AgoValidationException failure()
public static AgoValidationException failure(String message)
message
- A message explaining the failurepublic static AgoValidationException failure(String message, Object newValue)
message
- A message explaining the failurenewValue
- A suggested new valuepublic static AgoValidationException success()
public static AgoValidationException correction(Object newValue)
newValue
- A new value for the control property.
The value of this parameter is used even if null is passed.public Object getNewValue()
// Log that a correction has occurred String corrected = (String)exc.getNewValue(); correctionLog.println("Value corrected to: "+corrected);
AgoValidationException.getDisposition()
public int getDisposition()
int d = exc.getDisposition();
AgoValidationException.getNewValue()
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |