|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork2.ActionSupport
com.gisgraphy.webapp.action.BaseAction
public class BaseAction
Implementation of ActionSupport that contains convenience methods for subclasses. For example, getting the current user and saving messages/errors. This class is intended to be a base class for all Action classes.
Field Summary | |
---|---|
protected java.lang.String |
cancel
Indicator if the user clicked cancel |
static java.lang.String |
CANCEL
Constant for cancel result String |
protected java.lang.String |
delete
Set to "delete" when a "delete" request parameter is passed in |
protected java.lang.String |
from
Indicator for the page the user came from. |
protected org.apache.commons.logging.Log |
log
Transient log to prevent session synchronization issues - children can use instance for logging. |
protected MailEngine |
mailEngine
MailEngine for sending e-mail |
protected org.springframework.mail.SimpleMailMessage |
mailMessage
A message pre-populated with default data |
protected RoleManager |
roleManager
The RoleManager |
protected java.lang.String |
save
Set to "save" when a "save" request parameter is passed in |
protected java.lang.String |
templateName
Velocity template to use for e-mailing |
protected UserManager |
userManager
The UserManager |
Fields inherited from class com.opensymphony.xwork2.ActionSupport |
---|
LOG |
Fields inherited from interface com.opensymphony.xwork2.Action |
---|
ERROR, INPUT, LOGIN, NONE, SUCCESS |
Constructor Summary | |
---|---|
BaseAction()
|
Method Summary | |
---|---|
java.lang.String |
cancel()
Simple method that returns "cancel" result |
protected java.util.Map |
getConfiguration()
Convenience method to get the Configuration HashMap from the servlet context. |
protected javax.servlet.http.HttpServletRequest |
getRequest()
Convenience method to get the request |
protected javax.servlet.http.HttpServletResponse |
getResponse()
Convenience method to get the response |
protected javax.servlet.http.HttpSession |
getSession()
Convenience method to get the session. |
protected void |
saveMessage(java.lang.String msg)
Save the message in the session, appending if messages already exist |
protected void |
sendUserMessage(User user,
java.lang.String msg,
java.lang.String url)
Convenience method to send e-mail to users |
void |
setDelete(java.lang.String delete)
|
void |
setFrom(java.lang.String from)
Convenience method for setting a "from" parameter to indicate the previous page. |
void |
setMailEngine(MailEngine mailEngine)
|
void |
setMailMessage(org.springframework.mail.SimpleMailMessage mailMessage)
|
void |
setRoleManager(RoleManager roleManager)
|
void |
setSave(java.lang.String save)
|
void |
setTemplateName(java.lang.String templateName)
|
void |
setUserManager(UserManager userManager)
|
Methods inherited from class com.opensymphony.xwork2.ActionSupport |
---|
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, pause, setActionErrors, setActionMessages, setFieldErrors, validate |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CANCEL
protected final transient org.apache.commons.logging.Log log
protected UserManager userManager
protected RoleManager roleManager
protected java.lang.String cancel
protected java.lang.String from
protected java.lang.String delete
protected java.lang.String save
protected MailEngine mailEngine
protected org.springframework.mail.SimpleMailMessage mailMessage
protected java.lang.String templateName
Constructor Detail |
---|
public BaseAction()
Method Detail |
---|
public java.lang.String cancel()
protected void saveMessage(java.lang.String msg)
msg
- the message to put in the sessionprotected java.util.Map getConfiguration()
protected javax.servlet.http.HttpServletRequest getRequest()
protected javax.servlet.http.HttpServletResponse getResponse()
protected javax.servlet.http.HttpSession getSession()
protected void sendUserMessage(User user, java.lang.String msg, java.lang.String url)
user
- the user to send tomsg
- the message to sendurl
- the URL to the application (or where ever you'd like to
send them)public void setUserManager(UserManager userManager)
public void setRoleManager(RoleManager roleManager)
public void setMailEngine(MailEngine mailEngine)
public void setMailMessage(org.springframework.mail.SimpleMailMessage mailMessage)
public void setTemplateName(java.lang.String templateName)
public void setFrom(java.lang.String from)
from
- indicator for the originating pagepublic void setDelete(java.lang.String delete)
public void setSave(java.lang.String save)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |