org.objectweb.jorm.api
Interface JormConfigurator

All Known Subinterfaces:
JormCompilerConfigurator

public interface JormConfigurator

Used to hold the configuration information related to the JORM runtime.

Author:
P. Dechamboux

Field Summary
static java.lang.String DEFAULT_JORM_CONFIGURATION_FILE
           
static java.lang.String LOGGER_NAME
           
static java.lang.String USE_CONTEXT_CLASSLOADER
           
 
Method Summary
 void addSubMapper(java.lang.String mn, java.lang.String smn)
          Adds this submapper to the list of the ones used for generation.
 void configure()
          Configures the JORM compiler by loading information related to the different mappers supported by this instance of JORM using the default property file.
 void configure(java.util.Properties p)
          Configures the JORM compiler by loading information related to the different mappers supported by this instance of JORM using the given properties.
 void configure(java.lang.String propertyfile)
          Configures the JORM compiler by loading information related to the different mappers supported by this instance of JORM using the given property file.
 void configureLog(java.lang.String propertyfile)
          Configures the logger factory object with a properties object.
 void configureMIManager(Manager miman)
          Configures the MI manager associated with either a JORM compiler or a simple mapper.
 void configureParser(Parser p, java.util.ArrayList dtdlocs, org.objectweb.jorm.util.io.api.PathExplorer pe, Manager miman)
          Configures the parser associated with either a JORM compiler or a simple mapper.
 java.lang.Class getGcmClass(java.lang.String mappername)
          Gets the class name of the GenClassMapping associated with the given mapper.
 LoggerFactory getLoggerFactory()
          Gets the logger factory associated with this instance of JORM.
 org.objectweb.jorm.mi2xml.api.MappingDomtreeBuilder getMappingDomtreeBuilder(java.lang.String mappername)
          Gets the MappingDomTreeBuilder object associated with the given mapper.
 MappingParser getMappingParser(java.lang.String mappername)
          Gets the parser associated with the given mapper for mapping infos.
 MappingFactory getMIFactory(java.lang.String mappername)
          Gets the MI factory associated with the given mapper.
 Manager getMIManager()
          Gets the MI manager to be used by JORM.
 Parser getParser()
          Gets the parser to be used by JORM.
 PMappingStructuresManager getSchMgr(java.lang.String mappername)
          Gets the schema manager associated with the given mapper.
 java.util.Collection getSubMappers(java.lang.String mappername)
          Gets the submappers associated with a given mapper.
 org.objectweb.jorm.mi2xml.api.Writer getWriter()
          Gets the BasicDomWriter object.
 java.util.Iterator knownMappers()
          Lists the names of supported mappers.
 void removeAllMappers()
          Removes all mappers from the list of the ones used for generation.
 void removeMapper(java.lang.String mn)
          Removes this mapper from the list of the ones used for generation.
 void removeSubMapper(java.lang.String mn, java.lang.String smn)
          Removes this submapper from the list of the ones used for generation.
 void setLoggerFactory(LoggerFactory lf)
          It assignes the logger factory.
 

Field Detail

LOGGER_NAME

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

DEFAULT_JORM_CONFIGURATION_FILE

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

USE_CONTEXT_CLASSLOADER

public static final java.lang.String USE_CONTEXT_CLASSLOADER
See Also:
Constant Field Values
Method Detail

configure

public void configure(java.lang.String propertyfile)
               throws PException
Configures the JORM compiler by loading information related to the different mappers supported by this instance of JORM using the given property file.

Throws:
PException

configure

public void configure()
               throws PException
Configures the JORM compiler by loading information related to the different mappers supported by this instance of JORM using the default property file.

Throws:
PException

configure

public void configure(java.util.Properties p)
Configures the JORM compiler by loading information related to the different mappers supported by this instance of JORM using the given properties.

Parameters:
p - is the properties containing the jorm configuration

configureLog

public void configureLog(java.lang.String propertyfile)
                  throws PException
Configures the logger factory object with a properties object.

Parameters:
propertyfile - a properties object
Throws:
PException

configureMIManager

public void configureMIManager(Manager miman)
                        throws PException
Configures the MI manager associated with either a JORM compiler or a simple mapper.

