|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.util.SimpleErrorCollection
public class SimpleErrorCollection
| Constructor Summary | |
|---|---|
SimpleErrorCollection()
|
|
| Method Summary | |
|---|---|
void |
addError(String field,
String message)
Add a field-specific error message. |
void |
addErrorCollection(ErrorCollection errors)
Populate this ErrorCollection with general and field-specific errors. |
void |
addErrorMessage(String message)
Add error message relating to system state (not field-specific). |
void |
addErrorMessages(Collection incomingMessages)
Append new error messages to those already collected. |
void |
addErrors(Map incomingErrors)
Append new field-specific errors to those already collected. |
boolean |
equals(Object o)
|
Collection |
getErrorMessages()
Get all non field-specific error messages. |
Map |
getErrors()
Get all field-specific errors. |
Collection |
getFlushedErrorMessages()
Get error messages, then get rid of them. |
boolean |
hasAnyErrors()
Whether any errors (of any type - field-specific or otherwise) have been collected. |
int |
hashCode()
|
void |
setErrorMessages(Collection errorMessages)
Populate this ErrorCollection with a new set of messages (existing errors are lost). |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleErrorCollection()
| Method Detail |
|---|
public void addError(String field,
String message)
ErrorCollection
addError in interface ErrorCollectionfield - Field name, eg. "assignee"message - Error message.public void addErrorMessage(String message)
ErrorCollection
addErrorMessage in interface ErrorCollectionmessage - Error message.public Collection getErrorMessages()
ErrorCollection
getErrorMessages in interface ErrorCollectionpublic void setErrorMessages(Collection errorMessages)
ErrorCollection
setErrorMessages in interface ErrorCollectionerrorMessages - List of error message Strings.public Collection getFlushedErrorMessages()
ErrorCollection
getFlushedErrorMessages in interface ErrorCollectionpublic Map getErrors()
ErrorCollection
getErrors in interface ErrorCollectionpublic void addErrorCollection(ErrorCollection errors)
ErrorCollection
addErrorCollection in interface ErrorCollectionerrors - ErrorCollection whose errors/messages we obtain.public void addErrorMessages(Collection incomingMessages)
ErrorCollection
addErrorMessages in interface ErrorCollectionincomingMessages - Collection of error strings.public void addErrors(Map incomingErrors)
ErrorCollection
addErrors in interface ErrorCollectionincomingErrors - of String: String pairs, eg. {"assignee": "Assignee is required"}public boolean hasAnyErrors()
ErrorCollection
hasAnyErrors in interface ErrorCollectionpublic String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||