com.atlassian.confluence.util.velocity
Class ConfluenceVelocityResourceManager
java.lang.Object
org.apache.velocity.runtime.resource.ResourceManagerImpl
com.atlassian.confluence.util.velocity.ConfluenceVelocityResourceManager
- All Implemented Interfaces:
- org.apache.velocity.runtime.resource.ResourceManager
public class ConfluenceVelocityResourceManager
- extends org.apache.velocity.runtime.resource.ResourceManagerImpl
Specialisation that allows for a hot swappable ResourceCache
| Fields inherited from class org.apache.velocity.runtime.resource.ResourceManagerImpl |
globalCache, RESOURCE_CONTENT, RESOURCE_TEMPLATE, resourceLoaders, rsvc |
| Methods inherited from class org.apache.velocity.runtime.resource.ResourceManagerImpl |
getLoaderNameForResource, getResource, getResource, loadResource, refreshResource |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfluenceVelocityResourceManager
public ConfluenceVelocityResourceManager()
- Everytime this is called, the resource manager singleton is replaced with the newly provided instance.
There should only ever be one of these created but as we don't have control over the creating code
(WebWork velocity manager), we can't enforce singleton use via a factory method.
setCacheManager
public static void setCacheManager(CacheManager cacheManager)
initialize
public void initialize(org.apache.velocity.runtime.RuntimeServices runtimeServices)
throws Exception
- Specified by:
initialize in interface org.apache.velocity.runtime.resource.ResourceManager- Overrides:
initialize in class org.apache.velocity.runtime.resource.ResourceManagerImpl
- Throws:
Exception