juju.reattore.server.intercept.impl
Class AutoIndexInterceptor

java.lang.Object
  |
  +--juju.reattore.server.intercept.impl.VelocityInterceptor
        |
        +--juju.reattore.server.intercept.impl.AutoIndexInterceptor
All Implemented Interfaces:
Interceptor

public class AutoIndexInterceptor
extends VelocityInterceptor

An interceptor that will generate a pretty index of the requested directory.


Nested Class Summary
 class AutoIndexInterceptor.Helper
          Passed to the template to be used for various formatting tasks.
 
Constructor Summary
AutoIndexInterceptor()
           
 
Method Summary
protected  boolean populateContext(org.apache.velocity.VelocityContext ctx, HttpRequest req, HttpResponse resp)
          Hook to allow a derrived class to add extra items to the context.
 void setBaseDir(java.lang.String baseDir)
          Set the base directory.
 void setTimestampFormat(java.lang.String fmt)
          Sets the SimpleDateFormat format used when displaying the directory.
 
Methods inherited from class juju.reattore.server.intercept.impl.VelocityInterceptor
process, setLockedPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoIndexInterceptor

public AutoIndexInterceptor()
Method Detail

setTimestampFormat

public void setTimestampFormat(java.lang.String fmt)
Sets the SimpleDateFormat format used when displaying the directory.

Parameters:
fmt - The format to use.

setBaseDir

public void setBaseDir(java.lang.String baseDir)
Set the base directory.

Parameters:
baseDir - Base directory for all requests.

populateContext

protected boolean populateContext(org.apache.velocity.VelocityContext ctx,
                                  HttpRequest req,
                                  HttpResponse resp)
Description copied from class: VelocityInterceptor
Hook to allow a derrived class to add extra items to the context.

Overrides:
populateContext in class VelocityInterceptor
Parameters:
ctx - Main context
req - Incoming request
resp - Outgoing response
Returns:
true if the request was handled and processing should abort.
See Also:
VelocityInterceptor


Copyright © 2002-2003 Michael Hope. All Rights Reserved.