org.figure8.join.control.action
Class SetupActions

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

public class SetupActions
extends JoinAction

Struts action used for setting up Join application

Version:
$Revision: 1.3 $
Author:
Laurent Broudoux, Vincent Huynen

Field Summary
protected  ApplicationConfig appConfiguration
          Application configuration manager.
protected  BootstrapManager bootstrapManager
          Application bootstrap manager.
protected  XmlDatabinder dataBinder
          Xml databinder for importing default entities from Xml
protected  ObjectDao genericDao
          Generic object dao for saving default entities
protected  PermissionManager permissionManager
          Join security permissions manager.
static java.lang.String SETUP_ADMIN_OP
          Operation code for setting administrator
static java.lang.String SETUP_DATAB_OP
          Operation code for setting database details
static java.lang.String SETUP_DATAS_OP
          Operation code for setting datasource details
static java.lang.String SETUP_EMBED_OP
          Operation code for setting embedded database
static java.lang.String SETUP_EXTERN_OP
          Operation code for setting up external database
static java.lang.String SETUP_FINISH_OP
          Operation code for finishing setup process
static java.lang.String SETUP_MODE_OP
          Operation code for setting simple or dissociated installation
static java.lang.String SETUP_OTHERSIDE_OP
          Operation code for setting application other side properties
static java.lang.String SETUP_SYNCH_OP
          Operation code for setting synchronous property of installation
static java.lang.String SETUP_TYPE_OP
          Operation code for setting setup type
protected  java.lang.String setupType
          Choosen setup type (first step of setup)
protected  UserManager userManager
          Join application user manager.
 
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
SetupActions()
          Creates a new instance of SetupActions
 
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)
          Execute the requested operation within action.s
