public class MockAction extends webwork.action.ActionSupport implements ErrorCollection
ErrorCollection.Reason| Constructor and Description |
|---|
MockAction() |
| Modifier and Type | Method and Description |
|---|---|
void |
addError(String field,
String message,
ErrorCollection.Reason reason)
Add a field-specific error message.
|
void |
addErrorCollection(ErrorCollection errors)
Populate this ErrorCollection with general and field-specific errors.
|
void |
addErrorMessage(String message,
ErrorCollection.Reason reason)
Add error message relating to system state (not field-specific), and a reason.
|
void |
addErrorMessages(Collection errorMessages)
Append new error messages to those already collected.
|
void |
addErrors(Map errors)
Append new field-specific errors to those already collected.
|
void |
addReason(ErrorCollection.Reason reason)
Add a reason why the function has not been performed.
|
void |
addReasons(Set<ErrorCollection.Reason> reasons)
Add reasons why the function has not been performed.
|
Collection<String> |
getFlushedErrorMessages()
Get error messages, then get rid of them.
|
String |
getFoo() |
Set<ErrorCollection.Reason> |
getReasons()
A set of well known reasons why the function has not been performed.
|
boolean |
hasAnyErrors()
Whether any errors (of any type - field-specific or otherwise) have been collected.
|
void |
setFoo(String foo) |
void |
setReasons(Set<ErrorCollection.Reason> reasons)
Set reasons why the function has not been performed.
|
addError, addErrorMessage, addIllegalArgumentException, doDefault, doExecute, doValidation, execute, getActionName, getCommandName, getErrorMessages, getErrors, getHasErrorMessages, getHasErrors, getLocale, getPropertyEditorMessage, getText, getTexts, getTexts, getTimezone, invalidInput, invokeCommand, isCommand, setCommand, setErrorMessages, setErrors, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddError, addErrorMessage, getErrorMessages, getErrors, setErrorMessagespublic String getFoo()
public void setFoo(String foo)
public Collection<String> getFlushedErrorMessages()
ErrorCollectiongetFlushedErrorMessages in interface ErrorCollectionpublic void addErrorCollection(ErrorCollection errors)
ErrorCollectionaddErrorCollection in interface ErrorCollectionerrors - ErrorCollection whose errors/messages we obtain.public void addErrorMessages(Collection errorMessages)
ErrorCollectionaddErrorMessages in interface ErrorCollectionerrorMessages - Collection of error strings.public void addErrors(Map errors)
ErrorCollectionaddErrors in interface ErrorCollectionerrors - of String: String pairs, eg. {"assignee": "Assignee is required"}public boolean hasAnyErrors()
ErrorCollectionhasAnyErrors in interface ErrorCollectionpublic void addError(String field, String message, ErrorCollection.Reason reason)
ErrorCollectionaddError in interface ErrorCollectionfield - Field name, eg. "assignee"message - Error message.reason - Reason for the error.public void addErrorMessage(String message, ErrorCollection.Reason reason)
ErrorCollectionaddErrorMessage in interface ErrorCollectionmessage - Error message.reason - Reason for the error.public void addReasons(Set<ErrorCollection.Reason> reasons)
ErrorCollectionaddReasons in interface ErrorCollectionreasons - a set of well known reasons why the function has not been performed.public void addReason(ErrorCollection.Reason reason)
ErrorCollectionaddReason in interface ErrorCollectionreason - a well known reasons why the function has not been performed.public void setReasons(Set<ErrorCollection.Reason> reasons)
ErrorCollectionsetReasons in interface ErrorCollectionreasons - a set of well known reasons why the function has not been performed.public Set<ErrorCollection.Reason> getReasons()
ErrorCollectiongetReasons in interface ErrorCollectionCopyright © 2002-2019 Atlassian. All Rights Reserved.