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

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.ow2.jonas.webapp.jonasadmin.JonasBaseAction
          extended by org.ow2.jonas.webapp.jonasadmin.deploy.BaseDeployAction
Direct Known Subclasses:
ApplyCreateResourceAdapterAction, ApplyDatasourcePropertiesAction, ApplyDeployAction, ApplyDeployConfirmAction, ApplyDestinationAction, ApplyDestinationAction, ApplyDomainDeployAction, ApplyDomainDeployConfirmAction, 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, Adriana Danes

Field Summary
 
Fields inherited from class org.ow2.jonas.webapp.jonasadmin.JonasBaseAction
DEPTH_DOMAIN, DEPTH_SERVER, GLOBAL_ERROR_FORWARD, 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(String p_Filename)
          Deploy a file in using the type of current deployment storing in WhereAreYou instance in session.
protected  void deployDataSource(String p_Filename)
          Deploy a datasource file.
protected  void deployMailFactory(String domainName, String p_Filename)
          Deploy a mail factory.
protected  void deployModule(String filename, String serverName)
           
protected  int getCurrentJonasDeployment()
           
protected  String getDomainDeploymentMethodName()
           
protected  String getDomainUploadDeployMethodName()
           
protected  String getForwardEdit()
          Return the edit forward string.
protected  ArrayList getListDeployableFiles()
          Return the list of deployable files in using the type of current deployment storing in WhereAreYou instance in session.
protected  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 isDeployment(String p_Filename)
           
protected  boolean isDomain()
           
protected  boolean isModule()
           
protected  void refreshJoramTree(HttpServletRequest pRequest, String serverId)
          Refresh the Joram tree after creating / removing a Joram destination.
protected  void refreshMBeansTree(HttpServletRequest p_Request)
          Refresh the MBeans tree.
protected  void refreshServiceTree(int p_Deployment, HttpServletRequest p_Request)
          Refresh the service tree.
protected  void refreshTree(HttpServletRequest pRequest)
          Refresh the tree.
protected  void refreshWebServiceTree(HttpServletRequest pRequest)
           
protected  boolean removeFile(String fileName)
          Remove a given file.
protected  boolean removeModule(String filename, String serverName)
           
protected  void runGC()
          Run garbage collector.
protected  void setCurrentJonasDeployment(HttpServletRequest p_Request)
           
protected  void undeploy(String p_Filename)
          Undeploy a file in using the type of current deployment storing in WhereAreYou instance in session.
protected  void undeployDataSource(String p_Filename)
          Undeploy a datasource file.
protected  void undeployMailFactory(String domainName, String p_Filename)
          Undeploy a mail factory.
protected  void undeployModule(String filename, String serverName, String domainName)
           
 
Methods inherited from class org.ow2.jonas.webapp.jonasadmin.JonasBaseAction
addGlobalError, execute, executeAction, getAttributes, getBooleanAttribute, getBooleanAttribute, getBooleanAttribute, getIntAttribute, getIntegerAttribute, getIntegerAttribute, getIntegerAttribute, getJonasBase, getListAttribute, getLongAttribute, getLongAttribute, getLongAttribute, getNameForProvider, getPropsFromString, getServerItem, getShortAttribute, getStringArrayAttribute, getStringAttribute, getStringAttribute, getStringAttribute, getTreeBranchName, initialize, invoke, isActive, refreshDomainDeployTree, refreshServicesTree, 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 Exception
Throws:
Exception

setCurrentJonasDeployment

protected void setCurrentJonasDeployment(HttpServletRequest p_Request)
                                  throws Exception
Throws:
Exception

getForwardEdit

protected 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 String getDomainDeploymentMethodName()

getDomainUploadDeployMethodName

protected String getDomainUploadDeployMethodName()

getListDeployableFiles

protected ArrayList getListDeployableFiles()
                                    throws 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:
Exception

getListDeployedFiles

protected ArrayList getListDeployedFiles()
                                  throws 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:
Exception

undeploy

protected void undeploy(String p_Filename)
                 throws 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:
Exception - could not undeploy

isDeployment

protected boolean isDeployment(String p_Filename)
                        throws Exception
Throws:
Exception

undeployDataSource

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

Parameters:
p_Filename - Name of file to undeploy
Throws:
Exception

undeployMailFactory

protected void undeployMailFactory(String domainName,
                                   String p_Filename)
                            throws Exception
Undeploy a mail factory.

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

deploy

protected void deploy(String p_Filename)
               throws 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:
Exception - could not deploy

deployDataSource

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

Parameters:
p_Filename - Name of file to deploy
Throws:
Exception

deployMailFactory

protected void deployMailFactory(String domainName,
                                 String p_Filename)
                          throws Exception
Deploy a mail factory.

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

runGC

protected void runGC()
              throws Exception
Run garbage collector.

Throws:
Exception

refreshTree

protected void refreshTree(HttpServletRequest pRequest)
                    throws Exception
Refresh the tree.

Overrides:
refreshTree in class JonasBaseAction
Parameters:
pRequest - The current HTTP Request
Throws:
Exception

refreshServiceTree

protected void refreshServiceTree(int p_Deployment,
                                  HttpServletRequest p_Request)
                           throws Exception
Refresh the service tree.

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

refreshWebServiceTree

protected void refreshWebServiceTree(HttpServletRequest pRequest)
                              throws Exception
Parameters:
pRequest - request
Throws:
Exception - could not refresh

refreshMBeansTree

protected void refreshMBeansTree(HttpServletRequest p_Request)
                          throws Exception
Refresh the MBeans tree.

Throws:
Exception

refreshJoramTree

protected void refreshJoramTree(HttpServletRequest pRequest,
                                String serverId)
                         throws Exception
Refresh the Joram tree after creating / removing a Joram destination. or after deploying / undeploying the Joram RAR

Parameters:
pRequest - initiator request
serverId - Id of the Joram server which was updated
Throws:
Exception

removeFile

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

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

deployModule

protected void deployModule(String filename,
                            String serverName)
                     throws Exception
Throws:
Exception

undeployModule

protected void undeployModule(String filename,
                              String serverName,
                              String domainName)
                       throws Exception
Throws:
Exception

removeModule

protected boolean removeModule(String filename,
                               String serverName)
                        throws Exception
Throws:
Exception


Copyright © 2010 OW2 Consortium. All Rights Reserved.