org.figure8.join.control.action
Class UserActions

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.figure8.join.control.JoinAction
          extended by org.figure8.join.control.action.UserActions
Direct Known Subclasses:
CreateUserAction

public class UserActions
extends JoinAction

Struts action used for managing Users within Join application

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux

Field Summary
protected  ArtifactManager artifactManager
          The artifact manager implementation to use.
protected  AssemblyManager assemblyManager
          The assembly manager implementation to use.
static java.lang.String DETAILS_OP
          Operation code for getting details on a specific User
static java.lang.String LOAD_OP
          Operation code for loading a specific User
static java.lang.String SAVE_OP
          Operation code for saving a specific User
static java.lang.String SEARCH_OP
          Operation code for searching users using lastname
static java.lang.String USER_KEY
          The session scope attribute under which the User object currently selected or created by our logged-in User is stored.
protected  UserManager userManager
          A Join User manager instance
static java.lang.String USERS_KEY
          The request scope attribute under which the retrieved Users list is stored.
 
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
UserActions()
          Creates a new instance of UserActions.
 
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)
          Abstract method that subclasses must implement.
protected  org.apache.struts.action.ActionForward getUserDetails(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Get a user details such has its informations and artifacts it has delivered, build, etc...
protected  org.apache.struts.action.ActionForward loadUser(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Load a specified user from datastore and fill form with it.
protected  org.apache.struts.action.ActionForward saveUser(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Save an updated and existing user from datastore.
protected  org.apache.struts.action.ActionForward searchUsers(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Retrieve a list of Users using the lastname criterion.
 void setArtifactManager(ArtifactManager manager)
           
 void setAssemblyManager(AssemblyManager manager)
           
 void setUserManager(UserManager 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

LOAD_OP

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

See Also:
Constant Field Values

SAVE_OP

public static final java.lang.String SAVE_OP
Operation code for saving a specific User

See Also:
Constant Field Values

SEARCH_OP

public static final java.lang.String SEARCH_OP
Operation code for searching users using lastname

See Also:
Constant Field Values

DETAILS_OP

public static final java.lang.String DETAILS_OP
Operation code for getting details on a specific User

See Also:
Constant Field Values

USER_KEY

public static final java.lang.String USER_KEY
The session scope attribute under which the User object currently selected or created by our logged-in User is stored.

See Also:
Constant Field Values

USERS_KEY

public static final java.lang.String USERS_KEY
The request scope attribute under which the retrieved Users list is stored.

See Also:
Constant Field Values

userManager

protected UserManager userManager
A Join User manager instance


artifactManager

protected ArtifactManager artifactManager
The artifact manager implementation to use.


assemblyManager

protected AssemblyManager assemblyManager
The assembly manager implementation to use.

Constructor Detail

UserActions

public UserActions()
Creates a new instance of UserActions.

Method Detail

setUserManager

public void setUserManager(UserManager manager)
Parameters:
manager - UserManager implementation instance

setArtifactManager

public void setArtifactManager(ArtifactManager manager)
Parameters:
manager - The ArtifactManager implementation to use

setAssemblyManager

public void setAssemblyManager(AssemblyManager manager)
Parameters:
manager - The AssemblyManager implementation to use

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
Description copied from class: JoinAction
Abstract method that subclasses must implement. The real execution must be done here according to the specified operation. ActionForward returned by execution should only point on page fragment : this superclass is responsible of including them within a whole page.

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 ...

loadUser

protected org.apache.struts.action.ActionForward loadUser(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
Load a specified user from datastore and fill form with it.

Returns:
A forward to the next view to render and display
Throws:
java.lang.Exception

saveUser

protected org.apache.struts.action.ActionForward saveUser(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
Save an updated and existing user from datastore. User should have been loaded before and the present into the USER_KEY session attribute.

Returns:
A forward to the next view to render and display
Throws:
java.lang.Exception

searchUsers

protected org.apache.struts.action.ActionForward searchUsers(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
Retrieve a list of Users using the lastname criterion. This lastname information is retrieved : from User present in session under USER_KEY attribute if present of from the UserForm supplied with request. The research is done using the getUsers() method of UserManager.

Returns:
A forward to the next view to render and display
Throws:
java.lang.Exception

getUserDetails

protected org.apache.struts.action.ActionForward getUserDetails(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
Get a user details such has its informations and artifacts it has delivered, build, etc...

Returns:
A forward to the next view to render and display
Throws:
java.lang.Exception


Copyright © 2005-2008 Join. All Rights Reserved.