org.objectweb.jonas.webapp.jonasadmin.deploy
Class BaseDeployAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction
          extended by org.objectweb.jonas.webapp.jonasadmin.deploy.BaseDeployAction
Direct Known Subclasses:
ApplyCreateResourceAdapterAction, ApplyDatasourcePropertiesAction, ApplyDeployAction, ApplyDeployConfirmAction, ApplyDestinationAction, ApplyDestinationAction, ApplyDomainDeployAction, ApplyDomainDeployConfirmAction, ApplyLocalDestinationAction, ApplyRemoveAction, ApplyRemoveConfirmAction, ApplyTemplateCreateResourceAdapterAction, ApplyUploadAction, ApplyUserAction, ArchiveConfigAction, ArchiveConfigAdvancedAction, ArchiveConfigSelectAction, ArchiveUtilAction, BaseLoggerAction, BaseSecurityAction, BaseWebAppAction, CatalinaBaseAction, CreateResourceAdapterAction, EditDeployAction, EditDomainDeployAction, EditJoramBaseAction, EditMailFactoryPropertiesAction, EditRemoveAction, EditUploadAction, RemoveConfirmDestinationsAction, RemoveConfirmUsersAction

public abstract class BaseDeployAction
extends JonasBaseAction

Author:
Michel-Ange ANTON

Field Summary
 
Fields inherited from class org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction
DEPTH_DOMAIN, DEPTH_SERVER, m_Errors, m_Resources, m_Session, m_WhereAreYou
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
BaseDeployAction()
           
 
Method Summary
protected  void deploy(java.lang.String p_Filename)
          Deploy a file in using the type of current deployment storing in WhereAreYou instance in session.
protected  void deployDataSource(java.lang.String p_Filename)
          Deploy a datasource file.
protected  void deployMailFactory(java.lang.String p_Filename)
          Deploy a mail factory.
protected  int getCurrentJonasDeployment()
           
protected  java.lang.String getDomainDeploymentMethodName()
           
protected  java.lang.String getDomainUploadDeployMethodName()
           
protected  java.lang.String getForwardEdit()
          Return the edit forward string.
protected  java.util.ArrayList getListDeployableFiles()
          Return the list of deployable files in using the type of current deployment storing in WhereAreYou instance in session.
protected  java.util.ArrayList getListDeployedFiles()
          Return the list of deployed files in using the type of current deployment storing in WhereAreYou instance in session.
protected  boolean isConfigurable()
           
protected  boolean isDomain()
           
protected  boolean isModule()
           
protected  void refreshJoramTree(javax.servlet.http.HttpServletRequest p_Request, java.lang.String serverId)
          Refresh the Joram tree after creating / removing a Joram destination or after deploying / undeploying the Joram RAR
protected  void refreshMBeansTree(javax.servlet.http.HttpServletRequest p_Request)
          Refresh the MBeans tree.
protected  void refreshServiceTree(int p_Deployment, javax.servlet.http.HttpServletRequest p_Request)
          Refresh the service tree.
protected  void refreshTree(javax.servlet.http.HttpServletRequest p_Request)
          Refresh the tree.
protected  void refreshWebServiceTree(javax.servlet.http.HttpServletRequest p_Request)
           
protected  boolean removeFile(java.lang.String fileName)
          Remove a given file
protected  void runGC()
          Run garbage collector.
protected  void setCurrentJonasDeployment(javax.servlet.http.HttpServletRequest p_Request)
           
protected  void undeploy(java.lang.String p_Filename)
          Undeploy a file in using the type of current deployment storing in WhereAreYou instance in session.
protected  void undeployDataSource(java.lang.String p_Filename)
          Undeploy a datasource file.
protected  void undeployMailFactory(java.lang.String p_Filename)
          Undeploy a mail factory.
 
Methods inherited from class org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction
addGlobalError, execute, executeAction, getBooleanAttribute, getBooleanAttribute, getBooleanAttribute, getIntegerAttribute, getIntegerAttribute, getIntegerAttribute, getJonasBase, getListAttribute, getLongAttribute, getLongAttribute, getLongAttribute, getPropsFromString, getShortAttribute, getStringArrayAttribute, getStringAttribute, getStringAttribute, getStringAttribute, getTreeBranchName, initialize, refreshDomainDeployTree, refreshDomainMonitoringTree, refreshServerTree, removeChar, setBooleanAttribute, setBooleanAttribute, setIntegerAttribute, setIntegerAttribute, setIntegerAttribute, setLongAttribute, setLongAttribute, setShortAttribute, setStringAttribute, setStringAttribute, setStringAttribute, toStringBooleanAttribute, toStringIntegerAttribute, toStringLongAttribute, toStringShortAttribute
 
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, 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

