Package com.atlassian.jira.action
Class MockAction
java.lang.Object
webwork.action.ActionSupport
com.atlassian.jira.action.MockAction
- All Implemented Interfaces:
ErrorCollection,Serializable,webwork.action.Action,webwork.action.IllegalArgumentAware
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.jira.util.ErrorCollection
ErrorCollection.Reason -
Field Summary
Fields inherited from class webwork.action.ActionSupport
command, errorMap, errorMessages, logFields inherited from interface webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddError(String field, String message, ErrorCollection.Reason reason) Add a field-specific error message.voidaddErrorCollection(ErrorCollection errors) Populate this ErrorCollection with general and field-specific errors.voidaddErrorMessage(String message, ErrorCollection.Reason reason) Add error message relating to system state (not field-specific), and a reason.voidaddErrorMessages(Collection errorMessages) Append new error messages to those already collected.voidAppend new field-specific errors to those already collected.voidaddReason(ErrorCollection.Reason reason) Add a reason why the function has not been performed.voidaddReasons(Set<ErrorCollection.Reason> reasons) Add reasons why the function has not been performed.Get error messages, then get rid of them.getFoo()A set of well known reasons why the function has not been performed.booleanWhether any errors (of any type - field-specific or otherwise) have been collected.voidvoidsetReasons(Set<ErrorCollection.Reason> reasons) Set reasons why the function has not been performed.Methods inherited from class webwork.action.ActionSupport
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, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.jira.util.ErrorCollection
addError, addErrorMessage, getErrorMessages, getErrors, setErrorMessages
-
Constructor Details
-
MockAction
public MockAction()
-
-
Method Details
-
getFoo
-
setFoo
-
getFlushedErrorMessages
Description copied from interface:ErrorCollectionGet error messages, then get rid of them.- Specified by:
getFlushedErrorMessagesin interfaceErrorCollection- Returns:
- The (now cleared) error messages.
-
addErrorCollection
Description copied from interface:ErrorCollectionPopulate this ErrorCollection with general and field-specific errors.- Specified by:
addErrorCollectionin interfaceErrorCollection- Parameters:
errors- ErrorCollection whose errors/messages we obtain.
-
addErrorMessages
Description copied from interface:ErrorCollectionAppend new error messages to those already collected.- Specified by:
addErrorMessagesin interfaceErrorCollection- Parameters:
errorMessages- Collection of error strings.
-
addErrors
Description copied from interface:ErrorCollectionAppend new field-specific errors to those already collected.- Specified by:
addErrorsin interfaceErrorCollection- Parameters:
errors- of String: String pairs, eg. {"assignee": "Assignee is required"}
-
hasAnyErrors
public boolean hasAnyErrors()Description copied from interface:ErrorCollectionWhether any errors (of any type - field-specific or otherwise) have been collected.- Specified by:
hasAnyErrorsin interfaceErrorCollection- Returns:
- true if any errors (of any type - field-specific or otherwise) have been collected.
-
addError
Description copied from interface:ErrorCollectionAdd a field-specific error message.- Specified by:
addErrorin interfaceErrorCollection- Parameters:
field- Field name, eg. "assignee"message- Error message.reason- Reason for the error.
-
addErrorMessage
Description copied from interface:ErrorCollectionAdd error message relating to system state (not field-specific), and a reason.- Specified by:
addErrorMessagein interfaceErrorCollection- Parameters:
message- Error message.reason- Reason for the error.
-
addReasons
Description copied from interface:ErrorCollectionAdd reasons why the function has not been performed. The reasons may be used by callers of services to set return codes etc. for example in REST services.- Specified by:
addReasonsin interfaceErrorCollection- Parameters:
reasons- a set of well known reasons why the function has not been performed.
-
addReason
Description copied from interface:ErrorCollectionAdd a reason why the function has not been performed. The reasons may be used by callers of services to set return codes etc. for example in REST services.- Specified by:
addReasonin interfaceErrorCollection- Parameters:
reason- a well known reasons why the function has not been performed.
-
setReasons
Description copied from interface:ErrorCollectionSet reasons why the function has not been performed. The reasons may be used by callers of services to set return codes etc. for example in REST services.- Specified by:
setReasonsin interfaceErrorCollection- Parameters:
reasons- a set of well known reasons why the function has not been performed.
-
getReasons
Description copied from interface:ErrorCollectionA set of well known reasons why the function has not been performed. The reasons may be used by callers of services to set return codes etc. for example in REST services.- Specified by:
getReasonsin interfaceErrorCollection- Returns:
- a set of well known reasons why the function has not been performed.
-