org.ow2.jonas.webapp.jonasadmin
Class WhereAreYou

java.lang.Object
  extended by org.ow2.jonas.lib.management.extensions.base.AdminHelper
      extended by org.ow2.jonas.webapp.jonasadmin.WhereAreYou

public class WhereAreYou
extends AdminHelper

Author:
eyindanga

Field Summary
static String CONTEXT_MACRO
           
static String EXCEPTION_JONASSERVER_NOTFOUND
           
static String J2EE_APPLICATION_KEY
          Node name separator.
static String NODE_NAME_SEPARATOR
          Node name separator.
static String NODE_SEPARATOR
          Used separator in the ident node in the tree
static String SESSION_NAME
          Name of the variable in http session
static String TAGS_IMAGES_ROOT_KEY
           
static String TREE_PAGE_REFRESH
           
 
Fields inherited from class org.ow2.jonas.lib.management.extensions.base.AdminHelper
adminJonasServerConfDir, adminJonasServerName, applicationContextPath, applicationServerPort, catalinaServer, clusterdGraphAttributes, configuredServerForClusterDaemonList, currentCatalinaDefaultHostName, currentCatalinaDomainName, currentCatalinaEngineName, currentCatalinaServiceName, currentClusterDaemon, currentClusterDaemonName, currentDomain, currentDomainName, currentJonasDeploymentType, currentJonasServer, currentJonasServerName, currentSrvToConfigure, DEPLOYMENT, DEPLOYMENT_DATASOURCE, DEPLOYMENT_EAR, DEPLOYMENT_JAR, DEPLOYMENT_JMS, DEPLOYMENT_MAIL, DEPLOYMENT_RAR, DEPLOYMENT_STRING, DEPLOYMENT_STRING_DATASOURCE, DEPLOYMENT_STRING_EAR, DEPLOYMENT_STRING_JAR, DEPLOYMENT_STRING_JMS, DEPLOYMENT_STRING_MAILFACTORY, DEPLOYMENT_STRING_RAR, DEPLOYMENT_STRING_WAR, DEPLOYMENT_WAR, DOMAIN_DEPLOYMENT, DOMAIN_DEPLOYMENT_EAR, DOMAIN_DEPLOYMENT_JAR, DOMAIN_DEPLOYMENT_RAR, DOMAIN_DEPLOYMENT_STRING, DOMAIN_DEPLOYMENT_STRING_EAR, DOMAIN_DEPLOYMENT_STRING_JAR, DOMAIN_DEPLOYMENT_STRING_RAR, DOMAIN_DEPLOYMENT_STRING_WAR, DOMAIN_DEPLOYMENT_WAR, jettyServer, newCmiMbeanServerConnection, removedServersPerClusterd, theCurrentJonasServer, variables
 
Constructor Summary
WhereAreYou()
           
 
Method Summary
 String getImagesRoot()
           
 String getSelectedNameNode()
          Return the name of the selected node in the tree.
 TreeControlNode getSelectedTreeControlNode()
          Return the selected node in the tree.
 TreeControl getTreeControl()
           
 String getUrlToRefreshSelectedNode(HttpServletRequest p_Request, HttpServletResponse p_Response)
          Return the URL to refresh the selected node in the tree.
 void initialize(org.apache.struts.action.ActionServlet p_Servlet, HttpServletRequest p_Request)
          Initialize the properties in only reading.
 boolean isTreeToRefresh()
          Return the state of current display of tree.
 void refreshCatalina(HttpServletRequest p_Request, String domainName)
          Refresh the Catalina server properties.
 void refreshJetty(HttpServletRequest p_Request, String domainName)
          Refresh the Jetty server properties.
 void refreshJonas(HttpServletRequest p_Request, String serverName)
          Refresh the managed JOnAS server properties.
 void refreshServers(HttpServletRequest p_Request)
           
 void refreshServers(HttpServletRequest p_Request, String domainName, String serverName)
          Refresh all the servers properties.
 void selectNameNode(String p_Name, boolean p_Expand)
          Select the node in the tree.
 void setTreeControl(TreeControl treeControl)
           
 void setTreeToRefresh(boolean treeToRefresh)
          Change the state of current display of tree.
 String toString()
          Return in a string the contents of the instance for each propertie.
 
