|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwebwork.action.ActionSupport
com.atlassian.jira.action.MockAction
public class MockAction
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, log |
Fields inherited from interface webwork.action.Action |
---|
ERROR, INPUT, LOGIN, NONE, SUCCESS |
Constructor Summary | |
---|---|
MockAction()
|
Method Summary | |
---|---|
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. |
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, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.jira.util.ErrorCollection |
---|
addError, addErrorMessage, getErrorMessages, getErrors, setErrorMessages |
Constructor Detail |
---|
public MockAction()
Method Detail |
---|
public String getFoo()
public void setFoo(String foo)
public Collection<String> getFlushedErrorMessages()
ErrorCollection
getFlushedErrorMessages
in interface ErrorCollection
public void addErrorCollection(ErrorCollection errors)
ErrorCollection
addErrorCollection
in interface ErrorCollection
errors
- ErrorCollection whose errors/messages we obtain.public void addErrorMessages(Collection errorMessages)
ErrorCollection
addErrorMessages
in interface ErrorCollection
errorMessages
- Collection of error strings.public void addErrors(Map errors)
ErrorCollection
addErrors
in interface ErrorCollection
errors
- of String: String pairs, eg. {"assignee": "Assignee is required"}public boolean hasAnyErrors()
ErrorCollection
hasAnyErrors
in interface ErrorCollection
public void addError(String field, String message, ErrorCollection.Reason reason)
ErrorCollection
addError
in interface ErrorCollection
field
- Field name, eg. "assignee"message
- Error message.reason
- Reason for the error.public void addErrorMessage(String message, ErrorCollection.Reason reason)
ErrorCollection
addErrorMessage
in interface ErrorCollection
message
- Error message.reason
- Reason for the error.public void addReasons(Set<ErrorCollection.Reason> reasons)
ErrorCollection
addReasons
in interface ErrorCollection
reasons
- a set of well known reasons why the function has not been performed.public void addReason(ErrorCollection.Reason reason)
ErrorCollection
addReason
in interface ErrorCollection
reason
- a well known reasons why the function has not been performed.public void setReasons(Set<ErrorCollection.Reason> reasons)
ErrorCollection
setReasons
in interface ErrorCollection
reasons
- a set of well known reasons why the function has not been performed.public Set<ErrorCollection.Reason> getReasons()
ErrorCollection
getReasons
in interface ErrorCollection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |