org.objectweb.jonas_ejb.genic
Class VContextFactory

java.lang.Object
  extended by org.objectweb.jonas_ejb.genic.VContextFactory

public class VContextFactory
extends java.lang.Object

This class allows to create the Velocity Context used to build the generated sources with the Velocity templates.


Constructor Summary
VContextFactory()
           
 
Method Summary
static org.apache.velocity.VelocityContext create(BeanDesc dd, int srcType)
          Creates the Velocity Context used to build the generated sources with the Velocity templates.
static java.lang.Boolean pkIsUserClass(java.lang.String classname)
           
static java.lang.String toString(org.apache.velocity.VelocityContext vc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VContextFactory

public VContextFactory()
Method Detail

create

public static org.apache.velocity.VelocityContext create(BeanDesc dd,
                                                         int srcType)
                                                  throws GenICException
Creates the Velocity Context used to build the generated sources with the Velocity templates. There are different types of Velocity Context : HOME, LOCAL_HOME, REMOTE, LOCAL, ENTITY_HANDLE, ENTITY_CMP_JDBC, ...

Parameters:
dd - The bean Deployment Descriptor
srcType - the type of Velocity Context
Returns:
Return the Velocity Context associated to the gievn bean for the given source to generate
Throws:
GenICException - in error case
See Also:
for type definitions.

pkIsUserClass

public static java.lang.Boolean pkIsUserClass(java.lang.String classname)
Parameters:
classname - name of a class
Returns:
true if the class is a 'user' class, false if it's a java class

toString

public static java.lang.String toString(org.apache.velocity.VelocityContext vc)
Parameters:
vc - VelocityContext to trace
Returns:
Return a string representation of the given VelocityContext for debug use