Methods inherited from class org.ow2.jonas.lib.management.extensions.base.AdminHelper
addRemovedServer, addSrvConfiguredForClusterd, addVar, clearConfigureForClusterList, getAdminJonasServerConfDir, getAdminJonasServerName, getApplicationContextPath, getApplicationServerPort, getClusterdGraphAttribute, getClusterdGraphAttributes, getCurrentCatalinaDefaultHostName, getCurrentCatalinaDomainName, getCurrentCatalinaEngineName, getCurrentCatalinaServiceName, getCurrentClusterDaemon, getCurrentClusterDaemonName, getCurrentDomain, getCurrentDomainName, getCurrentJonasDeploymentType, getCurrentJonasServer, getCurrentJonasServerName, getCurrentSrvToConfigure, getServletServerName, getSrvConfiguredForClusterd, getVar, isCatalinaServer, isConfiguredForClusterd, isCurrentJonasServer, isJettyServer, isSrvRemovedFromClusterd, removeVar, resetCatalina, resetDomain, resetJetty, resetJonas, rmvFromClusterdRemovedList, setClusterdGraphAttribute, setClusterdGraphAttributes, setCurrentClusterDaemon, setCurrentClusterDaemonName, setCurrentJonasDeploymentType, setCurrentSrvToConfigure, setNewCmiMbeanServerConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SESSION_NAME

public static final String SESSION_NAME
Name of the variable in http session

See Also:
Constant Field Values

TAGS_IMAGES_ROOT_KEY

public static final String TAGS_IMAGES_ROOT_KEY
See Also:
Constant Field Values

CONTEXT_MACRO

public static final String CONTEXT_MACRO
See Also:
Constant Field Values

TREE_PAGE_REFRESH

public static final String TREE_PAGE_REFRESH
See Also:
Constant Field Values

EXCEPTION_JONASSERVER_NOTFOUND

public static final String EXCEPTION_JONASSERVER_NOTFOUND
See Also:
Constant Field Values

NODE_SEPARATOR

public static final String NODE_SEPARATOR
Used separator in the ident node in the tree

See Also:
Constant Field Values

NODE_NAME_SEPARATOR

public static final String NODE_NAME_SEPARATOR
Node name separator.

See Also:
Constant Field Values

J2EE_APPLICATION_KEY

public static final String J2EE_APPLICATION_KEY
Node name separator.

See Also:
Constant Field Values
Constructor Detail

WhereAreYou

public WhereAreYou()
Method Detail

initialize

public void initialize(org.apache.struts.action.ActionServlet p_Servlet,
                       HttpServletRequest p_Request)
                throws JonasAdminException
Initialize the properties in only reading.

Parameters:
p_Servlet - The instance of servlet to access to the parameter of the servlet config
p_Request - The request to access to the HTTP informations
Throws:
JonasAdminException

getSelectedNameNode

public String getSelectedNameNode()
Return the name of the selected node in the tree.

Returns:
The name

getUrlToRefreshSelectedNode

public String getUrlToRefreshSelectedNode(HttpServletRequest p_Request,
                                          HttpServletResponse p_Response)
Return the URL to refresh the selected node in the tree.

Parameters:
p_Request - HTTP request
p_Response - HTTP response
Returns:
The URL

selectNameNode

public void selectNameNode(String p_Name,
                           boolean p_Expand)
Select the node in the tree.

Parameters:
p_Name - The name of node to select
p_Expand - Expand parent branch

getSelectedTreeControlNode

public TreeControlNode getSelectedTreeControlNode()
Return the selected node in the tree.

Returns:
The selected node

isTreeToRefresh

public boolean isTreeToRefresh()
Return the state of current display of tree.

Returns:
True if the current tree is not correctly displaying

setTreeToRefresh

public void setTreeToRefresh(boolean treeToRefresh)
Change the state of current display of tree.

Parameters:
treeToRefresh - True to refresh

refreshServers

public void refreshServers(HttpServletRequest p_Request,
                           String domainName,
                           String serverName)
                    throws ManagementException,
                           AdminException
Refresh all the servers properties.

Parameters:
p_Request - The request to access to the HTTP informations
Throws:
ManagementException - if could not connect to the MBeanServer
AdminException

refreshServers

public void refreshServers(HttpServletRequest p_Request)

refreshCatalina

public void refreshCatalina(HttpServletRequest p_Request,
                            String domainName)
Refresh the Catalina server properties.

Parameters:
p_Request - The request to access to the HTTP informations

refreshJetty

public void refreshJetty(HttpServletRequest p_Request,
                         String domainName)
Refresh the Jetty server properties.

Parameters:
p_Request - The request to access to the HTTP informations

refreshJonas

public void refreshJonas(HttpServletRequest p_Request,
                         String serverName)
                  throws ManagementException,
                         AdminException
Refresh the managed JOnAS server properties.

Parameters:
p_Request - The request to access to the HTTP informations
Throws:
ManagementException - if could not connect to the MBeanServer
AdminException

toString

public String toString()
Return in a string the contents of the instance for each propertie. Debug utility.

Overrides:
toString in class Object
Returns:
The string contents

getImagesRoot

public String getImagesRoot()

getTreeControl

public TreeControl getTreeControl()

setTreeControl

public void setTreeControl(TreeControl treeControl)


Copyright © 2010 OW2 Consortium. All Rights Reserved.