org.objectweb.jonas_ear.deployment.api
Class EarDeploymentDesc

java.lang.Object
  extended byorg.objectweb.jonas_lib.deployment.api.AbsDeploymentDesc
      extended byorg.objectweb.jonas_ear.deployment.api.EarDeploymentDesc
All Implemented Interfaces:
DeploymentDesc

public class EarDeploymentDesc
extends AbsDeploymentDesc

This class extends the AbsDeploymentDescriptor class of JOnAS It provides a description of the specific EAR desployment descriptor

Author:
Florent Benoit, Ludovic Bert, Helene Joanin

Field Summary
 
Fields inherited from class org.objectweb.jonas_lib.deployment.api.AbsDeploymentDesc
displayName
 
Method Summary
 java.lang.String[] getAltDDClients()
          Get the alt-dd of the clients of the application.xml file.
 java.lang.String[] getAltDDConnectors()
          Get the alt-dd of the connectors of the application.xml file.
 java.lang.String[] getAltDDEjbs()
          Get the alt-dd of the ejbs of the application.xml file.
 java.lang.String[] getAltDDWebs()
          Get the alt-dd of the wars of the application.xml file.
 java.lang.String[] getClientTags()
          Get the client tags of the application.xml file.
 java.lang.String[] getConnectorTags()
          Get the connector tags of the application.xml file.
 java.lang.String[] getEjbTags()
          Get the ejb tags of the application.xml file.
static org.xml.sax.EntityResolver getEntityResolver()
          Get the current EntityResolver.
static org.xml.sax.ErrorHandler getErrorHandler()
          Get the current ErrorHandler.
static EarDeploymentDesc getInstance(java.lang.String earFileName, java.lang.ClassLoader classLoaderForCls)
          Get an instance of an EAR deployment descriptor by parsing the application.xml deployment descriptor.
static boolean getParsingWithValidation()
          Controls whether the parser is reporting all validity errors.
 java.lang.String[] getSecurityRolesNames()
          Get the security-role names tags
 Web[] getWebTags()
          Get the web tags of the application.xml file.
 java.lang.String getXmlContent()
          Get the content of the xml file
static Application loadApplication(java.io.Reader reader, java.lang.String fileName)
          Load the application.xml file.
static void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
          Set the specified EntityResolver.
static void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
          Set the specified ErrorHandler.
static void setParsingWithValidation(boolean validation)
          Controls whether the parser is reporting all validity errors.
 java.lang.String toString()
          Return a String representation of the EarDeploymentDesc.
 
Methods inherited from class org.objectweb.jonas_lib.deployment.api.AbsDeploymentDesc
getDisplayName, getSAXMsg
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getEjbTags

public java.lang.String[] getEjbTags()
Get the ejb tags of the application.xml file.

Returns:
the ejb tags of the application.xml file.

getAltDDEjbs

public java.lang.String[] getAltDDEjbs()
Get the alt-dd of the ejbs of the application.xml file.

Returns:
the alt-dd of the ejbs of the application.xml file.

getClientTags

public java.lang.String[] getClientTags()
Get the client tags of the application.xml file.

Returns:
the client tags of the application.xml file.

getAltDDClients

public java.lang.String[] getAltDDClients()
Get the alt-dd of the clients of the application.xml file.

Returns:
the alt-dd of the clients of the application.xml file.

getWebTags

public Web[] getWebTags()
Get the web tags of the application.xml file.

Returns:
the web tags of the application.xml file.

getAltDDWebs

public java.lang.String[] getAltDDWebs()
Get the alt-dd of the wars of the application.xml file.

Returns:
the alt-dd of the wars of the application.xml file.

getConnectorTags

public java.lang.String[] getConnectorTags()
Get the connector tags of the application.xml file.

Returns:
the connector tags of the application.xml file.

getAltDDConnectors

public java.lang.String[] getAltDDConnectors()
Get the alt-dd of the connectors of the application.xml file.

Returns:
the alt-dd of the connectors of the application.xml file.

getSecurityRolesNames

public java.lang.String[] getSecurityRolesNames()
Get the security-role names tags

Returns:
the security roles names.

getXmlContent

public java.lang.String getXmlContent()
Get the content of the xml file

Returns:
the content of the application xml file

getInstance

public static EarDeploymentDesc getInstance(java.lang.String earFileName,
                                            java.lang.ClassLoader classLoaderForCls)
                                     throws EarDeploymentDescException
Get an instance of an EAR deployment descriptor by parsing the application.xml deployment descriptor.

Parameters:
earFileName - the fileName of the war file for the deployment descriptors.
classLoaderForCls - the classloader for the classes.
Returns:
an EAR deployment descriptor by parsing the application.xml deployment descriptor.
Throws:
EarDeploymentDescException - if the deployment descriptor is corrupted.

loadApplication

public static Application loadApplication(java.io.Reader reader,
                                          java.lang.String fileName)
                                   throws EarDeploymentDescException
Load the application.xml file.

Parameters:
fileName - the name of the file (application.xml).
Returns:
an application object.
Throws:
EarDeploymentDescException - if the deployment descriptor is corrupted.

toString

public java.lang.String toString()
Return a String representation of the EarDeploymentDesc.

Specified by:
toString in interface DeploymentDesc
Specified by:
toString in class AbsDeploymentDesc
Returns:
a String representation of the EarDeploymentDesc.

getErrorHandler

public static org.xml.sax.ErrorHandler getErrorHandler()
Get the current ErrorHandler.

Returns:
the current ErrorHandler.

getEntityResolver

public static org.xml.sax.EntityResolver getEntityResolver()
Get the current EntityResolver.

Returns:
the current EntityResolver.

getParsingWithValidation

public static boolean getParsingWithValidation()
Controls whether the parser is reporting all validity errors.

Returns:
if true, all external entities will be read.

setErrorHandler

public static void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
Set the specified ErrorHandler. If the application does not register an ErrorHandler, all error events reported by the reader are ignored.

Parameters:
errorHandler - the Error Handler to set.

setEntityResolver

public static void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
Set the specified EntityResolver.

Parameters:
entityResolver - the Entity Resolver to set.

setParsingWithValidation

public static void setParsingWithValidation(boolean validation)
Controls whether the parser is reporting all validity errors.

Parameters:
validation - if true, all external entities will be read.