BaseDeployAction

public BaseDeployAction()
Method Detail

getCurrentJonasDeployment

protected int getCurrentJonasDeployment()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

setCurrentJonasDeployment

protected void setCurrentJonasDeployment(javax.servlet.http.HttpServletRequest p_Request)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

getForwardEdit

protected java.lang.String getForwardEdit()
Return the edit forward string.

Returns:
The edit forward string

isDomain

protected boolean isDomain()

isConfigurable

protected boolean isConfigurable()

isModule

protected boolean isModule()

getDomainDeploymentMethodName

protected java.lang.String getDomainDeploymentMethodName()

getDomainUploadDeployMethodName

protected java.lang.String getDomainUploadDeployMethodName()

getListDeployableFiles

protected java.util.ArrayList getListDeployableFiles()
                                              throws java.lang.Exception
Return the list of deployable files in using the type of current deployment storing in WhereAreYou instance in session.

Returns:
The list of deployable files
Throws:
java.lang.Exception

getListDeployedFiles

protected java.util.ArrayList getListDeployedFiles()
                                            throws java.lang.Exception
Return the list of deployed files in using the type of current deployment storing in WhereAreYou instance in session.

Returns:
The list of deployed files
Throws:
java.lang.Exception

undeploy

protected void undeploy(java.lang.String p_Filename)
                 throws java.lang.Exception
Undeploy a file in using the type of current deployment storing in WhereAreYou instance in session.

Parameters:
p_Filename - Name of file to undeploy
Throws:
java.lang.Exception

undeployDataSource

protected void undeployDataSource(java.lang.String p_Filename)
                           throws java.lang.Exception
Undeploy a datasource file.

Parameters:
p_Filename - Name of file to undeploy
Throws:
java.lang.Exception

undeployMailFactory

protected void undeployMailFactory(java.lang.String p_Filename)
                            throws java.lang.Exception
Undeploy a mail factory.

Parameters:
p_Filename - Name of the factory (same as the props file name configuring it)
Throws:
java.lang.Exception

deploy

protected void deploy(java.lang.String p_Filename)
               throws java.lang.Exception
Deploy a file in using the type of current deployment storing in WhereAreYou instance in session.

Parameters:
p_Filename - Name of file to deploy
Throws:
java.lang.Exception

deployDataSource

protected void deployDataSource(java.lang.String p_Filename)
                         throws java.lang.Exception
Deploy a datasource file.

Parameters:
p_Filename - Name of file to deploy
Throws:
java.lang.Exception

deployMailFactory

protected void deployMailFactory(java.lang.String p_Filename)
                          throws java.lang.Exception
Deploy a mail factory.

Parameters:
p_Filename - Name of the mail factory whch is also the name of the file
Throws:
java.lang.Exception

runGC

protected void runGC()
              throws java.lang.Exception
Run garbage collector.

Throws:
java.lang.Exception

refreshTree

protected void refreshTree(javax.servlet.http.HttpServletRequest p_Request)
                    throws java.lang.Exception
Refresh the tree.

Parameters:
p_Request - The current HTTP Request
Throws:
java.lang.Exception

refreshServiceTree

protected void refreshServiceTree(int p_Deployment,
                                  javax.servlet.http.HttpServletRequest p_Request)
                           throws java.lang.Exception
Refresh the service tree.

Parameters:
p_Deployment - The type of deployment
p_Request - The current HTTP Request
Throws:
java.lang.Exception

refreshWebServiceTree

protected void refreshWebServiceTree(javax.servlet.http.HttpServletRequest p_Request)
                              throws java.lang.Exception
Throws:
java.lang.Exception

refreshMBeansTree

protected void refreshMBeansTree(javax.servlet.http.HttpServletRequest p_Request)
                          throws java.lang.Exception
Refresh the MBeans tree.

Throws:
java.lang.Exception

refreshJoramTree

protected void refreshJoramTree(javax.servlet.http.HttpServletRequest p_Request,
                                java.lang.String serverId)
                         throws java.lang.Exception
Refresh the Joram tree after creating / removing a Joram destination or after deploying / undeploying the Joram RAR

Parameters:
serverId - Id of the Joram server which was updated
Throws:
java.lang.Exception

removeFile

protected boolean removeFile(java.lang.String fileName)
                      throws java.lang.Exception
Remove a given file

Parameters:
fileName - Name of file to remove
Returns:
true if file has been removed
Throws:
java.lang.Exception - if remove fails