net.smartlab.web
Class AbstractArchiveAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by net.smartlab.web.Action
          extended by net.smartlab.web.DynaAction
              extended by net.smartlab.web.AbstractArchiveAction

public abstract class AbstractArchiveAction
extends DynaAction

This is the base action for generic archive management. The class provides template methods for common archive management operations and provides support methods to handle common problems like multiple selections and search criteria.

Author:
rlogiacco

Field Summary
static java.lang.String SELECTION
          The standard name for a multiple selection request parameter.
 
Fields inherited from class net.smartlab.web.DynaAction
PARAMETERS
 
Fields inherited from class net.smartlab.web.Action
DEFAULT_FORWARD, logger
 
Fields inherited from class org.apache.struts.action.Action
servlet
 
Constructor Summary
AbstractArchiveAction()
           
 
Method Summary
static java.lang.String[] getListSelection(javax.servlet.ServletRequest request)
          TODO documentation
static DataAccessObject.SearchInfo getSearchInfo(javax.servlet.http.HttpServletRequest request)
          Parses the request searching for standard filtering and ordering parameters.
static java.lang.String[] getSelection(org.apache.struts.action.ActionForm form, java.lang.String name)
          TODO documentation
abstract  java.lang.String remove(org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionMapping mapping)
          This action method should be invoked to permanently remove an item.
abstract  java.lang.String removeAll(org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionMapping mapping)
          This action method should be invoked to permanently remove a set of items.
static void resetSelection(org.apache.struts.action.ActionForm form, java.lang.String name)
          TODO documentation
abstract  java.lang.String search(org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionMapping mapping)
          This action method should be invoked to list items matching a set of specified criteria.
abstract  java.lang.String select(org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionMapping mapping)
          This action method should be invoked to retrieve a specific item.
static void setSelection(org.apache.struts.action.ActionForm form, java.lang.String name, java.lang.String[] values)
          TODO documentation
abstract  java.lang.String update(org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionMapping mapping)
          This action method should be invoked to save or update an item.
 
Methods inherited from class net.smartlab.web.DynaAction
execute, forward
 
Methods inherited from class net.smartlab.web.Action
addError, addError, cancel, execute, getProperties, getRealPath, getServletContext, hasErrors, isChecked, populate, reset, valorize
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECTION

public static final java.lang.String SELECTION
The standard name for a multiple selection request parameter.

See Also:
Constant Field Values
Constructor Detail

AbstractArchiveAction

public AbstractArchiveAction()
Method Detail

search

public abstract java.lang.String search(org.apache.struts.action.ActionForm form,
                                        javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response,
                                        org.apache.struts.action.ActionMapping mapping)
                                 throws java.lang.Exception
This action method should be invoked to list items matching a set of specified criteria.

Parameters:
form - the html form submitted with this request.
request - the user request.
response - the representation of the response channel.
mapping - the system control mapping.
Returns:
the name of a defined global or local forward.
Throws:
java.lang.Exception - if something unexpected happend during the request execution.

select

public abstract java.lang.String select(org.apache.struts.action.ActionForm form,
                                        javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response,
                                        org.apache.struts.action.ActionMapping mapping)
                                 throws java.lang.Exception
This action method should be invoked to retrieve a specific item.

Parameters:
form - the html form submitted with this request.
request - the user request.
response - the representation of the response channel.
mapping - the system control mapping.
Returns:
the name of a defined global or local forward.
Throws:
java.lang.Exception - if something unexpected happend during the request execution.

update

public abstract java.lang.String update(org.apache.struts.action.ActionForm form,
                                        javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response,
                                        org.apache.struts.action.ActionMapping mapping)
                                 throws java.lang.Exception
This action method should be invoked to save or update an item.

Parameters:
form - the html form submitted with this request.
request - the user request.
response - the representation of the response channel.
mapping - the system control mapping.
Returns:
the name of a defined global or local forward.
Throws:
java.lang.Exception - if something unexpected happend during the request execution.

remove

public abstract java.lang.String remove(org.apache.struts.action.ActionForm form,
                                        javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response,
                                        org.apache.struts.action.ActionMapping mapping)
                                 throws java.lang.Exception
This action method should be invoked to permanently remove an item.

Parameters:
form - the html form submitted with this request.
request - the user request.
response - the representation of the response channel.
mapping - the system control mapping.
Returns:
the name of a defined global or local forward.
Throws:
java.lang.Exception - if something unexpected happend during the request execution.

removeAll

public abstract java.lang.String removeAll(org.apache.struts.action.ActionForm form,
                                           javax.servlet.http.HttpServletRequest request,
                                           javax.servlet.http.HttpServletResponse response,
                                           org.apache.struts.action.ActionMapping mapping)
                                    throws java.lang.Exception
This action method should be invoked to permanently remove a set of items.

Parameters:
form - the html form submitted with this request.
request - the user request.
response - the representation of the response channel.
mapping - the system control mapping.
Returns:
the name of a defined global or local forward.
Throws:
java.lang.Exception - if something unexpected happend during the request execution.

getListSelection

public static java.lang.String[] getListSelection(javax.servlet.ServletRequest request)
TODO documentation

Parameters:
request - the user request.
Returns:

getSelection

public static java.lang.String[] getSelection(org.apache.struts.action.ActionForm form,
                                              java.lang.String name)
TODO documentation

Parameters:
request - the user request.
form -
name -
Returns:

setSelection

public static void setSelection(org.apache.struts.action.ActionForm form,
                                java.lang.String name,
                                java.lang.String[] values)
TODO documentation

Parameters:
form -
name -
values -

resetSelection

public static void resetSelection(org.apache.struts.action.ActionForm form,
                                  java.lang.String name)
TODO documentation

Parameters:
form -
name -

getSearchInfo

public static DataAccessObject.SearchInfo getSearchInfo(javax.servlet.http.HttpServletRequest request)
Parses the request searching for standard filtering and ordering parameters.

Parameters:
request - the received request.
Returns:
filtering and ordering parameters.


Copyright © 2004-2009 The SmartWeb Team. All Rights Reserved.