org.ow2.jonas.webapp.jonasadmin.service.container
Class BaseWebAppAction

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
              extended by org.ow2.jonas.webapp.jonasadmin.service.container.BaseWebAppAction
Direct Known Subclasses:
ApplyWebAppCatalinaAction, ApplyWebAppJettyAction, ApplyWebAppVirtualCatalinaAction, ApplyWebsConfirmAction, EditWarAction, EditWebAppAction, EditWebAppCatalinaAction, EditWebAppJettyAction

public abstract class BaseWebAppAction
extends BaseDeployAction

Author:
Michel-Ange ANTON, S. Ali Tokmen

Field Summary
protected  WarForm mWarForm
           
protected  WebAppForm mWebAppForm
           
 
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
BaseWebAppAction()
           
 
Method Summary
protected  WarForm createWarForm(org.apache.struts.action.ActionMapping p_Mapping, HttpServletRequest p_Request)
          Create a new War form
protected  WebAppForm createWebAppForm(org.apache.struts.action.ActionMapping p_Mapping, HttpServletRequest p_Request)
          Create a new WebApp form in function of Web Server.
protected  ObjectName findJ2eeWebModuleMbean(String p_PathContext, String jonasServerName)
          Return the J2ee WebModule MBean.
protected  ObjectName findJonasMbeanWar(String p_PathContext, String domainName, String jonasServerName)
          Return the JOnAS MBean War.
protected  ObjectName findWebAppMbean(String p_PathContext, String jonasServerName)
          Return the WebApp MBean.
protected  boolean initialize(org.apache.struts.action.ActionMapping p_Mapping, HttpServletRequest p_Request)
          Initialize the forms and parameters.
protected  void populateJettyWar(ObjectName p_ObjectName, WarForm p_Form, String jonasServerName)
          Populate a form with the JOnAS WebModule MBean given.
protected  void populateWar(ObjectName p_ObjectName, WarForm p_Form, String jonasServerName)
          Populate a form with the JOnAS WebModule MBean given.
protected  void populateWar(String p_Path, WarForm p_Form, String domainName, String jonasServerName)
          Populate a form with the JOnAS War path given.
protected  void populateWebApp(String p_ObjectName, WebAppForm p_Form)
          Populate a WebApp form in function of Web Server.
protected  void populateWebAppCatalina(String p_ObjectName, WebAppCatalinaForm p_Form)
          Populate a form with the Catalina Context MBean and with the JOnAS War MBean if it's found.
protected  void populateWebAppJetty(String p_ObjectName, WebAppJettyForm p_Form)
          Populate a form with the Jetty Context MBean
protected  void populateWebAppVirtualCatalina(String p_ObjectName, WebAppVirtualCatalinaForm p_Form)
          Populate a form a virtual Catalina context.
 
Methods inherited from class org.ow2.jonas.webapp.jonasadmin.deploy.BaseDeployAction
deploy, deployDataSource, deployMailFactory, deployModule, getCurrentJonasDeployment, getDomainDeploymentMethodName, getDomainUploadDeployMethodName, getForwardEdit, getListDeployableFiles, getListDeployedFiles, isConfigurable, isDeployment, isDomain, isModule, refreshJoramTree, refreshMBeansTree, refreshServiceTree, refreshTree, refreshWebServiceTree, removeFile, removeModule, runGC, setCurrentJonasDeployment, undeploy, undeployDataSource, undeployMailFactory, undeployModule
 
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
 

Field Detail

mWebAppForm

protected WebAppForm mWebAppForm

mWarForm

protected WarForm mWarForm
Constructor Detail

BaseWebAppAction

public BaseWebAppAction()
Method Detail

initialize

protected boolean initialize(org.apache.struts.action.ActionMapping p_Mapping,
                             HttpServletRequest p_Request)
Initialize the forms and parameters.

Parameters:
p_Mapping - Mapping to reset form
p_Request - Http request used
Returns:
true if the forms must be populated

