com.atlassian.confluence.setup.velocity
Class HibernateResourceLoader
java.lang.Object
org.apache.velocity.runtime.resource.loader.ResourceLoader
com.atlassian.confluence.setup.velocity.HibernateResourceLoader
- public class HibernateResourceLoader
- extends org.apache.velocity.runtime.resource.loader.ResourceLoader
Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader |
className, isCachingOn, modificationCheckInterval, rsvc |
Methods inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader |
commonInit, getClassName, getModificationCheckInterval, isCachingOn, setCachingOn, setModificationCheckInterval |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateResourceLoader
public HibernateResourceLoader()
init
public void init(org.apache.commons.collections.ExtendedProperties configuration)
getResourceStream
public InputStream getResourceStream(String source)
throws org.apache.velocity.exception.ResourceNotFoundException
- Retrieves a velocity template from Hibernate, using the given source URL.
- Parameters:
source
- a URL in the form [spacekey]/[template-path], optionally with a leading slash. For global
templates, the spacekey is omitted.
- Returns:
- an InputStream for the contents of the template, or null if the template cannot be found.
- Throws:
org.apache.velocity.exception.ResourceNotFoundException
- if there is an error while trying to retrieve the template.
isSourceModified
public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
getLastModified
public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
getPersistentDecoratorDao
public PersistentDecoratorDao getPersistentDecoratorDao()
setSpaceManager
public void setSpaceManager(SpaceManager spaceManager)
setPersistentDecoratorDao
public void setPersistentDecoratorDao(PersistentDecoratorDao persistentDecoratorDao)
isSetupComplete
protected boolean isSetupComplete()
- Checks whether the Confluece setup was completed.
Method acts as a convinince method for easier testing of the HibernateResourceLoader.
- Returns:
- true if setup was completed