|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.wfxml.WfXMLException
public class WfXMLException
This class represents WfXML exceptions as they are defined in the WfXML
specification.
According to the specification, WfXML exceptions can occur in all response
messages. Use the WfXMLMessage.setException(com.groiss.wfxml.WfXMLException) method if you want to
return an exception in a message.
When you receive a response message and want to do something with it, you should
first check if it contains an excetpion with the WfXMLMessage.getException()
method.
| Field Summary | |
|---|---|
static char |
TYPE_FATAL
|
static char |
TYPE_TEMP
|
static int |
WF_ELEMENT_MISSING
|
static int |
WF_INVALID_CONTEXT_DATA
|
static int |
WF_INVALID_KEY
|
static int |
WF_INVALID_NOTIFICATION_NAME
|
static int |
WF_INVALID_OBSERVER_FOR_RESOURCE
|
static int |
WF_INVALID_OPERATION_SPECIFICATION
|
static int |
WF_INVALID_PROCESS_DEFINITION
|
static int |
WF_INVALID_PROCESS_INSTANCE_KEY
|
static int |
WF_INVALID_REQUEST_ID
|
static int |
WF_INVALID_RESPONSE_REQUIRED_VALUE
|
static int |
WF_INVALID_RESULT_DATA
|
static int |
WF_INVALID_STATE_TRANSITION
|
static int |
WF_INVALID_VERSION
|
static int |
WF_INVALUD_RESULT_DATA_SET
|
static int |
WF_MISSING_NOTIFICATION_NAME
|
static int |
WF_MISSING_PROCESS_INSTANCE_KEY
|
static int |
WF_NO_ACCESS_TO_RESOURCE
|
static int |
WF_NO_AUTHORIZATION
|
static int |
WF_OPERATION_FAILED
|
static int |
WF_OTHER
Error code for self defined errors. |
static int |
WF_OTHER_LISTENER_VETOED
Sub code error which is returned if a listener vetoes and a request message is not performed. |
static int |
WF_PARSING_ERROR
|
| Constructor Summary | |
|---|---|
WfXMLException(int mainCode,
char type,
java.lang.String subject)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getDescription()
Returns a more detailed description for the exception. |
int |
getMainCode()
Returns the main code of the exception. |
int |
getSubCode()
Returns the sub code. |
java.lang.String |
getSubject()
Returns the subject of the exception or null if no subject is defined. |
char |
getType()
Returns the exception type. |
boolean |
isValid()
Checks if the obligatory values 'main code', 'subject', and 'type' are set. |
void |
setDescription(java.lang.String description)
Add a description to the exception. |
void |
setMainCode(int code)
Set the main code for the exception. |
void |
setSubCode(int code)
Set a subcode for the Exception. |
void |
setSubject(java.lang.String subject)
Set a subject for the exception. |
void |
setType(char type)
Set the type of the Exception. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char TYPE_FATAL
public static final char TYPE_TEMP
public static final int WF_PARSING_ERROR
public static final int WF_ELEMENT_MISSING
public static final int WF_INVALID_VERSION
public static final int WF_INVALID_RESPONSE_REQUIRED_VALUE
public static final int WF_INVALID_KEY
public static final int WF_INVALID_OPERATION_SPECIFICATION
public static final int WF_INVALID_REQUEST_ID
public static final int WF_INVALID_CONTEXT_DATA
public static final int WF_INVALID_RESULT_DATA
public static final int WF_INVALUD_RESULT_DATA_SET
public static final int WF_NO_AUTHORIZATION
public static final int WF_OPERATION_FAILED
public static final int WF_NO_ACCESS_TO_RESOURCE
public static final int WF_INVALID_PROCESS_DEFINITION
public static final int WF_MISSING_PROCESS_INSTANCE_KEY
public static final int WF_INVALID_PROCESS_INSTANCE_KEY
public static final int WF_INVALID_STATE_TRANSITION
public static final int WF_INVALID_OBSERVER_FOR_RESOURCE
public static final int WF_MISSING_NOTIFICATION_NAME
public static final int WF_INVALID_NOTIFICATION_NAME
public static final int WF_OTHER
public static final int WF_OTHER_LISTENER_VETOED
| Constructor Detail |
|---|
public WfXMLException(int mainCode,
char type,
java.lang.String subject)
| Method Detail |
|---|
public void setMainCode(int code)
code - The code for this exception. All possible values are defined
as static fields of this class, so you should use one of this
values. If you want to define your own exceptions, use main code
WF_OTHER (800) and add an arbitrary sub code.public int getMainCode()
public void setSubCode(int code)
WF_OTHER (800) for your own exceptions.
code - Integer Value representing the sub code.public int getSubCode()
0.
0 if no sub code is defined.
public void setType(char type)
throws java.lang.IllegalArgumentException
type - The type that you want to set. Use either TYPE_FATAL or TYPE_TEMP.
java.lang.IllegalArgumentException - if you attempt to set any other type.public char getType()
0.public void setSubject(java.lang.String subject)
subject - A String representing the subject that you want to set.public java.lang.String getSubject()
null if no subject is defined.
null.public void setDescription(java.lang.String description)
description - A String containing the description that you want to set
for this exception.public java.lang.String getDescription()
null if no
decription was set.public boolean isValid()
true if the exception contains all required values, or
false if one or more parts are missing.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||