public class

ErrorCollection

extends Object
java.lang.Object
   ↳ com.atlassian.jira.rest.api.util.ErrorCollection

Class Overview

A JAXB representation of an ErrorCollection useful for returning via JSON or XML.

Summary

Public Constructors
ErrorCollection()
Public Methods
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<StringString> getErrors()
Integer getStatus()
boolean hasAnyErrors()
Returns true if this error collection contains errors or error messages.
int hashCode()
static ErrorCollection of(String... messages)
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.
static ErrorCollection of(ErrorCollection errorCollection)
Returns a new ErrorCollection containing all the errors contained in the input error collection.
ErrorCollection reason(ErrorCollection.Reason reason)
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ErrorCollection ()

Public Methods

public ErrorCollection addErrorCollection (ErrorCollection errorCollection)

Adds all the errors and error messages that are in the given error collection to this error collection.

Parameters
errorCollection an ErrorCollection
Returns
  • this

public ErrorCollection addErrorMessage (String errorMessage)

Adds the given error message to this error collection.

Parameters
errorMessage a String containing an error message
Returns
  • this

public ErrorCollection addErrorMessages (Collection<String> messages)

Adds the given error messages to this error collection.

Parameters
messages a collection of Strings containing error messages
Returns
  • this

public boolean equals (Object o)

public Collection<String> getErrorMessages ()

public Map<StringString> getErrors ()

public Integer getStatus ()

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.

public int hashCode ()

public static ErrorCollection of (String... messages)

Returns a new ErrorCollection containing a list of error messages.

Parameters
messages an array of Strings containing error messages
Returns
  • a new ErrorCollection

public static ErrorCollection of (Collection<String> messages)

Returns a new ErrorCollection containing a list of error messages.

Parameters
messages an Iterable of Strings containing error messages
Returns
  • a new ErrorCollection

public static ErrorCollection of (ErrorCollection errorCollection)

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

public ErrorCollection reason (ErrorCollection.Reason reason)

public String toString ()