Package com.atlassian.jira.rest.api.util
Class ErrorCollection
java.lang.Object
com.atlassian.jira.rest.api.util.ErrorCollection
- All Implemented Interfaces:
Serializable
A JAXB representation of an
ErrorCollection
useful for returning via JSON or XML.- Since:
- v4.2
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddErrorCollection
(ErrorCollection errorCollection) Adds all the errors and error messages that are in the given error collection to this error collection.addErrorCollection
(ErrorCollection errorCollection) Adds all the errors and error messages that are in the given error collection to this error collection.addErrorMessage
(String errorMessage) Adds the given error message to this error collection.addErrorMessages
(Collection<String> messages) Adds the given error messages to this error collection.boolean
boolean
Returns true if this error collection contains errors or error messages.int
hashCode()
static ErrorCollection
of
(ErrorCollection errorCollection) Returns a new ErrorCollection containing all the errors contained in the input error collection.static ErrorCollection
Returns a new ErrorCollection containing a list of error messages.static ErrorCollection
of
(Collection<String> messages) Returns a new ErrorCollection containing a list of error messages.reason
(ErrorCollection.Reason reason) toString()
-
Constructor Details
-
ErrorCollection
public ErrorCollection()
-
-
Method Details
-
of
Returns a new ErrorCollection containing a list of error messages.- Parameters:
messages
- an array of Strings containing error messages- Returns:
- a new ErrorCollection
-
of
Returns a new ErrorCollection containing a list of error messages.- Parameters:
messages
- an Iterable of Strings containing error messages- Returns:
- a new ErrorCollection
-
of
Returns a new ErrorCollection containing all the errors contained in the input error collection.- Parameters:
errorCollection
- a com.atlassian.jira.util.ErrorCollection- Returns:
- a new ErrorCollection
-
addErrorCollection
Adds all the errors and error messages that are in the given error collection to this error collection.- Parameters:
errorCollection
- an ErrorCollection- Returns:
- this
-
addErrorCollection
Adds all the errors and error messages that are in the given error collection to this error collection.- Parameters:
errorCollection
- an ErrorCollection- Returns:
- this
-
addErrorMessage
Adds the given error message to this error collection.- Parameters:
errorMessage
- a String containing an error message- Returns:
- this
-
addErrorMessages
Adds the given error messages to this error collection.- Parameters:
messages
- a collection of Strings containing error messages- Returns:
- this
-
hasAnyErrors
public boolean hasAnyErrors()Returns true if this error collection contains errors or error messages.- Returns:
- true if this error collection contains errors or error messages.
-
getErrorMessages
-
getErrors
-
reason
-
getStatus
-
hashCode
public int hashCode() -
equals
-
toString
-