Logo Search packages:      
Sourcecode: velocity version File versions  Download package

org::apache::velocity::runtime::Runtime Class Reference

Inheritance diagram for org::apache::velocity::runtime::Runtime:

org::apache::velocity::runtime::RuntimeConstants

List of all members.


Detailed Description

This is the Runtime system for Velocity. It is the single access point for all functionality in Velocity. It adheres to the mediator pattern and is the only structure that developers need to be familiar with in order to get Velocity to perform.

The Runtime will also cooperate with external systems like Turbine. Runtime properties can set and then the Runtime is initialized.

Turbine for example knows where the templates are to be loaded from, and where the velocity log file should be placed.

So in the case of Velocity cooperating with Turbine the code might look something like the following:

 Runtime.setProperty(Runtime.FILE_RESOURCE_LOADER_PATH, templatePath);
 Runtime.setProperty(Runtime.RUNTIME_LOG, pathToVelocityLog);
 Runtime.init();
 

 -----------------------------------------------------------------------
 N O T E S  O N  R U N T I M E  I N I T I A L I Z A T I O N
 -----------------------------------------------------------------------
 Runtime.init()

 If Runtime.init() is called by itself the Runtime will
 initialize with a set of default values.
 -----------------------------------------------------------------------
 Runtime.init(String/Properties)

 In this case the default velocity properties are layed down
 first to provide a solid base, then any properties provided
 in the given properties object will override the corresponding
 default property.
 -----------------------------------------------------------------------
 

Author:
Jason van Zyl

Jeff Bowden

Geir Magusson Jr.

See also:
org.apache.velocity.runtime.RuntimeInstance

org.apache.velocity.runtime.RuntimeSingleton

Deprecated:
Use RuntimeInstance or RuntimeSingleton instead.
Version:
Id
Runtime.java,v 1.116.4.1 2004/03/03 23:22:55 geirm Exp

Definition at line 90 of file Runtime.java.


Static Public Member Functions

static void addProperty (String key, Object value)
static boolean addVelocimacro (String name, String macro, String argArray[], String sourceTemplate)
static void clearProperty (String key)
static void debug (Object message)
static boolean dumpVMNamespace (String namespace)
static void error (Object message)
static boolean getBoolean (String key, boolean def)
static ExtendedProperties getConfiguration ()
static ContentResource getContent (String name, String encoding) throws ResourceNotFoundException, ParseErrorException, Exception
static ContentResource getContent (String name) throws ResourceNotFoundException, ParseErrorException, Exception
static int getInt (String key, int defaultValue)
static int getInt (String key)
static String getLoaderNameForResource (String resourceName)
static Object getProperty (String key)
static String getString (String key)
static String getString (String key, String defaultValue)
static Template getTemplate (String name, String encoding) throws ResourceNotFoundException, ParseErrorException, Exception
static Template getTemplate (String name) throws ResourceNotFoundException, ParseErrorException, Exception
static Directive getVelocimacro (String vmName, String templateName)
static void info (Object message)
static void init (String configurationFile) throws Exception
static void init (Properties p) throws Exception
static synchronized void init () throws Exception
static boolean isVelocimacro (String vmName, String templateName)
static SimpleNode parse (Reader reader, String templateName, boolean dumpNamespace) throws ParseException
static SimpleNode parse (Reader reader, String templateName) throws ParseException
static void setConfiguration (ExtendedProperties configuration)
static void setProperty (String key, Object value)
static void warn (Object message)

Static Public Attributes

static final String COUNTER_INITIAL_VALUE
static final String COUNTER_NAME
static final String DEBUG_PREFIX = " [debug] "
static final String DEFAULT_RUNTIME_DIRECTIVES
static final String DEFAULT_RUNTIME_PROPERTIES
static final String ENCODING_DEFAULT = "ISO-8859-1"
static final String ERROR_PREFIX = " [error] "
static String ERRORMSG_END
static String ERRORMSG_START
static final String FILE_RESOURCE_LOADER_CACHE
static final String FILE_RESOURCE_LOADER_PATH
static final String INFO_PREFIX = " [info] "
static final String INPUT_ENCODING = "input.encoding"
static String INTERPOLATE_STRINGLITERALS
static final String LOGSYSTEM_LOG4J_EMAIL_BUFFER_SIZE
static final String LOGSYSTEM_LOG4J_EMAIL_FROM
static final String LOGSYSTEM_LOG4J_EMAIL_SERVER
static final String LOGSYSTEM_LOG4J_EMAIL_SUBJECT
static final String LOGSYSTEM_LOG4J_EMAIL_TO
static final String LOGSYSTEM_LOG4J_FILE_BACKUPS
static final String LOGSYSTEM_LOG4J_FILE_SIZE
static final String LOGSYSTEM_LOG4J_PATTERN
static final String LOGSYSTEM_LOG4J_REMOTE_HOST
static final String LOGSYSTEM_LOG4J_REMOTE_PORT
static final String LOGSYSTEM_LOG4J_SYSLOGD_FACILITY
static final String LOGSYSTEM_LOG4J_SYSLOGD_HOST
static final int NUMBER_OF_PARSERS = 20
static final String OUTPUT_ENCODING = "output.encoding"
static String PARSE_DIRECTIVE_MAXDEPTH = "directive.parse.max.depth"
static final String PARSER_POOL_SIZE = "parser.pool.size"
static final String RESOURCE_LOADER = "resource.loader"
static String RESOURCE_MANAGER_CACHE_CLASS
static String RESOURCE_MANAGER_CLASS = "resource.manager.class"
static final String RESOURCE_MANAGER_LOGWHENFOUND
static final String RUNTIME_LOG
static final String RUNTIME_LOG_ERROR_STACKTRACE
static final String RUNTIME_LOG_INFO_STACKTRACE
static final String RUNTIME_LOG_LOGSYSTEM
static final String RUNTIME_LOG_LOGSYSTEM_CLASS
static final String RUNTIME_LOG_REFERENCE_LOG_INVALID
static final String RUNTIME_LOG_WARN_STACKTRACE
static final String UBERSPECT_CLASSNAME = "runtime.introspector.uberspect"
static final String UNKNOWN_PREFIX = " [unknown] "
static final String VM_CONTEXT_LOCALSCOPE
static final String VM_LIBRARY = "velocimacro.library"
static final String VM_LIBRARY_AUTORELOAD
static final String VM_MESSAGES_ON = "velocimacro.messages.on"
static final String VM_PERM_ALLOW_INLINE
static final String VM_PERM_ALLOW_INLINE_REPLACE_GLOBAL
static final String VM_PERM_INLINE_LOCAL
static final String WARN_PREFIX = " [warn] "

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index