org.ow2.jonas.deployment.domain.lib
Class DomainMapManager

java.lang.Object
  extended by org.ow2.jonas.deployment.common.lib.AbsDeploymentDescManager
      extended by org.ow2.jonas.deployment.domain.lib.DomainMapManager
All Implemented Interfaces:
DeploymentDescManager

public class DomainMapManager
extends AbsDeploymentDescManager

This class extends the AbsDeploymentDescriptor class of JOnAS It provides a description of the domain map

Author:
Adriana Danes, S. Ali Tokmen

Field Summary
static String DOMAIN_FILE_NAME
          Path of the domain.xml configuration file
 
Fields inherited from class org.ow2.jonas.deployment.common.lib.AbsDeploymentDescManager
LINK_SEPARATOR
 
Method Summary
static DomainMap getDomainMap(String domainFileName, ClassLoader classLoaderForCls)
          Get an instance of a DomainMap by parsing the domain.xml configuration file.
static boolean getParsingWithValidation()
          Controls whether the parser is reporting all validity errors.
static Domain loadDomain(Reader reader, String fileName)
          Load the domain.xml file.
static void saveDomain(Domain domain, String fileName)
          Save the domain.xml file.
static void setParsingWithValidation(boolean validation)
          Controls whether the parser is reporting all validity errors.
 
Methods inherited from class org.ow2.jonas.deployment.common.lib.AbsDeploymentDescManager
containsResource, findJonasServiceRef, mergeWebServiceRef, xmlContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOMAIN_FILE_NAME

public static final String DOMAIN_FILE_NAME
Path of the domain.xml configuration file

See Also:
Constant Field Values
Method Detail

getDomainMap

public static DomainMap getDomainMap(String domainFileName,
                                     ClassLoader classLoaderForCls)
                              throws DomainMapException
Get an instance of a DomainMap by parsing the domain.xml configuration file.

Parameters:
domainFileName - used when specific domain description file name has to be used
classLoaderForCls - the classloader for the classes.
Returns:
a DomainMap instance by parsing the domain.xml file
Throws:
DomainMapException - if the domain.xml file is corrupted.

loadDomain

public static Domain loadDomain(Reader reader,
                                String fileName)
                         throws DomainMapException
Load the domain.xml file.

Parameters:
reader - the Reader of the XML file.
fileName - the name of the file (domain.xml).
Returns:
a Domain object.
Throws:
DomainMapException - if the file is corrupted.

saveDomain

public static void saveDomain(Domain domain,
                              String fileName)
                       throws DomainMapException
Save the domain.xml file.

Parameters:
domain - domain representation.
fileName - the name of the file (domain.xml).
Throws:
DomainMapException - Problem writing into file

getParsingWithValidation

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

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

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.


Copyright © 2010 OW2 Consortium. All Rights Reserved.