org.objectweb.jonas_rar.deployment.api
Class RarDeploymentDesc

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

public class RarDeploymentDesc
extends AbsDeploymentDesc

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

Author:
Eric Hardesty

Field Summary
 
Fields inherited from class org.objectweb.jonas_lib.deployment.api.AbsDeploymentDesc
displayName
 
Method Summary
static Connector getConnector()
          Get the current Connector.
static org.xml.sax.EntityResolver getEntityResolver()
          Get the current EntityResolver.
static org.xml.sax.ErrorHandler getErrorHandler()
          Get the current ErrorHandler.
static RarDeploymentDesc getInstance(javax.naming.Context ctx)
          Get an instance of an RAR deployment descriptor by parsing the ra.xml and jonas-ra.xml deployment descriptors.
static RarDeploymentDesc getInstance(java.lang.String rarFileName, java.lang.ClassLoader classLoader)
          Get an instance of an RAR deployment descriptor by parsing the ra.xml and jonas-ra.xml deployment descriptors.
 JonasConfigProperty[] getJonasConfigPropTags()
          Get the config-property tags of the jonas-ra.xml file.
static JonasConnector getJonasConnector()
          Get the current JonasConnector.
static boolean getParsingWithValidation()
          Controls whether the parser is reporting all validity errors.
 ConfigProperty[] getRaConfigPropTags()
          Get the config-property tags of the ra.xml file.
static Connector loadConnector(java.io.Reader reader, java.lang.String fileName)
          Load the ra.xml file.
static JonasConnector loadJonasConnector(java.io.Reader reader, java.lang.String fileName)
          Load the jonas-ra.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.
 void setRaConfigPropTags(Connector conn)
          Set the config-property tags of the ra.xml file.
 java.lang.String toString()
          Return a String representation of the RarDeploymentDesc.
 
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

setRaConfigPropTags

public void setRaConfigPropTags(Connector conn)
Set the config-property tags of the ra.xml file.

Parameters:
conn - the Connector objeect with the config-property tags of the ra.xml file.

getRaConfigPropTags

public ConfigProperty[] getRaConfigPropTags()
Get the config-property tags of the ra.xml file.

Returns:
the config-property tags of the ra.xml file.

getJonasConfigPropTags

public JonasConfigProperty[] getJonasConfigPropTags()
Get the config-property tags of the jonas-ra.xml file.

Returns:
the config-property tags of the jonas-ra.xml file.

getInstance

public static RarDeploymentDesc getInstance(java.lang.String rarFileName,
                                            java.lang.ClassLoader classLoader)
                                     throws DeploymentDescException
Get an instance of an RAR deployment descriptor by parsing the ra.xml and jonas-ra.xml deployment descriptors.

Parameters:
rarFileName - the fileName of the rar file for the deployment descriptors.
classLoader - the classloader for the classes.
Returns:
an RAR deployment descriptor by parsing the ra.xml & jonas-ra.xml deployment descriptors.
Throws:
DeploymentDescException - if the deployment descriptors are corrupted.

getInstance

public static RarDeploymentDesc getInstance(javax.naming.Context ctx)
                                     throws DeploymentDescException
Get an instance of an RAR deployment descriptor by parsing the ra.xml and jonas-ra.xml deployment descriptors.

Parameters:
ctx - the context which contains the configuration in order to load the deployment descriptors. There are 6 possible parameters : - rarFileName is the path of the RAR file (required param). - classLoader is the classloader (required param) - altDD is the optional deployment descriptor (optional param).
Returns:
an RAR deployment descriptor by parsing the ra.xml(or altdd) & jonas-ra.xml deployment descriptors.
Throws:
DeploymentDescException - if the deployment descriptors are corrupted.

loadConnector

public static Connector loadConnector(java.io.Reader reader,
                                      java.lang.String fileName)
                               throws DeploymentDescException
Load the ra.xml file.

Parameters:
reader - the Reader of the XML file.
fileName - the name of the file (ra.xml).
Returns:
a connector object.
Throws:
DeploymentDescException - if the deployment descriptor is corrupted.

loadJonasConnector

public static JonasConnector loadJonasConnector(java.io.Reader reader,
                                                java.lang.String fileName)
                                         throws DeploymentDescException
Load the jonas-ra.xml file.

Parameters:
reader - the Reader of the XML file.
fileName - the name of the file (jonas-ra.xml).
Returns:
a JonasConnector object.
Throws:
DeploymentDescException - if the deployment descriptor is corrupted.

toString

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

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

getConnector

public static Connector getConnector()
Get the current Connector.

Returns:
the current Connector.

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.

getJonasConnector

public static JonasConnector getJonasConnector()
Get the current JonasConnector.

Returns:
the current JonasConnector.

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.