|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.rest.api.util.ErrorCollection
public class ErrorCollection
A JAXB representation of an ErrorCollection useful for returning via JSON or XML.
| Constructor Summary | |
|---|---|
ErrorCollection()
|
|
| Method Summary | |
|---|---|
ErrorCollection |
addErrorCollection(ErrorCollection errorCollection)
Adds all the errors and error messages that are in the given error collection to this error collection. |
ErrorCollection |
addErrorMessage(String errorMessage)
Adds the given error message to this error collection. |
ErrorCollection |
addErrorMessages(Collection<String> messages)
Adds the given error messages to this error collection. |
boolean |
equals(Object o)
|
Collection<String> |
getErrorMessages()
|
Map<String,String> |
getErrors()
|
Integer |
getStatus()
|
boolean |
hasAnyErrors()
Returns true if this error collection contains errors or error messages. |
int |
hashCode()
|
static ErrorCollection |
of(Collection<String> messages)
Returns a new ErrorCollection containing a list of error messages. |
static ErrorCollection |
of(ErrorCollection errorCollection)
Returns a new ErrorCollection containing all the errors contained in the input error collection. |
static ErrorCollection |
of(String... messages)
Returns a new ErrorCollection containing a list of error messages. |
ErrorCollection |
reason(ErrorCollection.Reason reason)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ErrorCollection()
| Method Detail |
|---|
public static ErrorCollection of(String... messages)
messages - an array of Strings containing error messages
public static ErrorCollection of(Collection<String> messages)
messages - an Iterable of Strings containing error messages
public static ErrorCollection of(ErrorCollection errorCollection)
errorCollection - a com.atlassian.jira.util.ErrorCollection
public ErrorCollection addErrorCollection(ErrorCollection errorCollection)
errorCollection - an ErrorCollection
public ErrorCollection addErrorMessage(String errorMessage)
errorMessage - a String containing an error message
public ErrorCollection addErrorMessages(Collection<String> messages)
messages - a collection of Strings containing error messages
public boolean hasAnyErrors()
public Collection<String> getErrorMessages()
public Map<String,String> getErrors()
public ErrorCollection reason(ErrorCollection.Reason reason)
public Integer getStatus()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||