org.objectweb.jonas.common
Class JModule

java.lang.Object
  extended by org.objectweb.jonas.common.JModule

public class JModule
extends java.lang.Object

This class implements utility methods for the manipulation of application modules

Author:
Adriana Danes

Field Summary
static java.lang.String CONF_DIR
          name of the directory containig configuration
static java.lang.String EAR_CHILD_DIR
           
static java.lang.String EAR_CONFIRM_FILE
           
static java.lang.String EAR_EXTENSION
           
static java.lang.String EJBJAR_CHILD_DIR
          Child directory of a expanded container
static java.lang.String EJBJAR_CONFIRM_FILE
          xml file in a child directory of a expanded container
static java.lang.String EJBJAR_EXTENSION
          file extension containing the different module types
static java.lang.String PROPS_EXTENSION
          properties file extension
static java.lang.String RAR_CHILD_DIR
           
static java.lang.String RAR_CONFIRM_FILE
           
static java.lang.String RAR_EXTENSION
           
static java.lang.String WAR_CHILD_DIR
           
static java.lang.String WAR_CONFIRM_FILE
           
static java.lang.String WAR_EXTENSION
           
 
Constructor Summary
JModule()
           
 
Method Summary
static java.util.ArrayList getDatasourcePropsInDir()
           
static java.util.ArrayList getFilesInDir(java.lang.String dirName, java.lang.String extension)
           
static java.util.ArrayList getInstalledContainersInDir(java.lang.String p_DirName, java.lang.String p_Extension, java.lang.String p_DirChildConfirm, java.lang.String p_FileConfirm)
          Return the list of all installed containers in a directory.
static java.util.ArrayList getMailFactoryPropsInDir()
           
static java.util.ArrayList getMailFactoryPropsInDir(java.lang.String type)
           
static void prefixAutoload(java.lang.String autoloaddir, java.util.ArrayList p_List)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EJBJAR_EXTENSION

public static final java.lang.String EJBJAR_EXTENSION
file extension containing the different module types

See Also:
Constant Field Values

RAR_EXTENSION

public static final java.lang.String RAR_EXTENSION
See Also:
Constant Field Values

WAR_EXTENSION

public static final java.lang.String WAR_EXTENSION
See Also:
Constant Field Values

EAR_EXTENSION

public static final java.lang.String EAR_EXTENSION
See Also:
Constant Field Values

EJBJAR_CHILD_DIR

public static final java.lang.String EJBJAR_CHILD_DIR
Child directory of a expanded container

See Also:
Constant Field Values

RAR_CHILD_DIR

public static final java.lang.String RAR_CHILD_DIR
See Also:
Constant Field Values

WAR_CHILD_DIR

public static final java.lang.String WAR_CHILD_DIR
See Also:
Constant Field Values

EAR_CHILD_DIR

public static final java.lang.String EAR_CHILD_DIR
See Also:
Constant Field Values

EJBJAR_CONFIRM_FILE

public static final java.lang.String EJBJAR_CONFIRM_FILE
xml file in a child directory of a expanded container

See Also:
Constant Field Values

RAR_CONFIRM_FILE

public static final java.lang.String RAR_CONFIRM_FILE
See Also:
Constant Field Values

WAR_CONFIRM_FILE

public static final java.lang.String WAR_CONFIRM_FILE
See Also:
Constant Field Values

EAR_CONFIRM_FILE

public static final java.lang.String EAR_CONFIRM_FILE
See Also:
Constant Field Values

PROPS_EXTENSION

public static final java.lang.String PROPS_EXTENSION
properties file extension

See Also:
Constant Field Values

CONF_DIR

public static final java.lang.String CONF_DIR
name of the directory containig configuration

See Also:
Constant Field Values
Constructor Detail

JModule

public JModule()
Method Detail

getFilesInDir

public static java.util.ArrayList getFilesInDir(java.lang.String dirName,
                                                java.lang.String extension)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

getDatasourcePropsInDir

public static java.util.ArrayList getDatasourcePropsInDir()
                                                   throws java.lang.Exception
Throws:
java.lang.Exception

getMailFactoryPropsInDir

public static java.util.ArrayList getMailFactoryPropsInDir(java.lang.String type)
                                                    throws java.lang.Exception
Throws:
java.lang.Exception

getMailFactoryPropsInDir

public static java.util.ArrayList getMailFactoryPropsInDir()
                                                    throws java.lang.Exception
Throws:
java.lang.Exception

prefixAutoload

public static void prefixAutoload(java.lang.String autoloaddir,
                                  java.util.ArrayList p_List)

getInstalledContainersInDir

public static java.util.ArrayList getInstalledContainersInDir(java.lang.String p_DirName,
                                                              java.lang.String p_Extension,
                                                              java.lang.String p_DirChildConfirm,
                                                              java.lang.String p_FileConfirm)
                                                       throws java.lang.Exception
Return the list of all installed containers in a directory. The container may be :
- a archive file container with a known extension : jar, war, ear, rar
- a directory where the container is expanded
To control if a directory contains a expanded container, it's necessary to provide the child directory and the xml file that confirm the expanded container.
Parameter example to retrieve :
- web application : war, WEB-INF, web.xml - application : ear, META-INF, application.xml - ejb container : jar, META-INF, ejb-jar.xml - resource : rar, META-INF, ra.xml

Parameters:
p_DirName - The name of the directory to find
p_Extension - The extension of container (jar, war, ear, rar)
p_DirChildConfirm - The child directory that confirm the container
p_FileConfirm - The xml file inside the child directory that confirm the container
Returns:
A list of absolute path container
Throws:
java.lang.Exception