|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 ErrorCollection
field
- Field name, eg. "assignee"message
- Error message.public void addErrorMessage(String message)
ErrorCollection
addErrorMessage
in interface ErrorCollection
message
- Error message.public Collection getErrorMessages()
ErrorCollection
getErrorMessages
in interface ErrorCollection
public void setErrorMessages(Collection errorMessages)
ErrorCollection
setErrorMessages
in interface ErrorCollection
errorMessages
- List of error message String
s.public Collection getFlushedErrorMessages()
ErrorCollection
getFlushedErrorMessages
in interface ErrorCollection
public Map getErrors()
ErrorCollection
getErrors
in interface ErrorCollection
public void addErrorCollection(ErrorCollection errors)
ErrorCollection
addErrorCollection
in interface ErrorCollection
errors
- ErrorCollection whose errors/messages we obtain.public void addErrorMessages(Collection incomingMessages)
ErrorCollection
addErrorMessages
in interface ErrorCollection
incomingMessages
- Collection of error strings.public void addErrors(Map incomingErrors)
ErrorCollection
addErrors
in interface ErrorCollection
incomingErrors
- of String: String pairs, eg. {"assignee": "Assignee is required"}public boolean hasAnyErrors()
ErrorCollection
hasAnyErrors
in interface ErrorCollection
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |