|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.util.velocity.ConfigurableResourceManager com.atlassian.confluence.util.velocity.ConfluenceVelocityResourceManager
public class ConfluenceVelocityResourceManager
Specialisation that allows for a hot swappable ResourceCache. Also allows resource loaders to be configured as source of space decoration resources via the decorator.provider boolean property. Any resource loader not configured to be a space decorator provider will be wrapped and answer null for space decoration resources.
Nested Class Summary | |
---|---|
static class |
ConfluenceVelocityResourceManager.ConfluenceResourceFactory
This factory will return template that can be used to detect the presence of HTML in the template if required |
Nested classes/interfaces inherited from class com.atlassian.confluence.util.velocity.ConfigurableResourceManager |
---|
ConfigurableResourceManager.ResourceFactory |
Field Summary | |
---|---|
protected static org.apache.log4j.Category |
log
Deprecated. since 3.4 use a private Logger . |
Fields inherited from class com.atlassian.confluence.util.velocity.ConfigurableResourceManager |
---|
globalCache, RESOURCE_CONTENT, RESOURCE_TEMPLATE, resourceLoaders, rsvc |
Constructor Summary | |
---|---|
ConfluenceVelocityResourceManager()
Everytime this is called, the resource manager singleton is replaced with the newly provided instance. |
Method Summary | |
---|---|
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)
|
Methods inherited from class com.atlassian.confluence.util.velocity.ConfigurableResourceManager |
---|
getLoaderNameForResource, getResource, getResource, loadResource, refreshResource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Deprecated protected static final org.apache.log4j.Category log
Logger
.Constructor Detail |
---|
public ConfluenceVelocityResourceManager()
Method Detail |
---|
public static void setCacheFactory(com.atlassian.cache.CacheFactory cacheFactory)
public void initialize(org.apache.velocity.runtime.RuntimeServices runtimeServices) throws java.lang.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.
java.lang.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 loader
protected 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |