org.apache.velocity.runtime
public class VelocimacroManager extends Object
Version: $Id: VelocimacroManager.java,v 1.17.4.1 2004/03/03 23:22:55 geirm Exp $
| Nested Class Summary | |
|---|---|
| protected class | VelocimacroManager.MacroEntry
wrapper class for holding VM information |
| Field Summary | |
|---|---|
| static String | GLOBAL_NAMESPACE |
| boolean | inlineLocalMode |
| Hashtable | libraryMap map of names of library tempates/namespaces |
| Hashtable | namespaceHash Hash of namespace hashes. |
| boolean | namespacesOn |
| boolean | registerFromLib |
| RuntimeServices | rsvc |
| Constructor Summary | |
|---|---|
| VelocimacroManager(RuntimeServices rs)
Adds the global namespace to the hash. | |
| Method Summary | |
|---|---|
| Hashtable | addNamespace(String namespace)
adds a namespace to the namespaces
|
| boolean | addVM(String vmName, String macroBody, String[] argArray, String namespace)
Adds a VM definition to the cache. |
| boolean | dumpNamespace(String namespace)
Removes the VMs and the namespace from the manager.
|
| VelocimacroProxy | get(String vmName, String namespace)
gets a new living VelocimacroProxy object by the
name / source template duple |
| String | getLibraryName(String vmName, String namespace) |
| Hashtable | getNamespace(String namespace)
returns the hash for the specified namespace. |
| Hashtable | getNamespace(String namespace, boolean addIfNew)
returns the hash for the specified namespace, and if it doesn't exist
will create a new one and add it to the namespaces
|
| void | setNamespaceUsage(boolean b)
public switch to let external user of manager to control namespace
usage indep of properties. |
| void | setRegisterFromLib(boolean b) |
| void | setTemplateLocalInlineVM(boolean b) |
| boolean | usingNamespaces(String namespace)
determines if currently using namespaces.
|
Parameters: namespace name of namespace to add
Returns: Hash added to namespaces, ready for use
Returns: Whether everything went okay.
Parameters: namespace namespace to dump
Returns: boolean representing success
Parameters: namespace name of the namespace :)
Returns: namespace Hashtable of VMs or null if doesn't exist
Parameters: namespace name of the namespace :) addIfNew flag to add a new namespace if it doesn't exist
Returns: namespace Hashtable of VMs or null if doesn't exist
Parameters: namespace currently ignored
Returns: true if using namespaces, false if not