Parameters:
miman - The MI manager to be configured
Throws:
PException

configureParser

public void configureParser(Parser p,
                            java.util.ArrayList dtdlocs,
                            org.objectweb.jorm.util.io.api.PathExplorer pe,
                            Manager miman)
                     throws PException
Configures the parser associated with either a JORM compiler or a simple mapper.

Parameters:
miman - The parser to be configured
dtdlocs - Possible locations of DTDs
pe - Path explorer to be used
Throws:
PException

knownMappers

public java.util.Iterator knownMappers()
                                throws PException
Lists the names of supported mappers.

Returns:
This list Iterator.
Throws:
PException

getMIManager

public Manager getMIManager()
                     throws PException
Gets the MI manager to be used by JORM.

Returns:
That MI manager.
Throws:
PException

getParser

public Parser getParser()
                 throws PException
Gets the parser to be used by JORM.

Returns:
That parser.
Throws:
PException

getMIFactory

public MappingFactory getMIFactory(java.lang.String mappername)
                            throws PException
Gets the MI factory associated with the given mapper.

Parameters:
mappername - The name of the concerned mapper.
Returns:
The MappingFactory object.
Throws:
org.objectweb.jorm.api.PException
PException

getSchMgr

public PMappingStructuresManager getSchMgr(java.lang.String mappername)
                                    throws PException
Gets the schema manager associated with the given mapper.

Parameters:
mappername - The name of the concerned mapper.
Returns:
The PMappingStructuresManager object.
Throws:
org.objectweb.jorm.api.PException
PException

getGcmClass

public java.lang.Class getGcmClass(java.lang.String mappername)
                            throws PException
Gets the class name of the GenClassMapping associated with the given mapper.

Parameters:
mappername - The name of the concerned mapper.
Returns:
The string giving the class name.
Throws:
org.objectweb.jorm.api.PException
PException

getMappingParser

public MappingParser getMappingParser(java.lang.String mappername)
                               throws PException
Gets the parser associated with the given mapper for mapping infos.

Parameters:
mappername - The name of the concerned mapper.
Returns:
The MappingParser object.
Throws:
org.objectweb.jorm.api.PException
PException

getWriter

public org.objectweb.jorm.mi2xml.api.Writer getWriter()
                                               throws PException
Gets the BasicDomWriter object.

Returns:
The BasicDomWriter object.
Throws:
org.objectweb.jorm.api.PException
PException

getMappingDomtreeBuilder

public org.objectweb.jorm.mi2xml.api.MappingDomtreeBuilder getMappingDomtreeBuilder(java.lang.String mappername)
                                                                             throws PException
Gets the MappingDomTreeBuilder object associated with the given mapper.

Parameters:
mappername - The name of the concerned mapper.
Returns:
The MappingDomTreeBuilder object.
Throws:
org.objectweb.jorm.api.PException
PException

getSubMappers

public java.util.Collection getSubMappers(java.lang.String mappername)
                                   throws PException
Gets the submappers associated with a given mapper.

Parameters:
mappername - The concerned mapper.
Returns:
The collection of the names of submappers.
Throws:
org.objectweb.jorm.api.PException
PException

removeMapper

public void removeMapper(java.lang.String mn)
Removes this mapper from the list of the ones used for generation.

Parameters:
mn - The name of the concerned mapper.

removeAllMappers

public void removeAllMappers()
Removes all mappers from the list of the ones used for generation.


removeSubMapper

public void removeSubMapper(java.lang.String mn,
                            java.lang.String smn)
Removes this submapper from the list of the ones used for generation.

Parameters:
mn - The concerned mapper.
smn - The submapper to be removed.

addSubMapper

public void addSubMapper(java.lang.String mn,
                         java.lang.String smn)
Adds this submapper to the list of the ones used for generation.

Parameters:
mn - The concerned mapper.
smn - The submapper to be added.

setLoggerFactory

public void setLoggerFactory(LoggerFactory lf)
It assignes the logger factory.

Parameters:
lf -

getLoggerFactory

public LoggerFactory getLoggerFactory()
                               throws PException
Gets the logger factory associated with this instance of JORM.

Returns:
The logger factory.
Throws:
PException