@Deprecated
public abstract class BaseAction
extends org.apache.struts.action.Action
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FORWARD_ERROR
Deprecated.
Global struts forward for all errors - "error"
|
static java.lang.String |
FORWARD_NO_ACCESS
Deprecated.
Global struts forward for actions that the current user does not have
access to - "no_access"
|
static java.lang.String |
FORWARD_SUCCESS
Deprecated.
Global default struts forward - "success"
|
Constructor and Description |
---|
BaseAction()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addError(javax.servlet.http.HttpServletRequest q_,
org.apache.struts.action.ActionMessage error_)
Deprecated.
Adds an error to the request using the default bundle for this Action.
|
void |
addError(javax.servlet.http.HttpServletRequest q_,
org.apache.struts.action.ActionMessage error_,
java.lang.String bundle_)
Deprecated.
Adds an error to the request using the specified bundle for this Action.
|
void |
addError(javax.servlet.http.HttpServletRequest q_,
AppianException ae_)
Deprecated.
Adds an application exception to the request.
|
void |
addError(javax.servlet.http.HttpServletRequest q,
ErrorCode errorCode,
java.lang.Object... errorCodeArguments)
Deprecated.
Adds an error to the request using the specified
AppianErrorCode
to retrieve the message and substitutes the provided arguments inside the
error text. |
void |
addError(javax.servlet.http.HttpServletRequest q_,
java.lang.String key)
Deprecated.
use addError(HttpServletRequest q_, ActionError error_) instead.
|
void |
addError(javax.servlet.http.HttpServletRequest q_,
java.lang.String property_,
org.apache.struts.action.ActionMessage error_)
Deprecated.
Adds an error to the request using the default bundle for this Action.
|
void |
addError(javax.servlet.http.HttpServletRequest q_,
java.lang.String property_,
org.apache.struts.action.ActionMessage error_,
java.lang.String bundle_)
Deprecated.
Adds an error to the request using the specified bundle for this Action.
|
void |
addError(javax.servlet.http.HttpServletRequest q,
java.lang.String property,
ErrorCode errorCode,
java.lang.Object... errorCodeArguments)
Deprecated.
Adds an error to the request using the specified
AppianErrorCode
to retrieve the message and substitutes the provided arguments inside the
error text. |
void |
addMessage(javax.servlet.http.HttpServletRequest q_,
org.apache.struts.action.ActionMessage message_)
Deprecated.
Adds a message to the request using the default bundle for this Action.
|
void |
addMessage(javax.servlet.http.HttpServletRequest q_,
org.apache.struts.action.ActionMessage message_,
java.lang.String bundle_)
Deprecated.
Adds a message to the request using the specified bundle for this Action.
|
void |
addMessage(javax.servlet.http.HttpServletRequest q_,
java.lang.String property_,
org.apache.struts.action.ActionMessage message_)
Deprecated.
Adds a message to the request using the default bundle for this Action.
|
void |
addMessage(javax.servlet.http.HttpServletRequest q_,
java.lang.String property_,
org.apache.struts.action.ActionMessage message_,
java.lang.String bundle_)
Deprecated.
Adds a message to the request using the specified bundle for this Action.
|
protected boolean |
canAccess(org.apache.struts.action.ActionMapping m,
javax.servlet.http.HttpServletRequest q)
Deprecated.
Returns whether the web user can execute this action.
|
static java.util.Map |
decodeParameters(javax.servlet.http.HttpServletRequest q_)
Deprecated.
Decodes the parameters from the request and returns them in the Map.
|
org.apache.struts.action.ActionForward |
execute(org.apache.struts.action.ActionMapping m_,
org.apache.struts.action.ActionForm f_,
javax.servlet.http.HttpServletRequest q_,
javax.servlet.http.HttpServletResponse r_)
Deprecated.
Checks credentials by calling
canAccess and then calls
executeImpl , if canAccess returns
true . |
protected java.lang.String |
generateToken(javax.servlet.http.HttpServletRequest q_)
Deprecated.
Do not call.
|
protected java.lang.String |
getAuthorizationActionName(javax.servlet.http.HttpServletRequest q)
Deprecated.
Returns this action's name, as registered with the authorization framework.
|
protected com.appiancorp.security.authz.AuthorizationProvider |
getAuthorizationProvider()
Deprecated.
Returns the
AuthorizationProvider to be used to perform authorization. |
protected ServiceContext |
getServiceContext(javax.servlet.http.HttpServletRequest q)
Deprecated.
Returns the
ServiceContext for the user executing this request. |
static java.lang.String |
getValueFromRequest(javax.servlet.http.HttpServletRequest q_,
java.lang.String key_)
Deprecated.
Returns the parameter or attribute value from the request based on the key
Calls
getValueFromRequest(q_,key_,null) |
static java.lang.String |
getValueFromRequest(javax.servlet.http.HttpServletRequest q_,
java.lang.String key_,
java.lang.String default_)
Deprecated.
Returns the parameter or attribute value from the request based on the key.
|
protected void |
initBundle()
Deprecated.
|
protected boolean |
isTokenValid(javax.servlet.http.HttpServletRequest q_)
Deprecated.
Detemines if the current request token is valid
|
protected boolean |
isTokenValid(javax.servlet.http.HttpServletRequest q_,
boolean reset_)
Deprecated.
Detemines if the current request token is valid
|
protected boolean |
requiresAuthorization(javax.servlet.http.HttpServletRequest q)
Deprecated.
Returns whether this action needs to be authorized prior to execution.
|
protected void |
resetToken(javax.servlet.http.HttpServletRequest q_)
Deprecated.
Reset the token
|
protected void |
saveErrors(javax.servlet.http.HttpServletRequest q_,
org.apache.struts.action.ActionMessages errors_)
Deprecated.
Overrides the implementation of the struts Action
saveErrors
method. |
protected void |
saveErrors(javax.servlet.http.HttpServletRequest q_,
org.apache.struts.action.ActionMessages errors_,
java.lang.String bundle_)
Deprecated.
Mimics the implementation of the struts Action
saveErrors
method. |
protected void |
saveMessages(javax.servlet.http.HttpServletRequest q_,
org.apache.struts.action.ActionMessages messages_)
Deprecated.
Overrides the implementation of the struts Action
saveMessages
method. |
protected void |
saveMessages(javax.servlet.http.HttpServletRequest q_,
org.apache.struts.action.ActionMessages messages_,
java.lang.String bundle_)
Deprecated.
Mimics the implementation of the struts Action
saveMessages
method. |
protected void |
saveToken(javax.servlet.http.HttpServletRequest q_)
Deprecated.
Save a new token for the request
|
public static final java.lang.String FORWARD_ERROR
public static final java.lang.String FORWARD_NO_ACCESS
public static final java.lang.String FORWARD_SUCCESS
public static java.util.Map decodeParameters(javax.servlet.http.HttpServletRequest q_)
q_
- the request that contains the parameters to be decoded.Map
of the parameters, where the keys are the
parameter names and the values are the parameter valuespublic void addError(javax.servlet.http.HttpServletRequest q_, AppianException ae_)
q_
- the HttpServletRequest
with which to associate
the errorae_
- the AppianException
representing the error@Deprecated public void addError(javax.servlet.http.HttpServletRequest q_, java.lang.String key)
public void addError(javax.servlet.http.HttpServletRequest q_, org.apache.struts.action.ActionMessage error_)
q_
- the HttpServletRequest
with which to associate
the errorerror_
- the ActionError
representing the errorpublic void addError(javax.servlet.http.HttpServletRequest q_, org.apache.struts.action.ActionMessage error_, java.lang.String bundle_)
q_
- the HttpServletRequest
with which to associate
the errorerror_
- the ActionError
representing the errorbundle_
- The name of the bundle as it is referenced in struts.public void addError(javax.servlet.http.HttpServletRequest q_, java.lang.String property_, org.apache.struts.action.ActionMessage error_)
q_
- the HttpServletRequest
with which to associate the
errorproperty_
- The property on the form that was the source of this
error.error_
- the ActionError
representing the errorpublic void addError(javax.servlet.http.HttpServletRequest q_, java.lang.String property_, org.apache.struts.action.ActionMessage error_, java.lang.String bundle_)
q_
- the HttpServletRequest
with which to associate the
errorproperty_
- The property on the form that was the source of this
errorerror_
- the ActionError
representing the errorbundle_
- The name of the bundle as it is referenced in struts.public void addError(javax.servlet.http.HttpServletRequest q, ErrorCode errorCode, java.lang.Object... errorCodeArguments)
AppianErrorCode
to retrieve the message and substitutes the provided arguments inside the
error text.q
- the HttpServletRequest
with which to associate the
errorerrorCode
- the AppianErrorCode
that will be used to
retrieve the messageerrorCodeArguments
- the Object
array that will be
replaced inside the error code messagepublic void addError(javax.servlet.http.HttpServletRequest q, java.lang.String property, ErrorCode errorCode, java.lang.Object... errorCodeArguments)
AppianErrorCode
to retrieve the message and substitutes the provided arguments inside the
error text. This method takes in the form property that the error is
associated with. For example, if you are validating a form and the "username"
field is invalid, "username" is the property value. The error messages
will appear context sensitive to the "username" field in the form.q
- q the HttpServletRequest
with which to associate the
errorproperty
- property The property on the form that was the source of
this errorerrorCode
- errorCode the AppianErrorCode
that will be
used to retrieve the messageerrorCodeArguments
- the Object
array that will be
replaced inside the error code messagepublic void addMessage(javax.servlet.http.HttpServletRequest q_, org.apache.struts.action.ActionMessage message_)
q_
- the HttpServletRequest
with which to associate the
messagemessage_
- the messagepublic void addMessage(javax.servlet.http.HttpServletRequest q_, org.apache.struts.action.ActionMessage message_, java.lang.String bundle_)
q_
- the HttpServletRequest
with which to associate the
messagemessage_
- the messagebundle_
- The name of the bundle as it is referenced in struts.
e.g. "ap-app-i18n" and not "text.java.com.appiancorp.ap2.application-i18n"public void addMessage(javax.servlet.http.HttpServletRequest q_, java.lang.String property_, org.apache.struts.action.ActionMessage message_)
q_
- the HttpServletRequest
with which to associate the
messageproperty_
- the property on the form that was the source of this
error.message_
- the messagepublic void addMessage(javax.servlet.http.HttpServletRequest q_, java.lang.String property_, org.apache.struts.action.ActionMessage message_, java.lang.String bundle_)
q_
- the HttpServletRequest
with which to associate the
messageproperty_
- The property on the form that was the source of this error.message_
- the messagebundle_
- The name of the bundle as it is referenced in struts.
e.g. "ap-app-i18n" and not "text.java.com.appiancorp.ap2.application-i18n"protected void saveErrors(javax.servlet.http.HttpServletRequest q_, org.apache.struts.action.ActionMessages errors_)
saveErrors
method.
Default bundle for this action is used.saveErrors
in class org.apache.struts.action.Action
q_
- the HttpServletRequest
with which to associate the
messageerrors_
- the ActionErrors
representation of the errorsprotected void saveErrors(javax.servlet.http.HttpServletRequest q_, org.apache.struts.action.ActionMessages errors_, java.lang.String bundle_)
saveErrors
method.q_
- the HttpServletRequest
with which to associate the
errorserrors_
- the ActionErrors
representation of the errorsbundle_
- the name of the bundle as it is referenced in struts.
e.g. "ap-app-i18n" and not "text.java.com.appiancorp.ap2.application-i18n"protected void saveMessages(javax.servlet.http.HttpServletRequest q_, org.apache.struts.action.ActionMessages messages_)
saveMessages
method. Default bundle for this action is used.saveMessages
in class org.apache.struts.action.Action
q_
- the HttpServletRequest
with which to associate the
messagesmessages_
- the ActionMessages
representation of the
messages
e.g. "ap-app-i18n" and not "text.java.com.appiancorp.ap2.application-i18n"protected void saveMessages(javax.servlet.http.HttpServletRequest q_, org.apache.struts.action.ActionMessages messages_, java.lang.String bundle_)
saveMessages
method.
Default bundle for this action is used.q_
- the HttpServletRequest
with which to associate the
messagesmessages_
- the messages to savebundle_
- the name of the bundle as it is referenced in struts.
e.g. "ap-app-i18n" and not "text.java.com.appiancorp.ap2.application-i18n"public final org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping m_, org.apache.struts.action.ActionForm f_, javax.servlet.http.HttpServletRequest q_, javax.servlet.http.HttpServletResponse r_)
canAccess
and then calls
executeImpl
, if canAccess
returns
true
. If canAccess
returns false
,
the returned action forward will be
the one corresponding to FORWARD_NO_ACCESS
. If there is no
such forward, then the forward corresponding to FORWARD_ERROR
will be returned.execute
in class org.apache.struts.action.Action
m_
- the information mapping the request to an Action
objectf_
- an ActionForm
JavaBean that contains the form
data from the request parametersq_
- the requestr_
- the responseActionForward
to the Action
to
perform after this oneInvalidFormClassException
- if the ActionForm
cannot be
cast to required ActionForm
implementation.protected void initBundle()
public static java.lang.String getValueFromRequest(javax.servlet.http.HttpServletRequest q_, java.lang.String key_)
Calls getValueFromRequest(q_,key_,null)
q_
- the requestkey_
- the property namepublic static java.lang.String getValueFromRequest(javax.servlet.http.HttpServletRequest q_, java.lang.String key_, java.lang.String default_)
q_
- the requestkey_
- the property namedefault_
- the default value (what to return if no value exists)protected boolean canAccess(org.apache.struts.action.ActionMapping m, javax.servlet.http.HttpServletRequest q)
requiresAuthorization(HttpServletRequest)
returns
true
. If requiresAuthorization(HttpServletRequest)
returns false
,
this method will just return true
.m_
- the action mappingq_
- the requesttrue
if the current user can execute this action;
false
otherwiseprotected boolean requiresAuthorization(javax.servlet.http.HttpServletRequest q)
false
.protected java.lang.String getAuthorizationActionName(javax.servlet.http.HttpServletRequest q)
protected ServiceContext getServiceContext(javax.servlet.http.HttpServletRequest q)
ServiceContext
for the user executing this request.protected com.appiancorp.security.authz.AuthorizationProvider getAuthorizationProvider()
AuthorizationProvider
to be used to perform authorization.protected java.lang.String generateToken(javax.servlet.http.HttpServletRequest q_)
generateToken
in class org.apache.struts.action.Action
protected boolean isTokenValid(javax.servlet.http.HttpServletRequest q_)
isTokenValid
in class org.apache.struts.action.Action
q_
- the requesttrue
if the token is valid;
false
otherwiseprotected boolean isTokenValid(javax.servlet.http.HttpServletRequest q_, boolean reset_)
isTokenValid
in class org.apache.struts.action.Action
q_
- the requestreset_
- whether to reset the tokentrue
if the token is valid;
false
otherwiseprotected void resetToken(javax.servlet.http.HttpServletRequest q_)
resetToken
in class org.apache.struts.action.Action
q_
- the requestprotected void saveToken(javax.servlet.http.HttpServletRequest q_)
saveToken
in class org.apache.struts.action.Action
q_
- the requestCopyright © 2003-2024 Appian Corporation. All Rights Reserved.