org.objectweb.jorm.api

Interface JormConfigurator

Known Subinterfaces:
JormCompilerConfigurator

public interface JormConfigurator

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

Author:
P. Dechamboux

Field Summary

static String
DEFAULT_JORM_CONFIGURATION_FILE
static String
LOGGER_NAME
static String
USE_CONTEXT_CLASSLOADER

Method Summary

void
addSubMapper(String mn, 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(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(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(String propertyfile)
Configures the logger factory object with a properties object.
Class
getGcmClass(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.
MappingFactory
getMIFactory(String mappername)
Gets the MI factory associated with the given mapper.
Manager
getMIManager()
Gets the MI manager to be used by JORM.
org.objectweb.jorm.mi2xml.api.MappingDomtreeBuilder
getMappingDomtreeBuilder(String mappername)
Gets the MappingDomTreeBuilder object associated with the given mapper.
MappingParser
getMappingParser(String mappername)
Gets the parser associated with the given mapper for mapping infos.
Parser
getParser()
Gets the parser to be used by JORM.
PMappingStructuresManager
getSchMgr(String mappername)
Gets the schema manager associated with the given mapper.
Collection
getSubMappers(String mappername)
Gets the submappers associated with a given mapper.
org.objectweb.jorm.mi2xml.api.Writer
getWriter()
Gets the BasicDomWriter object.
Iterator
knownMappers()
Lists the names of supported mappers.
void
removeAllMappers()
Removes all mappers from the list of the ones used for generation.
void
removeMapper(String mn)
Removes this mapper from the list of the ones used for generation.
void
removeSubMapper(String mn, String smn)
Removes this submapper from the list of the ones used for generation.
void
setLoggerFactory(LoggerFactory lf)
It assignes the logger factory.

Field Details

DEFAULT_JORM_CONFIGURATION_FILE

public static final String DEFAULT_JORM_CONFIGURATION_FILE


LOGGER_NAME

public static final String LOGGER_NAME


USE_CONTEXT_CLASSLOADER

public static final String USE_CONTEXT_CLASSLOADER

Method Details

addSubMapper

public void addSubMapper(String mn,
                         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.


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(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


configure

public void configure(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 -


configureLog

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

Parameters:
propertyfile - a properties object


getGcmClass

public Class getGcmClass(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:
PException -


getLoggerFactory

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

Returns:
The logger factory.


getMIFactory

public MappingFactory getMIFactory(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:
PException -


getMIManager

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

Returns:
That MI manager.


getMappingDomtreeBuilder

public org.objectweb.jorm.mi2xml.api.MappingDomtreeBuilder getMappingDomtreeBuilder(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:
PException -


getMappingParser

public MappingParser getMappingParser(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:
PException -


getParser

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

Returns:
That parser.


getSchMgr

public PMappingStructuresManager getSchMgr(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:
PException -


getSubMappers

public Collection getSubMappers(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:
PException -


getWriter

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

Returns:
The BasicDomWriter object.

Throws:
PException -


knownMappers

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

Returns:
This list Iterator.


removeAllMappers

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


removeMapper

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

Parameters:
mn - The name of the concerned mapper.


removeSubMapper

public void removeSubMapper(String mn,
                            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.


setLoggerFactory

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

Parameters:
lf -