|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.bamboo.utils.error.SimpleErrorCollection
public class SimpleErrorCollection
| Constructor Summary | |
|---|---|
SimpleErrorCollection()
|
|
| Method Summary | |
|---|---|
void |
addError(String field,
String message)
Add a field-specific error message. |
void |
addError(String prefix,
String field,
String message)
Adds a new form validation error with a given prefix. |
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. |
Map |
getFieldErrors()
|
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 |
| 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 Map getFieldErrors()
getFieldErrors in interface ErrorCollectionpublic String toString()
toString in class Object
public void addError(String prefix,
String field,
String message)
ErrorCollection
addError in interface ErrorCollectionprefix - The prefix of the field in . formfield - The id of the form element in errormessage - The error message to display to the user
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||