createWebAppForm

protected WebAppForm createWebAppForm(org.apache.struts.action.ActionMapping p_Mapping,
                                      HttpServletRequest p_Request)
Create a new WebApp form in function of Web Server.

Parameters:
p_Mapping - Mapping to reset form
p_Request - Http request used
Returns:
The new form or null if web server unknown

createWarForm

protected WarForm createWarForm(org.apache.struts.action.ActionMapping p_Mapping,
                                HttpServletRequest p_Request)
Create a new War form

Parameters:
p_Mapping - Mapping to reset form
p_Request - Http request used
Returns:
The new form or null if web server unknown

populateWebApp

protected void populateWebApp(String p_ObjectName,
                              WebAppForm p_Form)
                       throws Exception
Populate a WebApp form in function of Web Server.

Parameters:
p_ObjectName - The MBean name
p_Form - The form to populate
Throws:
Exception

populateWebAppCatalina

protected void populateWebAppCatalina(String p_ObjectName,
                                      WebAppCatalinaForm p_Form)
                               throws Exception
Populate a form with the Catalina Context MBean and with the JOnAS War MBean if it's found.

Parameters:
p_ObjectName - The MBean name
p_Form - The form to populate
Throws:
Exception

populateWebAppVirtualCatalina

protected void populateWebAppVirtualCatalina(String p_ObjectName,
                                             WebAppVirtualCatalinaForm p_Form)
                                      throws Exception
Populate a form a virtual Catalina context.

Parameters:
p_ObjectName - The MBean name
p_Form - The form to populate
Throws:
Exception

populateWebAppJetty

protected void populateWebAppJetty(String p_ObjectName,
                                   WebAppJettyForm p_Form)
                            throws Exception
Populate a form with the Jetty Context MBean

Parameters:
p_ObjectName - Jetty WebContainer+WebApplicationContext MBean
p_Form - The form to populate
Throws:
Exception

findJonasMbeanWar

protected ObjectName findJonasMbeanWar(String p_PathContext,
                                       String domainName,
                                       String jonasServerName)
                                throws Exception
Return the JOnAS MBean War.

Parameters:
p_PathContext - The path context to find
Returns:
The JOnAS MBean War or null if not found
Throws:
Exception

findWebAppMbean

protected ObjectName findWebAppMbean(String p_PathContext,
                                     String jonasServerName)
                              throws Exception
Return the WebApp MBean.

Parameters:
p_PathContext - The path context to find
Returns:
The WebApplication (WebModule) MBean or null if not found
Throws:
Exception

findJ2eeWebModuleMbean

protected ObjectName findJ2eeWebModuleMbean(String p_PathContext,
                                            String jonasServerName)
                                     throws Exception
Return the J2ee WebModule MBean.

Parameters:
p_PathContext - The path context to find
Returns:
The WebApplication (WebModule) MBean or null if not found
Throws:
Exception

populateWar

protected void populateWar(ObjectName p_ObjectName,
                           WarForm p_Form,
                           String jonasServerName)
                    throws Exception
Populate a form with the JOnAS WebModule MBean given.

Parameters:
p_ObjectName - The JOnAS WebModue MBean
p_Form - The form to populate
Throws:
Exception

populateJettyWar

protected void populateJettyWar(ObjectName p_ObjectName,
                                WarForm p_Form,
                                String jonasServerName)
                         throws Exception
Populate a form with the JOnAS WebModule MBean given.

Parameters:
p_ObjectName - The JOnAS WebModue MBean
p_Form - The form to populate
Throws:
Exception

populateWar

protected void populateWar(String p_Path,
                           WarForm p_Form,
                           String domainName,
                           String jonasServerName)
                    throws Exception
Populate a form with the JOnAS War path given.

Parameters:
p_Path - The JOnAS War MBean path
p_Form - The form to populate
Throws:
Exception


Copyright © 2010 OW2 Consortium. All Rights Reserved.