org.objectweb.jorm.mapper.fos.generator
Class FosMappingMOP

java.lang.Object
  extended byorg.objectweb.jorm.mapper.fos.generator.FosMappingMOP
All Implemented Interfaces:
Loggable, MOP

public class FosMappingMOP
extends java.lang.Object
implements MOP, Loggable

Author:
P. Dechamboux

Field Summary
protected  Logger logger
           
protected  LoggerFactory loggerFactory
           
 
Constructor Summary
FosMappingMOP()
           
 
Method Summary
 java.lang.String getDirName(FosClassMapping m, java.lang.String cn)
           
 Logger getLogger()
          Returns a logger to an component that wants to log things.
 LoggerFactory getLoggerFactory()
          Returns a logger factory that allows the creation of new loggers.
 java.lang.String[] getTemplateLibraries()
           
 void initContext(Context ctx, Class clazz, java.lang.String projectName, java.lang.String mapperName)
          Initializes a velocity context
 void setLogger(Logger l)
          Assigns a logger to an component that wants to log things.
 void setLoggerFactory(LoggerFactory lf)
          Assigns a logger factory that allows the creation of new loggers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected Logger logger

loggerFactory

protected LoggerFactory loggerFactory
Constructor Detail

FosMappingMOP

public FosMappingMOP()
Method Detail

initContext

public void initContext(Context ctx,
                        Class clazz,
                        java.lang.String projectName,
                        java.lang.String mapperName)
                 throws PException
Description copied from interface: MOP
Initializes a velocity context

Specified by:
initContext in interface MOP
Parameters:
ctx - is the context to initialize
Throws:
PException

getTemplateLibraries

public java.lang.String[] getTemplateLibraries()
Specified by:
getTemplateLibraries in interface MOP
Returns:
the list of .vm which contains velocity macros

getDirName

public java.lang.String getDirName(FosClassMapping m,
                                   java.lang.String cn)

getLogger

public Logger getLogger()
Description copied from interface: Loggable
Returns a logger to an component that wants to log things.

Specified by:
getLogger in interface Loggable

getLoggerFactory

public LoggerFactory getLoggerFactory()
Description copied from interface: Loggable
Returns a logger factory that allows the creation of new loggers.

Specified by:
getLoggerFactory in interface Loggable

setLogger

public void setLogger(Logger l)
Description copied from interface: Loggable
Assigns a logger to an component that wants to log things.

Specified by:
setLogger in interface Loggable
Parameters:
l - the logger object

setLoggerFactory

public void setLoggerFactory(LoggerFactory lf)
Description copied from interface: Loggable
Assigns a logger factory that allows the creation of new loggers.

Specified by:
setLoggerFactory in interface Loggable
Parameters:
lf - the LoggerFactory object to obtain new loggers