public class

MockAction

extends ActionSupport
implements ErrorCollection
java.lang.Object
   ↳ webwork.action.ActionSupport
     ↳ com.atlassian.jira.action.MockAction

Summary

[Expand]
Inherited Constants
From interface webwork.action.Action
[Expand]
Inherited Fields
From class webwork.action.ActionSupport
Public Constructors
MockAction()
Public Methods
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)
void addErrors(Map errors)
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.
[Expand]
Inherited Methods
From class webwork.action.ActionSupport
From class java.lang.Object
From interface com.atlassian.jira.util.ErrorCollection
From interface webwork.action.Action
From interface webwork.action.IllegalArgumentAware

Public Constructors

public MockAction ()

Public Methods

public void addError (String field, String message, ErrorCollection.Reason reason)

Add a field-specific error message.

Parameters
field Field name, eg. "assignee"
message Error message.
reason Reason for the error.

public void addErrorCollection (ErrorCollection errors)

Populate this ErrorCollection with general and field-specific errors.

Parameters
errors ErrorCollection whose errors/messages we obtain.

public void addErrorMessage (String message, ErrorCollection.Reason reason)

Add error message relating to system state (not field-specific), and a reason.

Parameters
message Error message.
reason Reason for the error.

public void addErrorMessages (Collection errorMessages)

public void addErrors (Map errors)

public void addReason (ErrorCollection.Reason reason)

Add 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.

Parameters
reason a well known reasons why the function has not been performed.

public void addReasons (Set<ErrorCollection.Reason> reasons)

Add 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.

Parameters
reasons a set of well known reasons why the function has not been performed.

public Collection<String> getFlushedErrorMessages ()

Get error messages, then get rid of them.

Returns
  • The (now cleared) error messages.

public String getFoo ()

public Set<ErrorCollection.Reason> getReasons ()

A 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.

Returns
  • a set of well known reasons why the function has not been performed.

public boolean hasAnyErrors ()

Whether any errors (of any type - field-specific or otherwise) have been collected.

Returns
  • true if any errors (of any type - field-specific or otherwise) have been collected.

public void setFoo (String foo)

public void setReasons (Set<ErrorCollection.Reason> reasons)

Set 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.

Parameters
reasons a set of well known reasons why the function has not been performed.