org.restlet.ext.velocity
Class RepresentationResourceLoader

java.lang.Object
  extended by org.apache.velocity.runtime.resource.loader.ResourceLoader
      extended by org.restlet.ext.velocity.RepresentationResourceLoader

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

Velocity resource loader based on a static map of representations or on a default representation.

Author:
Jerome Louvel

Field Summary
 
Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
className, isCachingOn, log, modificationCheckInterval, rsvc
 
Constructor Summary
RepresentationResourceLoader(Representation defaultRepresentation)
          Constructeur.
 
Method Summary
 long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
           
 java.io.InputStream getResourceStream(java.lang.String name)
           
static java.util.Map<java.lang.String,Representation> getStore()
           
 void init(ExtendedProperties configuration)
           
 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
 

Constructor Detail

RepresentationResourceLoader

public RepresentationResourceLoader(Representation defaultRepresentation)
Constructeur.

Parameters:
defaultRepresentation - The default representation to use.
Method Detail

getStore

public static java.util.Map<java.lang.String,Representation> getStore()

getLastModified

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

getResourceStream

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

init

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

isSourceModified

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


Copyright © 2005-2008 Noelios Technologies.