com.atlassian.confluence.setup.velocity
Class HibernateResourceLoader

java.lang.Object
  extended byorg.apache.velocity.runtime.resource.loader.ResourceLoader
      extended bycom.atlassian.confluence.setup.velocity.HibernateResourceLoader

public class HibernateResourceLoader
extends org.apache.velocity.runtime.resource.loader.ResourceLoader


Field Summary
 
Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
className, isCachingOn, modificationCheckInterval, rsvc
 
Constructor Summary
HibernateResourceLoader()
           
 
Method Summary
 long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
           
 PersistentDecoratorDao getPersistentDecoratorDao()
           
 InputStream getResourceStream(String source)
          Retrieves a velocity template from Hibernate, using the given source URL.
 void init(org.apache.commons.collections.ExtendedProperties configuration)
           
protected  boolean isSetupComplete()
          Checks whether the Confluece setup was completed.
 boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
           
 void setPersistentDecoratorDao(PersistentDecoratorDao persistentDecoratorDao)
           
 void setSpaceManager(SpaceManager spaceManager)
           
 
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
 

Constructor Detail

HibernateResourceLoader

public HibernateResourceLoader()
Method Detail

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


Confluence is developed by Atlassian.