public class ConfluenceVelocityResourceManager extends ConfigurableResourceManager
Modifier and Type | Class and Description |
---|---|
static class |
ConfluenceVelocityResourceManager.ConfluenceResourceFactory
This factory will return template that can be used to detect the presence of HTML in the template if required
|
ConfigurableResourceManager.ResourceFactory
globalCache, log, RESOURCE_CONTENT, RESOURCE_TEMPLATE, resourceLoaders, rsvc
Constructor and Description |
---|
ConfluenceVelocityResourceManager()
Everytime this is called, the resource manager singleton is replaced with the newly provided instance.
|
Modifier and Type | Method and Description |
---|---|
protected ConfigurableResourceManager.ResourceFactory |
getResourceFactory()
Template method for provisioning a
ConfigurableResourceManager.ResourceFactory . |
void |
initialize(org.apache.velocity.runtime.RuntimeServices runtimeServices)
Initialize the ResourceManager.
|
protected org.apache.velocity.runtime.resource.loader.ResourceLoader |
postProcessLoader(org.apache.velocity.runtime.resource.loader.ResourceLoader loader,
org.apache.commons.collections.ExtendedProperties config)
Template method to allow subclasses to post process and possibly wrap a resource loader before it is added
to the loader list.
|
static void |
setCacheFactory(com.atlassian.cache.CacheFactory cacheFactory)
Deprecated.
since 5.10. Use
setCacheFactory(VCacheFactory) |
static void |
setCacheFactory(com.atlassian.vcache.VCacheFactory cacheFactory) |
getLoaderNameForResource, getResource, loadResource, refreshResource
public ConfluenceVelocityResourceManager()
@Deprecated public static void setCacheFactory(com.atlassian.cache.CacheFactory cacheFactory)
setCacheFactory(VCacheFactory)
public static void setCacheFactory(com.atlassian.vcache.VCacheFactory cacheFactory)
public void initialize(org.apache.velocity.runtime.RuntimeServices runtimeServices) throws Exception
ConfigurableResourceManager
initialize
in interface org.apache.velocity.runtime.resource.ResourceManager
initialize
in class ConfigurableResourceManager
runtimeServices
- The Runtime Services object which is associated with this Resource Manager.Exception
protected org.apache.velocity.runtime.resource.loader.ResourceLoader postProcessLoader(org.apache.velocity.runtime.resource.loader.ResourceLoader loader, org.apache.commons.collections.ExtendedProperties config)
ConfigurableResourceManager
postProcessLoader
in class ConfigurableResourceManager
loader
- Resource loader to processconfig
- Configured properties for the resource loaderprotected ConfigurableResourceManager.ResourceFactory getResourceFactory()
ConfigurableResourceManager
Template method for provisioning a ConfigurableResourceManager.ResourceFactory
. Subclasses may customise this factory where
necessary.
This implementation returns a strategy that delegates to the default Velocity resource factory methods.
getResourceFactory
in class ConfigurableResourceManager
ConfigurableResourceManager.DefaultResourceFactory
Copyright © 2003–2020 Atlassian. All rights reserved.