org.apache.maven.plugin.resource.loader
Class ProjectResourceLoader

java.lang.Object
  extended byorg.apache.velocity.runtime.resource.loader.ResourceLoader
      extended byorg.apache.maven.plugin.resource.loader.ProjectResourceLoader

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

Resource Loader for external projects.

Version:
$Id: ProjectResourceLoader.html 816588 2012-05-08 12:37:27Z hboutemy $

Field Summary
 
Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
className, isCachingOn, log, modificationCheckInterval, rsvc
 
Constructor Summary
ProjectResourceLoader()
           
 
Method Summary
 long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
           
 java.io.InputStream getResourceStream(java.lang.String templateName)
          Get an InputStream so that the Runtime can build a template with it.
 void init(org.apache.commons.collections.ExtendedProperties configuration)
           
 boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
          How to keep track of all the modified times across the paths.
 
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

ProjectResourceLoader

public ProjectResourceLoader()
Method Detail

init

public void init(org.apache.commons.collections.ExtendedProperties configuration)

getResourceStream

public java.io.InputStream getResourceStream(java.lang.String templateName)
                                      throws org.apache.velocity.exception.ResourceNotFoundException
Get an InputStream so that the Runtime can build a template with it.

Parameters:
templateName - name of template to get
Returns:
InputStream containing the template
Throws:
org.apache.velocity.exception.ResourceNotFoundException - if template not found in the file template path.

isSourceModified

public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
How to keep track of all the modified times across the paths. Note that a file might have appeared in a directory which is earlier in the path; so we should search the path and see if the file we find that way is the same as the one that we have cached.


getLastModified

public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)


Copyright © 2002-2008 The Apache Software Foundation. All Rights Reserved.