protected  org.apache.struts.action.ActionForward finishSetup(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Finish the setup process by telling the configuration manager that setup is now complete.
protected  boolean isCustomSetup()
           
protected  boolean isStandardSetup()
           
 void setApplicationConfig(ApplicationConfig config)
           
 void setBootstrapManager(BootstrapManager manager)
           
 void setObjectDao(ObjectDao genericDao)
           
 void setPermissionManager(PermissionManager manager)
           
protected  org.apache.struts.action.ActionForward setupAdministrator(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Register administrator user into datastore.
protected  org.apache.struts.action.ActionForward setupDatabase(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Setup the database access properties and bootstrap Hibernate.
protected  org.apache.struts.action.ActionForward setupDatasource(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Setup the database access properties through datasource and bootstrap Hibernate.
protected  org.apache.struts.action.ActionForward setupDissociation(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Save the installation dissociation mode : the setup is whether simple or dissociated applications sides (one for synchronous services, one for asynchronous services)
protected  org.apache.struts.action.ActionForward setupEmbedded(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Setup the embedded database and bootstrap Hibernate.
protected  org.apache.struts.action.ActionForward setupOtherSideAccess(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Save configuration on how to access application other side
protected  org.apache.struts.action.ActionForward setupSynchronisation(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Save configuration of synchronous or asynchronous side.
protected  org.apache.struts.action.ActionForward setupType(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Save choosen setup type and forward according to this type.
 void setUserManager(UserManager manager)
           
 void setXmlDatabinder(XmlDatabinder dataBinder)
           
 
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

SETUP_TYPE_OP

public static final java.lang.String SETUP_TYPE_OP
Operation code for setting setup type

See Also:
Constant Field Values

SETUP_MODE_OP

public static final java.lang.String SETUP_MODE_OP
Operation code for setting simple or dissociated installation

See Also:
Constant Field Values

SETUP_SYNCH_OP

public static final java.lang.String SETUP_SYNCH_OP
Operation code for setting synchronous property of installation

See Also:
Constant Field Values

SETUP_OTHERSIDE_OP

public static final java.lang.String SETUP_OTHERSIDE_OP
Operation code for setting application other side properties

See Also:
Constant Field Values

SETUP_ADMIN_OP

public static final java.lang.String SETUP_ADMIN_OP
Operation code for setting administrator

See Also:
Constant Field Values

SETUP_EMBED_OP

public static final java.lang.String SETUP_EMBED_OP
Operation code for setting embedded database

See Also:
Constant Field Values

SETUP_EXTERN_OP

public static final java.lang.String SETUP_EXTERN_OP
Operation code for setting up external database

See Also:
Constant Field Values

SETUP_DATAB_OP

public static final java.lang.String SETUP_DATAB_OP
Operation code for setting database details

See Also:
Constant Field Values

SETUP_DATAS_OP

public static final java.lang.String SETUP_DATAS_OP
Operation code for setting datasource details

See Also:
Constant Field Values

SETUP_FINISH_OP

public static final java.lang.String SETUP_FINISH_OP
Operation code for finishing setup process

See Also:
Constant Field Values

setupType

protected java.lang.String setupType
Choosen setup type (first step of setup)


bootstrapManager

protected BootstrapManager bootstrapManager
Application bootstrap manager.


appConfiguration

protected ApplicationConfig appConfiguration
Application configuration manager.


genericDao

protected ObjectDao genericDao
Generic object dao for saving default entities


dataBinder

protected XmlDatabinder dataBinder
Xml databinder for importing default entities from Xml


userManager

protected UserManager userManager
Join application user manager.


permissionManager

protected PermissionManager permissionManager
Join security permissions manager.

Constructor Detail

SetupActions

public SetupActions()
Creates a new instance of SetupActions

Method Detail

setBootstrapManager

public void setBootstrapManager(BootstrapManager manager)
Parameters:
manager - BoostrapManager instance

setApplicationConfig

public void setApplicationConfig(ApplicationConfig config)
Parameters:
config - ApplicationConfig instance

setObjectDao

public void setObjectDao(ObjectDao genericDao)
Parameters:
genericDao - ObjectDao implementation instance

setXmlDatabinder

public void setXmlDatabinder(XmlDatabinder dataBinder)
Parameters:
dataBinder - XmlDatabinder implementation instance

setUserManager

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

setPermissionManager

public void setPermissionManager(PermissionManager manager)
Parameters:
manager - PermissionManager implementation instance

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
Execute the requested operation within action.s

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 - is something wrong occurs

setupType

protected org.apache.struts.action.ActionForward setupType(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 choosen setup type and forward according to this type.

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

setupDissociation

protected org.apache.struts.action.ActionForward setupDissociation(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 the installation dissociation mode : the setup is whether simple or dissociated applications sides (one for synchronous services, one for asynchronous services)

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

setupSynchronisation

protected org.apache.struts.action.ActionForward setupSynchronisation(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 configuration of synchronous or asynchronous side.

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

setupOtherSideAccess

protected org.apache.struts.action.ActionForward setupOtherSideAccess(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 configuration on how to access application other side

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

setupAdministrator

protected org.apache.struts.action.ActionForward setupAdministrator(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
Register administrator user into datastore. If setup type is standard, the embedded database should first be boostrapped.

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

setupEmbedded

protected org.apache.struts.action.ActionForward setupEmbedded(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
Setup the embedded database and bootstrap Hibernate.

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

setupDatabase

protected org.apache.struts.action.ActionForward setupDatabase(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
Setup the database access properties and bootstrap Hibernate.

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

setupDatasource

protected org.apache.struts.action.ActionForward setupDatasource(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
Setup the database access properties through datasource and bootstrap Hibernate.

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

finishSetup

protected org.apache.struts.action.ActionForward finishSetup(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
Finish the setup process by telling the configuration manager that setup is now complete. Save configuration and put context & request attributes telling so before forwarding.

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

isCustomSetup

protected boolean isCustomSetup()
Returns:
True if the current setup type is a custom one

isStandardSetup

protected boolean isStandardSetup()
Returns:
True if the current setup type is a standard one


Copyright © 2005-2008 Join. All Rights Reserved.