Method Summary |
|
public static void | addProperty(String key, Object value) Add a property to the configuration. |
public static boolean | addVelocimacro(String name, String macro, String argArray, String sourceTemplate) Adds a new Velocimacro. |
public static void | clearProperty(String key) Clear the values pertaining to a particular
property. |
public static void | debug(Object message) |
public static boolean | dumpVMNamespace(String namespace) tells the vmFactory to dump the specified namespace. |
public static void | error(Object message) |
public static Object | getApplicationAttribute(Object key) |
public static boolean | getBoolean(String key, boolean def) Boolean property accessor method to hide the configuration implementation.
Parameters: key - property key Parameters: def - The default value if property not found. |
public static ExtendedProperties | getConfiguration() Return the velocity runtime configuration object. |
public static ContentResource | getContent(String name) Returns a static content resource from the
resource manager. |
public static ContentResource | getContent(String name, String encoding) Returns a static content resource from the
resource manager. |
public EventCartridge | getEventCartridge() Returns the event handlers for the application. |
public static int | getInt(String key) Int property accessor method to hide the configuration implementation. |
public static int | getInt(String key, int defaultValue) Int property accessor method to hide the configuration implementation.
Parameters: key - property key Parameters: defaultValue - The default value. |
public static Introspector | getIntrospector() |
public static String | getLoaderNameForResource(String resourceName) Determines is a template exists, and returns name of the loader that
provides it. |
public static Log | getLog() Returns a convenient Log instance that wraps the current LogChute. |
public static Object | getProperty(String key) Allows an external caller to get a property. |
public static RuntimeInstance | getRuntimeInstance() |
public static RuntimeServices | getRuntimeServices() Returns the RuntimeServices Instance used by this wrapper. |
public static String | getString(String key, String defaultValue) String property accessor method with default to hide the
configuration implementation.
Parameters: key - property key Parameters: defaultValue - default value to return if key notfound in resource manager. |
public static String | getString(String key) |
public static Template | getTemplate(String name) Returns a Template from the resource manager.
This method assumes that the character encoding of the
template is set by the input.encoding
property. |
public static Template | getTemplate(String name, String encoding) |
public static Uberspect | getUberspect() Returns the Uberspect object for this Instance. |
public static Directive | getVelocimacro(String vmName, String templateName) Returns the appropriate VelocimacroProxy object if strVMname
is a valid current Velocimacro.
Parameters: vmName - Name of velocimacro requested Parameters: templateName - Name of the template that contains the velocimacro. |
public static void | info(Object message) |
public static synchronized void | init() This is the primary initialization method in the Velocity
Runtime. |
public static void | init(Properties p) Initialize the Velocity Runtime with a Properties
object. |
public static void | init(String configurationFile) Initialize the Velocity Runtime with the name of
ExtendedProperties object. |
public static boolean | isInitialized() Returns true if the RuntimeInstance has been successfully initialized. |
public static boolean | isVelocimacro(String vmName, String templateName) Checks to see if a VM exists
Parameters: vmName - Name of the Velocimacro. Parameters: templateName - Template on which to look for the Macro. |
public static SimpleNode | parse(Reader reader, String templateName) Parse the input and return the root of
AST node structure.
In the event that it runs out of parsers in the
pool, it will create and let them be GC'd
dynamically, logging that it has to do that. |
public static SimpleNode | parse(Reader reader, String templateName, boolean dumpNamespace) Parse the input and return the root of the AST node structure. |
public static void | setConfiguration(ExtendedProperties configuration) Allow an external system to set an ExtendedProperties
object to use. |
public static void | setProperty(String key, Object value) Allows an external system to set a property in
the Velocity Runtime. |
public static void | warn(Object message) |