velosurf.util
Class DBResourceLoader

java.lang.Object
  extended by org.apache.velocity.runtime.resource.loader.ResourceLoader
      extended by velosurf.util.DBResourceLoader

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

A database resource loader for use with Velosurf. Experimental.

Author:
Claude Brisson

Field Summary
protected  java.lang.String dataField
           
protected  DBReference db
           
protected  java.lang.String entity
           
protected  EntityReference table
           
protected  java.lang.String timestampField
           
 
Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
className, isCachingOn, log, modificationCheckInterval, rsvc
 
Constructor Summary
DBResourceLoader()
           
 
Method Summary
 long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
           
 java.io.InputStream getResourceStream(java.lang.String id)
           
 void init(org.apache.commons.collections.ExtendedProperties configuration)
           
protected  void initdb()
           
 boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
           
 
Methods inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
commonInit, getClassName, getModificationCheckInterval, isCachingOn, resourceExists, setCachingOn, setModificationCheckInterval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

db

protected DBReference db

table

protected EntityReference table

entity

protected java.lang.String entity

dataField

protected java.lang.String dataField

timestampField

protected java.lang.String timestampField
Constructor Detail

DBResourceLoader

public DBResourceLoader()
Method Detail

init

public void init(org.apache.commons.collections.ExtendedProperties configuration)
Specified by:
init in class org.apache.velocity.runtime.resource.loader.ResourceLoader

initdb

protected void initdb()

getResourceStream

public java.io.InputStream getResourceStream(java.lang.String id)
                                      throws org.apache.velocity.exception.ResourceNotFoundException
Specified by:
getResourceStream in class org.apache.velocity.runtime.resource.loader.ResourceLoader
Throws:
org.apache.velocity.exception.ResourceNotFoundException

isSourceModified

public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
Specified by:
isSourceModified in class org.apache.velocity.runtime.resource.loader.ResourceLoader

getLastModified

public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
Specified by:
getLastModified in class org.apache.velocity.runtime.resource.loader.ResourceLoader


~ooOoo~