|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.util.SimpleErrorCollection
Field Summary | |
(package private) List |
errorMessages
|
(package private) Map |
errors
|
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. |
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. |
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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
Map errors
List errorMessages
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()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |