com.opencms.template
Class CmsTemplateClassManager

java.lang.Object
  |
  +--com.opencms.template.CmsTemplateClassManager
All Implemented Interfaces:
I_CmsLogChannels

public class CmsTemplateClassManager
extends Object
implements I_CmsLogChannels

Class for managing of the instances of all OpenCms template classes.

This class provides methods for getting the instance of a class. Once a instance of a template class is build, it is be cached and re-used.

Version:
$Revision: 1.30 $ $Date: 2003/02/02 10:22:56 $
Author:
Alexander Lucas

Field Summary
 
Fields inherited from interface com.opencms.boot.I_CmsLogChannels
C_FLEX_CACHE, C_FLEX_LOADER, C_LOGGING, C_MODULE_CRITICAL, C_MODULE_DEBUG, C_MODULE_INFO, C_OPENCMS_CACHE, C_OPENCMS_CRITICAL, C_OPENCMS_CRONSCHEDULER, C_OPENCMS_DEBUG, C_OPENCMS_ELEMENTCACHE, C_OPENCMS_INFO, C_OPENCMS_INIT, C_OPENCMS_POOL, C_OPENCMS_STATICEXPORT, C_OPENCMS_STREAMING, C_PREPROCESSOR_IS_LOGGING
 
Constructor Summary
CmsTemplateClassManager()
           
 
Method Summary
static Object getClassInstance(CmsObject cms, String classname)
          Gets the instance of the class with the given classname.
static Object getClassInstance(CmsObject cms, String classname, Object[] callParameters)
          Gets the instance of the class with the given classname.
static Object getClassInstance(CmsObject cms, String classname, Object[] callParameters, Class[] parameterTypes)
          Gets the instance of the class with the given classname.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsTemplateClassManager

public CmsTemplateClassManager()
Method Detail

getClassInstance

public static Object getClassInstance(CmsObject cms,
                                      String classname)
                               throws CmsException
Gets the instance of the class with the given classname. If no instance exists a new one will be created using the default constructor.

Parameters:
cms - CmsObject Object for accessing system resources.
classname - Name of the requested class.
Returns:
Instance of the class with the given name.
Throws:
CmsException

getClassInstance

public static Object getClassInstance(CmsObject cms,
                                      String classname,
                                      Object[] callParameters)
                               throws CmsException
Gets the instance of the class with the given classname. If no instance exists a new one will be created using the given arguments.

Parameters:
cms - CmsObject Object for accessing system resources.
classname - Name of the requested class.
callParameters - Array of arguments that should be passed to the Constructor.
Returns:
Instance of the class with the given name.
Throws:
CmsException

getClassInstance

public static Object getClassInstance(CmsObject cms,
                                      String classname,
                                      Object[] callParameters,
                                      Class[] parameterTypes)
                               throws CmsException
Gets the instance of the class with the given classname. If no instance exists a new one will be created using the given arguments interpreted as objects of the given classes.

Parameters:
cms - CmsObject Object for accessing system resources.
classname - Name of the requested class.
callParameters - Array of arguments that should be passed to the Constructor.
parameterTypes - Array of the types of the arguments.
Returns:
Instance of the class with the given name.
Throws:
CmsException