org.objectweb.jonas.webapp.jonasadmin
Class JonasAdminJmx

java.lang.Object
  extended byorg.objectweb.jonas.webapp.jonasadmin.JonasAdminJmx

public class JonasAdminJmx
extends java.lang.Object


Constructor Summary
protected JonasAdminJmx()
          Protected constructor to prevent instantiation.
 
Method Summary
static javax.management.ObjectName allGroups(java.lang.String resource)
          Return an objectName for all groups in a resource
static javax.management.ObjectName allRoles(java.lang.String resource)
          Return an objectName for all roles in a resource
static javax.management.ObjectName allSecurityDatasourceFactories()
          Return an objectName for all the Security datasource factories.
static javax.management.ObjectName allSecurityFactories()
          Return an objectName for the Security factory name.
static javax.management.ObjectName allSecurityLdapFactories()
          Return an objectName for all the Security ldap factories.
static javax.management.ObjectName allSecurityMemoryFactories()
          Return an objectName for all the Security memory factories.
static javax.management.ObjectName allUsers(java.lang.String resource)
          Return an objectName for all users in a resource
static java.lang.String extractFilename(java.lang.String p_Path)
          Extract the filename of complete path.
static java.lang.String extractValueMbeanName(java.lang.String p_Name, java.lang.String p_MBeanName)
          Extract a value of a Mbean name.
static java.util.ArrayList getDatasourceDependences(java.lang.String p_DatasourceName)
          Return the list of Datasource dependence in the current server.
static java.util.ArrayList getDatasourceFilesDeployable()
          Return the list of Datasource properties files ready to deploy in the current server.
static java.util.ArrayList getDatasourceFilesDeployed()
          Return the list of deployed Datasource filename in the current server.
static java.util.ArrayList getEarFilesDeployable()
          Return the list of EAR filename ready to deploy in the current server.
static java.util.ArrayList getEarFilesDeployed()
          Return the list of deployed EAR filename in the current server.
static java.lang.String getFirstMBeanName(javax.management.ObjectName p_On)
          Return the first Mbean name gotten by the query in the current MbeanServer.
static java.util.ArrayList getGroups(java.lang.String p_Resource)
          Return the list of all groups in a resource.
static java.util.ArrayList getJarFilesDeployable()
          Return the list of JAR filename ready to deploy in the current server.
static java.util.ArrayList getJarFilesDeployed()
          Return the list of deployed JAR filename in the current server.
static java.lang.String getJonasServerName()
          Return the current Jonas server name.
static java.util.List getListMBeanName(javax.management.ObjectName p_On)
          Return the list of Mbean name gotten by the query in the current MbeanServer.
static java.util.ArrayList getListRemoteJonasServerItem()
          Return a list of JonasServerItem connected to the same registry.
static java.util.ArrayList getRarFilesDeployable()
          Return the list of RAR filename ready to deploy in the current server.
static java.util.ArrayList getRarFilesDeployed()
          Return the list of deployed RAR filename in the current server.
static java.util.ArrayList getRoles(java.lang.String p_Resource)
          Return the list of all roles in a resource.
static java.util.ArrayList getSecurityDatasourceFactories()
          Return the list of Security Datasource Factories in the current server.
static java.util.ArrayList getSecurityLdapFactories()
          Return the list of Security Ldap Factories in the current server.
static java.util.ArrayList getSecurityMemoryFactories()
          Return the list of Security Memory Factories in the current server.
static java.util.ArrayList getUsers(java.lang.String p_Resource)
          Return the list of all users in a resource.
static java.util.ArrayList getWarFilesDeployable()
          Return the list of WAR filename ready to deploy in the current server.
static java.util.ArrayList getWarFilesDeployed()
          Return the list of deployed WAR filename in the current server.
static boolean hasMBeanName(javax.management.ObjectName p_On)
          Verify if the Mbean gotten by the query in the current MbeanServer exists.
static java.lang.String replace(java.lang.String template, java.lang.String placeholder, java.lang.String value)
          Replace any occurrence of the specified placeholder in the specified template string with the specified replacement value.
static javax.management.ObjectName securityFactories(java.lang.String p_Name)
          Return an objectName for the Security factory name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JonasAdminJmx

protected JonasAdminJmx()
Protected constructor to prevent instantiation.

Method Detail

replace

