java.lang.Object | |||
↳ | webwork.action.ActionSupport | ||
↳ | com.atlassian.jira.action.JiraActionSupport | ||
↳ | com.atlassian.jira.web.action.JiraWebActionSupport |
Clients of @PublicSpi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicSpi
as per each product's API policy (clients should refer to each product's API policy for
the exact guarantee -- usually binary compatibility is guaranteed at least across minor versions).
@PublicSpi
interfaces and classes are specifically designed to be implemented/extended by clients.
Hence, the guarantee of binary compatibility is different to that of @PublicApi
elements (if an element
is both @PublicApi
and @PublicSpi
, both guarantees apply).
All web actions should extend this class - it provides basic common functionality for all web actions.
When adding to this class, be sure that what you are adding is used by a large number of actions - otherwise add it to a sub class of this.Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
JiraWebActionSupport.MessageType | Represents a type of message that the browser will display after the next page load. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ISSUE_NOT_FOUND_RESULT | ||||||||||
String | PERMISSION_VIOLATION_RESULT | ||||||||||
String | RETURN_URL_PARAMETER |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
request |
This field is deprecated.
since 6.0 - use getHttpRequest() instead. |
||||||||||
savedFilters |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add a field-specific error message.
| |||||||||||
Populate this ErrorCollection with general and field-specific errors.
| |||||||||||
Add error message relating to system state (not field-specific), and a reason.
| |||||||||||
Add a reason why the function has not been performed.
| |||||||||||
Add reasons why the function has not been performed.
| |||||||||||
Get the link, with Internationalised text for contacting the administrators of JIRA.
| |||||||||||
Retrieve the value from a conglomerate Cookie from the request.
| |||||||||||
Returns a DateTimeFormatter that can be used to format times and dates in the user's time zone using
RELATIVE . | |||||||||||
This method is deprecated.
Use
ConstantsManager instead. Since v6.0.
| |||||||||||
Returns a DateTimeFormatter that can be used to format dates in the user's time zone using
DATE . | |||||||||||
Returns an empty response code (204)
| |||||||||||
Get error messages, then get rid of them.
| |||||||||||
Provides a service context with the current user which contains this action as its
ErrorCollection . | |||||||||||
This method is deprecated.
since 6.1 use
getLoggedInApplicationUser() instead.
| |||||||||||
This method is deprecated.
Use
ConstantsManager instead. Since v6.0.
| |||||||||||
This method is deprecated.
Use
getDateTimeFormatter() instead. Since v5.0.
| |||||||||||
A set of well known reasons why the function has not been performed.
| |||||||||||
Redirects to the value of
getReturnUrl() , falling back to defaultUrl if the returnUrl is
not set. | |||||||||||
Redirects to the value of
getReturnUrl() , falling back to defaultUrl if the returnUrl is
not set. | |||||||||||
The cancel links should not included the selectedIssueId, otherwise when returning to the issue navigator an
issue updated notification will be shown.
| |||||||||||
Gets the last viewed project that the user visited and still has permission to see.
| |||||||||||
Gets the last viewed project that the user visited and still has permission to see.
| |||||||||||
For debugging JSPs; prints the webwork stack.
| |||||||||||
For debugging JSPs; prints the webwork stack, highlighting the specified node.
| |||||||||||
Returns true if the logged in user has the given permission type on the given Issue.
| |||||||||||
Returns true if the logged in user has the given permission type.
| |||||||||||
Returns true if the logged in user has the given permission type on the given Project.
| |||||||||||
Convenience instance method to call static utility from webwork EL.
| |||||||||||
Returns true if the logged in user has the given permission type on the given Issue.
| |||||||||||
Returns true if the logged in user has the given permission type on the given Issue.
| |||||||||||
This method is deprecated.
Use
hasPermission(int) instead. Since v6.0.
| |||||||||||
This method is deprecated.
Use
hasPermission(int) instead. Since v6.0.
| |||||||||||
Returns true if remote user has permission over given entity, false otherwise.
| |||||||||||
This method is deprecated.
Use
hasProjectPermission(int, com.atlassian.jira.project.Project) instead. Since v6.0.
| |||||||||||
This method is deprecated.
Use
hasProjectPermission(int, com.atlassian.jira.project.Project) instead. Since v6.0.
| |||||||||||
This returns true if the action has been invoked as an inline dialog.
| |||||||||||
This method is deprecated.
Use
isUserExistsByName(String) or isUserExistsByKey(String) instead, as appropriate. Since v6.0.
| |||||||||||
Set the value key/value pair in a conglomerate Cookie.
| |||||||||||
This is the web parameter setter for invoking an action as an inline dialog
| |||||||||||
Set reasons why the function has not been performed.
| |||||||||||
Encodes the given string into
application/x-www-form-urlencoded format, using the JIRA encoding scheme to
obtain the bytes for unsafe characters. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This will populate the the custom Atlassian header with the details of a pop-up message.
| |||||||||||
This method will force a server redirect, with no security checks.
| |||||||||||
Returns a RedirectSanitiser implementation.
| |||||||||||
Prepends the context path to the URL if it begins with a forward slash (this is commonly used for redirects
within a JIRA instance).
| |||||||||||
This will return success response with body containing url to redirect.
| |||||||||||
This method is deprecated.
since 5.1. Use
returnCompleteWithInlineRedirectAndMsg(String, String, MessageType, boolean, String)
instead.
| |||||||||||
This will redirect like
returnCompleteWithInlineRedirect(String) , and will also populate the response
with the details of a pop-up message to be displayed on the redirected page. | |||||||||||
This will redirect like
returnComplete() , and will also populate the response
with the details of a pop-up message to be displayed on the redirected page. | |||||||||||
This method is deprecated.
since 5.1. Use
returnMsgToUser(String, String, MessageType, boolean, String) instead.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Add a field-specific error message.
field | Field name, eg. "assignee" |
---|---|
message | Error message. |
reason | Reason for the error. |
Populate this ErrorCollection with general and field-specific errors.
errors | ErrorCollection whose errors/messages we obtain. |
---|
Add error message relating to system state (not field-specific), and a reason.
message | Error message. |
---|---|
reason | Reason for the error. |
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.
reason | a well known reasons why the function has not been performed. |
---|
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.
reasons | a set of well known reasons why the function has not been performed. |
---|
Get the link, with Internationalised text for contacting the administrators of JIRA. This link is present on many pages across the bredth of JIRA and so centralised here.
Retrieve the value from a conglomerate Cookie from the request.
cookieName | The name of the conglomerate cookie |
---|---|
key | The key of the value |
Returns a DateTimeFormatter that can be used to format times and dates in the user's time zone using RELATIVE
.
Returns a DateTimeFormatter that can be used to format dates in the user's time zone using DATE
.
Get error messages, then get rid of them.
Provides a service context with the current user which contains this action as its ErrorCollection
.
This method is deprecated.
since 6.1 use getLoggedInApplicationUser()
instead.
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.
Redirects to the value of getReturnUrl()
, falling back to defaultUrl
if the returnUrl
is
not set. This method clears the returnUrl
. If there are errors, this method returns "ERROR". If the URL
starts with '/' it is interpreted as context-relative.
allowUnsafeRedirect
is true, this method will not perform validation on the value of returnUrl
or defaultUrl
. This can introduce serious security problems, so use with care. In particular, you
should only use use this method if defaultUrl
has already been sanitised (via whitelisting).defaultUrl | default URL to redirect to |
---|---|
allowUnsafeRedirect | whether to allow unsafe redirects (e.g. javascript: or off-site URLs). |
Redirects to the value of getReturnUrl()
, falling back to defaultUrl
if the returnUrl
is
not set. This method clears the returnUrl
. If there are errors, this method returns "ERROR".
makeSafeRedirectUrl(String)
. Use getRedirect(String, boolean)
to allow unsafe
redirects for URLs that do not contain possibly malicious user input.defaultUrl | default URL to redirect to |
---|
The cancel links should not included the selectedIssueId, otherwise when returning to the issue navigator an issue updated notification will be shown.
Gets the last viewed project that the user visited and still has permission to see.
Gets the last viewed project that the user visited and still has permission to see.
This is a legacy synonym for getSelectedProject()
For debugging JSPs; prints the webwork stack. Eg. called with:
For debugging JSPs; prints the webwork stack, highlighting the specified node. Eg. called with:
selected | selected value in the webwork stack |
---|
Returns true if the logged in user has the given permission type on the given Issue.
permissionsId | the permission type |
---|---|
issue | the Issue |
Returns true if the logged in user has the given permission type.
permissionsId | the permission type |
---|
Returns true if the logged in user has the given permission type on the given Project.
permissionsId | the permission type |
---|---|
project | the Project |
Convenience instance method to call static utility from webwork EL.
encodeMe | a String to be HTML encoded. |
---|
Returns true if the logged in user has the given permission type on the given Issue.
permissionsId | the permission type |
---|---|
issue | the Issue |
Returns true if the logged in user has the given permission type on the given Issue.
permName | the permission type |
---|---|
issue | the Issue |
This method is deprecated.
Use hasPermission(int)
instead. Since v6.0.
Returns true if the logged in user has the given permission type.
permissionsId | the permission type |
---|
This method is deprecated.
Use hasPermission(int)
instead. Since v6.0.
Returns true if the logged in user has the given permission type.
permName | the permission type |
---|
Returns true if remote user has permission over given entity, false otherwise.
permName | permission type |
---|---|
entity | entity to check the permission for, e.g. project, issue |
This method is deprecated.
Use hasProjectPermission(int, com.atlassian.jira.project.Project)
instead. Since v6.0.
Returns true if the logged in user has the given permission type on the given Project.
permName | the permission type |
---|---|
project | the Project |
This method is deprecated.
Use hasProjectPermission(int, com.atlassian.jira.project.Project)
instead. Since v6.0.
Returns true if the logged in user has the given permission type on the given Project.
permissionsId | the permission type |
---|---|
project | the Project |
This returns true if the action has been invoked as an inline dialog. This changes the way that the action sends back its responses, namely when the action is submitted and completed
This method is deprecated.
Use isUserExistsByName(String)
or isUserExistsByKey(String)
instead, as appropriate. Since v6.0.
Old name for isUserExistsByName(String)
username | the username to check |
---|
true
if the username is associated with an existing user; false
otherwiseSet the value key/value pair in a conglomerate Cookie.
cookieName | The name of the conglomerate cookie |
---|---|
key | The key of the value |
value | The value |
This is the web parameter setter for invoking an action as an inline dialog
inline | true if the action should act as an inline dialog |
---|
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.
reasons | a set of well known reasons why the function has not been performed. |
---|
Encodes the given string into application/x-www-form-urlencoded
format, using the JIRA encoding scheme to
obtain the bytes for unsafe characters.
encode | the String to encode |
---|
This will populate the the custom Atlassian header with the details of a pop-up message.
msg | message HTML |
---|---|
type | type of message, see JIRA.Messages.Types |
closeable | if true, message pop-up has an 'X' button, otherwise pop-up fades away automatically |
target | the target to prepend the message pop-up to. If null, the message is shown in a global spot. |
This method will force a server redirect, with no security checks. It doesn't clear the return URL and will
always go to the redirect URL. For security reasons, prefer getRedirect(String)
, which checks that
the redirect URL is safe.
redirect | redirect URL |
---|
NONE
. It'll just redirect to where you've specifiedReturns a RedirectSanitiser implementation.
Prepends the context path to the URL if it begins with a forward slash (this is commonly used for redirects within a JIRA instance).
url | a String containing a URL |
---|
This will return success response with body containing url to redirect. An appropriately configured client side control should perform redirect to the desired url.
url | URL to redirect to |
---|
This method is deprecated.
since 5.1. Use returnCompleteWithInlineRedirectAndMsg(String, String, MessageType, boolean, String)
instead.
This will redirect like returnCompleteWithInlineRedirect(String)
, and will also populate the response
with the details of a pop-up message to be displayed on the redirected page. An appropriately configured client
side control should perform the displaying of the message.
url | URL to redirect to |
---|---|
msg | message HTML |
type | type of message, see JIRA.Messages.Types |
closeable | if true, message pop-up has an 'X' button, otherwise pop-up fades away automatically |
target | the target to prepend the message pop-up to. If null, the message is shown in a global spot |
This will redirect like returnCompleteWithInlineRedirect(String)
, and will also populate the response
with the details of a pop-up message to be displayed on the redirected page. An appropriately configured client
side control should perform the displaying of the message.
url | URL to redirect to |
---|---|
msg | message HTML |
type | type of message. |
closeable | if true, message pop-up has an 'X' button, otherwise pop-up fades away automatically |
target | the target to prepend the message pop-up to. If null, the message is shown in a global spot |
This will redirect like returnComplete()
, and will also populate the response
with the details of a pop-up message to be displayed on the redirected page. An appropriately configured client
side control should perform the displaying of the message.
url | URL to redirect to. Not used in dialogs |
---|---|
msg | message HTML |
type | type of message |
closeable | if true, message pop-up has an 'X' button, otherwise pop-up fades away automatically |
target | the target to prepend the message pop-up to. If null, the message is shown in a global spot |
This method is deprecated.
since 5.1. Use returnMsgToUser(String, String, MessageType, boolean, String)
instead.
This will redirect like returnComplete()
, and will also populate the response
with the details of a pop-up message to be displayed on the redirected page. An appropriately configured client
side control should perform the displaying of the message.
url | URL to redirect to. Not used in dialogs |
---|---|
msg | message HTML |
type | type of message, see JIRA.Messages.Types |
closeable | if true, message pop-up has an 'X' button, otherwise pop-up fades away automatically |
target | the target to prepend the message pop-up to. If null, the message is shown in a global spot |