com.dakuupa.struts.crud
Class CrudAction<T extends CrudModel>
java.lang.Object
com.opensymphony.xwork2.ActionSupport
com.dakuupa.struts.crud.CrudAction<T>
- All Implemented Interfaces:
- com.opensymphony.xwork2.Action, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.ModelDriven<T>, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, com.opensymphony.xwork2.ValidationAware, Serializable, org.apache.struts2.interceptor.ServletRequestAware, org.apache.struts2.interceptor.SessionAware
public abstract class CrudAction<T extends CrudModel>
- extends com.opensymphony.xwork2.ActionSupport
- implements org.apache.struts2.interceptor.SessionAware, org.apache.struts2.interceptor.ServletRequestAware, com.opensymphony.xwork2.ModelDriven<T>
- Author:
- etwilliams
- See Also:
- Serialized Form
| Fields inherited from class com.opensymphony.xwork2.ActionSupport |
LOG |
| Fields inherited from interface com.opensymphony.xwork2.Action |
ERROR, INPUT, LOGIN, NONE, SUCCESS |
| Methods inherited from class com.opensymphony.xwork2.ActionSupport |
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, 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, setContainer, setFieldErrors, validate |
request
protected javax.servlet.http.HttpServletRequest request
model
protected T extends CrudModel model
session
protected Map session
logger
protected Logger logger
LIST_ACTION
public static final String LIST_ACTION
- See Also:
- Constant Field Values
CREATE_ACTION
public static final String CREATE_ACTION
- See Also:
- Constant Field Values
UPDATE_ACTION
public static final String UPDATE_ACTION
- See Also:
- Constant Field Values
DELETE_ACTION
public static final String DELETE_ACTION
- See Also:
- Constant Field Values
RELOAD_ACTION
public static final String RELOAD_ACTION
- See Also:
- Constant Field Values
CREATE_RELOAD_ACTION
public static final String CREATE_RELOAD_ACTION
- See Also:
- Constant Field Values
UPDATE_RELOAD_ACTION
public static final String UPDATE_RELOAD_ACTION
- See Also:
- Constant Field Values
CrudAction
public CrudAction()
execute
public String execute()
throws Exception
- Specified by:
execute in interface com.opensymphony.xwork2.Action- Overrides:
execute in class com.opensymphony.xwork2.ActionSupport
- Throws:
Exception
doAction
protected String doAction()
preAction
protected void preAction()
postAction
protected void postAction(String returnValue)
processForm
protected String processForm()
create
protected abstract int create()
read
protected abstract void read()
update
protected abstract void update()
delete
protected abstract boolean delete()
list
protected void list()
createReload
protected void createReload()
updateReload
protected void updateReload()
validateForm
protected boolean validateForm()
addHelpMessage
public final void addHelpMessage(String msg)
addSuccessMessage
public final void addSuccessMessage(String msg)
addInfoMessage
public final void addInfoMessage(String msg)
addWarningMessage
public final void addWarningMessage(String msg)
addErrorMessage
public final void addErrorMessage(String msg)
setServletRequest
public void setServletRequest(javax.servlet.http.HttpServletRequest req)
- Specified by:
setServletRequest in interface org.apache.struts2.interceptor.ServletRequestAware
getModel
public T getModel()
- Specified by:
getModel in interface com.opensymphony.xwork2.ModelDriven<T extends CrudModel>
getSession
public Map getSession()
setSession
public void setSession(Map<String,Object> session)
- Specified by:
setSession in interface org.apache.struts2.interceptor.SessionAware
Copyright © 2012. All Rights Reserved.