public static java.lang.String replace(java.lang.String template,
                                       java.lang.String placeholder,
                                       java.lang.String value)
Replace any occurrence of the specified placeholder in the specified template string with the specified replacement value.

Parameters:
template - Pattern string possibly containing the placeholder
placeholder - Placeholder expression to be replaced
value - Replacement value for the placeholder
Returns:
A complete string

getListRemoteJonasServerItem

public static java.util.ArrayList getListRemoteJonasServerItem()
                                                        throws java.lang.Exception
Return a list of JonasServerItem connected to the same registry.

Returns:
List of JonasServerItem
Throws:
java.lang.Exception

getJonasServerName

public static java.lang.String getJonasServerName()
                                           throws java.lang.Exception
Return the current Jonas server name.

Returns:
The name
Throws:
java.lang.Exception

hasMBeanName

public static boolean hasMBeanName(javax.management.ObjectName p_On)
                            throws java.lang.Exception
Verify if the Mbean gotten by the query in the current MbeanServer exists.

Parameters:
p_On - Query Mbean name to search
Returns:
true if MBean exists
Throws:
java.lang.Exception

getFirstMBeanName

public static java.lang.String getFirstMBeanName(javax.management.ObjectName p_On)
                                          throws java.lang.Exception
Return the first Mbean name gotten by the query in the current MbeanServer.

Parameters:
p_On - Query Mbean name to search
Returns:
The first MBean name or null if not found
Throws:
java.lang.Exception

getListMBeanName

public static java.util.List getListMBeanName(javax.management.ObjectName p_On)
                                       throws java.lang.Exception
Return the list of Mbean name gotten by the query in the current MbeanServer.

Parameters:
p_On - Query Mbean name to search
Returns:
The list or null if not found
Throws:
java.lang.Exception

extractValueMbeanName

public static java.lang.String extractValueMbeanName(java.lang.String p_Name,
                                                     java.lang.String p_MBeanName)
Extract a value of a Mbean name.

Parameters:
p_Name - Name of property
p_MBeanName - Complete Mbean name
Returns:
The value or null if not found

extractFilename

public static java.lang.String extractFilename(java.lang.String p_Path)
Extract the filename of complete path.

Parameters:
p_Path - Complete path (directory and filename)
Returns:
The filename or null

getJarFilesDeployable

public static java.util.ArrayList getJarFilesDeployable()
                                                 throws java.lang.Exception
Return the list of JAR filename ready to deploy in the current server.

Returns:
The list of JAR filename.
Throws:
java.lang.Exception

getRarFilesDeployable

public static java.util.ArrayList getRarFilesDeployable()
                                                 throws java.lang.Exception
Return the list of RAR filename ready to deploy in the current server.

Returns:
The list of RAR filename.
Throws:
java.lang.Exception

getEarFilesDeployable

public static java.util.ArrayList getEarFilesDeployable()
                                                 throws java.lang.Exception
Return the list of EAR filename ready to deploy in the current server.

Returns:
The list of EAR filename.
Throws:
java.lang.Exception

getWarFilesDeployable

public static java.util.ArrayList getWarFilesDeployable()
                                                 throws java.lang.Exception
Return the list of WAR filename ready to deploy in the current server.

Returns:
The list of WAR filename.
Throws:
java.lang.Exception

getJarFilesDeployed

public static java.util.ArrayList getJarFilesDeployed()
                                               throws java.lang.Exception
Return the list of deployed JAR filename in the current server.

Returns:
The list of JAR filename.
Throws:
java.lang.Exception

getEarFilesDeployed

public static java.util.ArrayList getEarFilesDeployed()
                                               throws java.lang.Exception
Return the list of deployed EAR filename in the current server.

Returns:
The list of EAR filename.
Throws:
java.lang.Exception

getRarFilesDeployed

public static java.util.ArrayList getRarFilesDeployed()
                                               throws java.lang.Exception
Return the list of deployed RAR filename in the current server.

Returns:
The list of RAR filename.
Throws:
java.lang.Exception

getWarFilesDeployed

public static java.util.ArrayList getWarFilesDeployed()
                                               throws java.lang.Exception
Return the list of deployed WAR filename in the current server.

Returns:
The list of WAR filename.
Throws:
java.lang.Exception

getDatasourceFilesDeployable

