|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
com.adaptc.mws.plugins.WebServiceException
public class WebServiceException extends Throwable
This exception is designed to be thrown from a plugin's custom web service. It has fields for specifying the messages to be returned as well as the HTTP response code.
Field Summary | |
---|---|
private List |
messages
|
private Integer |
responseCode
|
private static long |
serialVersionUID
|
Constructor Summary | |
WebServiceException()
Empty constructor. |
|
WebServiceException(String message)
If no additional values are set, this will return a list of messages containing the specified message as the single element and a 500 error. |
|
WebServiceException(Integer responseCode)
If no additional values are set, this will return the default message and the specified response code. |
|
WebServiceException(String message, Integer responseCode)
This will return a list of errors containing the specified message and the specified response code. |
|
WebServiceException(List messages, Integer responseCode)
This will return the list of errors specified and the specified response code. |
Method Summary | |
---|---|
List
|
getMessages()
Retrieves the list of messages for this exception. |
Integer
|
getResponseCode()
Retrieves the HTTP response code for this exception. |
void
|
setMessages(String message)
Sets the messages to a list with a single element as the specified message. |
void
|
setMessages(List messages)
Sets the messages to the specified list. |
void
|
setResponseCode(Integer responseCode)
Sets the response code for this exception. |
Methods inherited from class Throwable | |
---|---|
printStackTrace, printStackTrace, printStackTrace, fillInStackTrace, getCause, initCause, toString, getMessage, getLocalizedMessage, getStackTrace, setStackTrace, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll |
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail |
---|
private List messages
private Integer responseCode
private static final long serialVersionUID
Constructor Detail |
---|
public WebServiceException()
public WebServiceException(String message)
message
- A message to return to the user
public WebServiceException(Integer responseCode)
responseCode
- The HTTP response code to return to the user
public WebServiceException(String message, Integer responseCode)
message
- A message to return to the userresponseCode
- HTTP The response code to return to the user
public WebServiceException(List messages, Integer responseCode)
messages
- A list of messages to return to the userresponseCode
- The HTTP response code to return to the user
Method Detail |
---|
public List getMessages()
public Integer getResponseCode()
public void setMessages(String message)
message
- A message to return to the user
public void setMessages(List messages)
messages
- A list of messages to return to the user
public void setResponseCode(Integer responseCode)
responseCode
- The HTTP response code to return to the user
Groovy Documentation