public class HibernateResourceLoader
extends org.apache.velocity.runtime.resource.loader.ResourceLoader
For CONF-9959 this loader has been changed so that if the UpgradeManager does not indicate that the install is upgraded then it will return null for all resources requested (instead of going to Hibernate/the DB). This copes with the situation where an upgrade has not been successful and therefore the database does not contain the tables this loader would expect.
Constructor and Description |
---|
HibernateResourceLoader() |
Modifier and Type | Method and Description |
---|---|
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.
|
UpgradeManager |
getUpgradeManager() |
void |
init(org.apache.commons.collections.ExtendedProperties configuration) |
protected boolean |
isSetupComplete()
Checks whether the Confluence setup was completed.
|
boolean |
isSourceModified(org.apache.velocity.runtime.resource.Resource resource) |
void |
setPersistentDecoratorDao(PersistentDecoratorDao persistentDecoratorDao) |
void |
setSpaceManager(SpaceManager spaceManager) |
public void init(org.apache.commons.collections.ExtendedProperties configuration)
init
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
public InputStream getResourceStream(String source) throws org.apache.velocity.exception.ResourceNotFoundException
getResourceStream
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
source
- a URL in the form [spacekey]/[template-path], optionally with a leading slash. For global
templates, the spacekey is omitted.org.apache.velocity.exception.ResourceNotFoundException
- if there is an error while trying to retrieve the template.public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
isSourceModified
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
getLastModified
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
public PersistentDecoratorDao getPersistentDecoratorDao()
public void setSpaceManager(SpaceManager spaceManager)
public void setPersistentDecoratorDao(PersistentDecoratorDao persistentDecoratorDao)
protected boolean isSetupComplete()
public UpgradeManager getUpgradeManager()
Copyright © 2003–2020 Atlassian. All rights reserved.