public static java.util.ArrayList getDatasourceFilesDeployable()
                                                        throws java.lang.Exception
Return the list of Datasource properties files ready to deploy in the current server.

Returns:
The list of Datasource properties filenames.
Throws:
java.lang.Exception

getDatasourceFilesDeployed

public static java.util.ArrayList getDatasourceFilesDeployed()
                                                      throws java.lang.Exception
Return the list of deployed Datasource filename in the current server.

Returns:
The list of Datasource filename.
Throws:
java.lang.Exception

getDatasourceDependences

public static java.util.ArrayList getDatasourceDependences(java.lang.String p_DatasourceName)
                                                    throws java.lang.Exception
Return the list of Datasource dependence in the current server.

Returns:
The list of Datasource dependence.
Throws:
java.lang.Exception

securityFactories

public static javax.management.ObjectName securityFactories(java.lang.String p_Name)
                                                     throws javax.management.MalformedObjectNameException
Return an objectName for the Security factory name.

Returns:
an objectName for the security factory name.
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allSecurityFactories

public static javax.management.ObjectName allSecurityFactories()
                                                        throws javax.management.MalformedObjectNameException
Return an objectName for the Security factory name.

Returns:
an objectName for the security factory name.
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allSecurityMemoryFactories

public static javax.management.ObjectName allSecurityMemoryFactories()
                                                              throws javax.management.MalformedObjectNameException
Return an objectName for all the Security memory factories.

Returns:
an objectName for all the security memory factories.
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allSecurityDatasourceFactories

public static javax.management.ObjectName allSecurityDatasourceFactories()
                                                                  throws javax.management.MalformedObjectNameException
Return an objectName for all the Security datasource factories.

Returns:
an objectName for all the security datasource factories.
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allSecurityLdapFactories

public static javax.management.ObjectName allSecurityLdapFactories()
                                                            throws javax.management.MalformedObjectNameException
Return an objectName for all the Security ldap factories.

Returns:
an objectName for all the security ldap factories.
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allUsers

public static javax.management.ObjectName allUsers(java.lang.String resource)
                                            throws javax.management.MalformedObjectNameException
Return an objectName for all users in a resource

Parameters:
resource - the name of the resource on which the user depends
Returns:
an objectName for the user MBean
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allRoles

public static javax.management.ObjectName allRoles(java.lang.String resource)
                                            throws javax.management.MalformedObjectNameException
Return an objectName for all roles in a resource

Parameters:
resource - the name of the resource on which the role depends
Returns:
an objectName for the user MBean
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

allGroups

public static javax.management.ObjectName allGroups(java.lang.String resource)
                                             throws javax.management.MalformedObjectNameException
Return an objectName for all groups in a resource

Parameters:
resource - the name of the resource on which the group depends
Returns:
an objectName for the user MBean
Throws:
javax.management.MalformedObjectNameException - if the objectname can't be build

getSecurityMemoryFactories

public static java.util.ArrayList getSecurityMemoryFactories()
                                                      throws java.lang.Exception
Return the list of Security Memory Factories in the current server.

Returns:
The list of Security Memory Factories
Throws:
java.lang.Exception

getSecurityDatasourceFactories

public static java.util.ArrayList getSecurityDatasourceFactories()
                                                          throws java.lang.Exception
Return the list of Security Datasource Factories in the current server.

Returns:
The list of Security Datasource Factories
Throws:
java.lang.Exception

getSecurityLdapFactories

public static java.util.ArrayList getSecurityLdapFactories()
                                                    throws java.lang.Exception
Return the list of Security Ldap Factories in the current server.

Returns:
The list of Security Ldap Factories
Throws:
java.lang.Exception

getUsers

public static java.util.ArrayList getUsers(java.lang.String p_Resource)
                                    throws java.lang.Exception
Return the list of all users in a resource.

Returns:
The list of users
Throws:
java.lang.Exception

getRoles

public static java.util.ArrayList getRoles(java.lang.String p_Resource)
                                    throws java.lang.Exception
Return the list of all roles in a resource.

Returns:
The list of roles
Throws:
java.lang.Exception

getGroups

public static java.util.ArrayList getGroups(java.lang.String p_Resource)
                                     throws java.lang.Exception
Return the list of all groups in a resource.

Returns:
The list of groups
Throws:
java.lang.Exception