Restlet Framework 2.2 Snapshot
Java Standard Edition

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 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)
          Constructor.
 
Method Summary
 long getLastModified(Resource resource)
           
 InputStream getResourceStream(String name)
           
static Map<String,Representation> getStore()
          Returns the cache of template representations.
 void init(ExtendedProperties configuration)
           
 boolean isSourceModified(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)
Constructor.

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

getStore

public static Map<String,Representation> getStore()
Returns the cache of template representations.

Returns:
The cache of template representations.

getLastModified

public long getLastModified(Resource resource)
Specified by:
getLastModified in class ResourceLoader

getResourceStream

public InputStream getResourceStream(String name)
                              throws ResourceNotFoundException
Specified by:
getResourceStream in class ResourceLoader
Throws:
ResourceNotFoundException

init

public void init(ExtendedProperties configuration)
Specified by:
init in class ResourceLoader

isSourceModified

public boolean isSourceModified(Resource resource)
Specified by:
isSourceModified in class ResourceLoader

Restlet Framework 2.2 Snapshot
Java Standard Edition

Copyright © 2005-2014 Restlet.