org.figure8.join.control.action
Class ParameterActions

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.figure8.join.control.JoinAction
          extended by org.figure8.join.control.action.ParameterActions

public class ParameterActions
extends JoinAction

Struts action used for managing the parameters used by software project integration team for delpoyments.

Version:
$Revision: 1.2 $
Author:
Jerome Evrard

Field Summary
static java.lang.String DUPLICATE_PARAMETER_KEY
          The request scope attribute under which is stored the Parameters that has raised a DuplicateEntityException during save of another one.
static java.lang.String FORWARD_TO_VALUES_KEY
          Attribute to forward to parameters values page on parameter adding
static java.lang.String FROM_VALUES_OP
          Add a parameter from the parameter values page
static java.lang.String LOAD_OP
          Operation code for loading a specific Parameter
protected static org.apache.commons.logging.Log log
          Get a commons logger.
static java.lang.String NAME_KEY
          The parameter name key
static java.lang.String PARAMETER_KEY
          The key used for request scope attribute containing loaded parameter
static java.lang.String PARAMETERS_KEY
          The key used for request scope attribute containing parameters list
static java.lang.String REMOVE_OP
          Operation code to remove a specific Parameter
static java.lang.String SAVE_OP
          Operation code to create a specific Parameter
 
Fields inherited from class org.figure8.join.control.JoinAction
BODY_ATTRIBUTE, BODY_PARAMETER, EXCEPTION_KEY, GUI_KEY, OP_PARAMETER, REND_MAIN, REND_NONE, REND_PARAMETER, REND_POPUP, XHR_PARAMETER
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
ParameterActions()
          Creates a new instance of ParameterActions.
 
Method Summary
 org.apache.struts.action.ActionForward doExecute(java.lang.String operation, org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Action to manage parameters.
protected  Parameter loadParameter(java.lang.String name)
          Find a parameter specified by its name.
protected  void saveParameter(java.lang.String name, java.lang.String description)
          Create a new parameter.
 void setParameterManager(ParameterManager manager)
           
 
Methods inherited from class org.figure8.join.control.JoinAction
execute, getUserContainer, isLoggedIn, isXhrRequest, removeObsoleteForm
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, 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

log

protected static org.apache.commons.logging.Log log
Get a commons logger.


LOAD_OP

public static final java.lang.String LOAD_OP
Operation code for loading a specific Parameter

See Also:
Constant Field Values

SAVE_OP

public static final java.lang.String SAVE_OP
Operation code to create a specific Parameter

See Also:
Constant Field Values

REMOVE_OP

public static final java.lang.String REMOVE_OP
Operation code to remove a specific Parameter

See Also:
Constant Field Values

FROM_VALUES_OP

public static final java.lang.String FROM_VALUES_OP
Add a parameter from the parameter values page

See Also:
Constant Field Values

NAME_KEY

public static final java.lang.String NAME_KEY
The parameter name key

See Also:
Constant Field Values

PARAMETER_KEY

public static final java.lang.String PARAMETER_KEY
The key used for request scope attribute containing loaded parameter

See Also:
Constant Field Values

PARAMETERS_KEY

public static final java.lang.String PARAMETERS_KEY
The key used for request scope attribute containing parameters list

See Also:
Constant Field Values

FORWARD_TO_VALUES_KEY

public static final java.lang.String FORWARD_TO_VALUES_KEY
Attribute to forward to parameters values page on parameter adding

See Also:
Constant Field Values

DUPLICATE_PARAMETER_KEY

public static final java.lang.String DUPLICATE_PARAMETER_KEY
The request scope attribute under which is stored the Parameters that has raised a DuplicateEntityException during save of another one.

See Also:
Constant Field Values
Constructor Detail

ParameterActions

public ParameterActions()
Creates a new instance of ParameterActions.

Method Detail

setParameterManager

public void setParameterManager(ParameterManager manager)
Parameters:
manager - The parameterManager to set.

doExecute

public org.apache.struts.action.ActionForward doExecute(java.lang.String operation,
                                                        org.apache.struts.action.ActionMapping mapping,
                                                        org.apache.struts.action.ActionForm form,
                                                        javax.servlet.http.HttpServletRequest request,
                                                        javax.servlet.http.HttpServletResponse response)
                                                 throws java.lang.Exception
Action to manage parameters.

Specified by:
doExecute in class JoinAction
Parameters:
operation - String representing the operation to invoke on Action
mapping - Mapping between forwards name and path for this action
form - The form object containing request parameters
request - The servlet container request wrapper
response - The servlet container response wrapper
Returns:
A forward to the next view to render and display
Throws:
java.lang.Exception - such as InfraStructureExceptions ...

loadParameter

protected Parameter loadParameter(java.lang.String name)
Find a parameter specified by its name.

Parameters:
name - The parameter name to load.
Returns:
The parameter found or null if not exists.

saveParameter

protected void saveParameter(java.lang.String name,
                             java.lang.String description)
                      throws DuplicateEntityException
Create a new parameter.

Parameters:
name - The parameter name.
description - The parameter description.
Throws:
DuplicateEntityException


Copyright © 2005-2008 Join. All Rights Reserved.