com.ivata.mask.web.struts
Class FindAction

java.lang.Object
  extended byorg.apache.struts.action.Action
      extended bycom.ivata.mask.web.struts.MaskAction
          extended bycom.ivata.mask.web.struts.FindAction

public class FindAction
extends MaskAction

View a value object in a mask for display or deletion.

Since:
ivata masks 0.1 (2004-05-10)
Version:
$Revision: 1.8.2.1 $
Author:
Colin MacLeod colin.macleod@ivata.com

Field Summary
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
FindAction(com.ivata.mask.persistence.PersistenceManager persistenceManagerParam, com.ivata.mask.MaskFactory maskFactoryParam, MaskAuthenticator authenticatorParam)
           Create a new AddAction with the given value object locator.
 
Method Summary
protected  InputMaskForm createInputMaskForm(javax.servlet.http.HttpServletRequest requestParam, com.ivata.mask.valueobject.ValueObject valueObjectParam, com.ivata.mask.Mask maskParam, java.lang.Class baseClassParam)
           Override this method to create a different class of input mask form.
 java.lang.String execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionErrors errors, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpSession session)
           Generic method called by the Struts interface.
protected  java.lang.String getBaseClassName()
          Class of value object we are to find.
protected  java.lang.Boolean getDisplayOnly()
          true if we should only display the value object (rather than edit it).
protected  java.lang.String getIdString()
          Unique identifier of the value object.
protected  void setBaseClassName(java.lang.String baseClassNameParam)
          Class of value object we are to find.
protected  void setDisplayOnly(java.lang.Boolean displayOnlyParam)
          true if we should only display the value object (rather than edit it).
protected  void setIdString(java.lang.String idStringParam)
          Unique identifier of the value object.
 
Methods inherited from class com.ivata.mask.web.struts.MaskAction
clear, execute, getAuthenticator, getFromRequestOrForm, getFromRequestOrForm, getInputMask, getListMask, getMaskFactory, isCancelled, onConfirm, onDelete, setLogin
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, 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
 

Constructor Detail

FindAction

public FindAction(com.ivata.mask.persistence.PersistenceManager persistenceManagerParam,
                  com.ivata.mask.MaskFactory maskFactoryParam,
                  MaskAuthenticator authenticatorParam)

Create a new AddAction with the given value object locator.

Parameters:
persistenceManagerParam - used to locate the value objects by their unique identifier.
maskFactoryParam - This factory is needed to access the masks and groups of masks.
authenticatorParam - used to confirm whether or not the user should be allowed to continue, in the execute method.
Method Detail

createInputMaskForm

protected InputMaskForm createInputMaskForm(javax.servlet.http.HttpServletRequest requestParam,
                                            com.ivata.mask.valueobject.ValueObject valueObjectParam,
                                            com.ivata.mask.Mask maskParam,
                                            java.lang.Class baseClassParam)

Override this method to create a different class of input mask form.

Parameters:
requestParam - request we are processing.
valueObjectParam - value object to be displayed/edited.
maskParam - mask to be edited.
baseClassParam - base class of all value objects to show in the list or associated with this mask.
Returns:
new instance of InputMaskForm.
Since:
ivata op (0.10) (2004-12-31)

execute

public java.lang.String execute(org.apache.struts.action.ActionMapping mapping,
                                org.apache.struts.action.ActionErrors errors,
                                org.apache.struts.action.ActionForm form,
                                javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response,
                                javax.servlet.http.HttpSession session)
                         throws com.ivata.mask.util.SystemException

Generic method called by the Struts interface. Looks for a request parameter called "idString" and removes the value object with this id.

Additionally, specifying a request parameter called "readOnly" to true will cause the mask form to be created in read only (display) mode.

Refer to MaskAction.execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionErrors, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpSession).

Overrides:
execute in class MaskAction
Parameters:
mapping - Refer to MaskAction.execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionErrors, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpSession).
errors - Refer to MaskAction.execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionErrors, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpSession).
form - Refer to MaskAction.execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionErrors, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpSession).
request - Refer to MaskAction.execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionErrors, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpSession).
response - Refer to MaskAction.execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionErrors, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpSession).
session - Refer to MaskAction.execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionErrors, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpSession).
Returns:
Refer to MaskAction.execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionErrors, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpSession).
Throws:
com.ivata.mask.util.SystemException - Refer to MaskAction.execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionErrors, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpSession).

getBaseClassName

protected java.lang.String getBaseClassName()
Class of value object we are to find.

Returns:
Returns the baseClassName.

getDisplayOnly

protected java.lang.Boolean getDisplayOnly()
true if we should only display the value object (rather than edit it).

Returns:
Returns the displayOnly.

getIdString

protected java.lang.String getIdString()
Unique identifier of the value object.

Returns:
Returns the idString.

setBaseClassName

protected void setBaseClassName(java.lang.String baseClassNameParam)
Class of value object we are to find.

Parameters:
baseClassNameParam - The baseClassName to set.

setDisplayOnly

protected void setDisplayOnly(java.lang.Boolean displayOnlyParam)
true if we should only display the value object (rather than edit it).

Parameters:
displayOnlyParam - The displayOnly to set.

setIdString

protected void setIdString(java.lang.String idStringParam)
Unique identifier of the value object.

Parameters:
idStringParam - The idString to set.


Copyright © 2001-2005 ivata limited. All Rights Reserved.