edu.internet2.middleware.shibboleth.common.profile.provider
Class VelocityErrorHandler

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.common.profile.AbstractErrorHandler
      extended by edu.internet2.middleware.shibboleth.common.profile.provider.VelocityErrorHandler
All Implemented Interfaces:
ProfileHandler

public class VelocityErrorHandler
extends AbstractErrorHandler

An error handler that render an error page by means of evaluating a Velocity template.. The following attributes are available within the velocity context page:

Attribute Name Object Type Value
requestError Throwable Error that was thrown that triggered the invocation of this handler.


Field Summary
 
Fields inherited from class edu.internet2.middleware.shibboleth.common.profile.AbstractErrorHandler
ERROR_KEY
 
Constructor Summary
VelocityErrorHandler(org.apache.velocity.app.VelocityEngine engine, String template)
          Constructor.
 
Method Summary
 void initialize()
          Initializes this error handler by loading the velocity template into the engine.
 void processRequest(org.opensaml.ws.transport.InTransport in, org.opensaml.ws.transport.OutTransport out)
          Processes an incoming request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityErrorHandler

public VelocityErrorHandler(org.apache.velocity.app.VelocityEngine engine,
                            String template)
Constructor.

Parameters:
engine - engine used to render error page
template - classpath location of template used to render error page
Method Detail

initialize

public void initialize()
                throws IOException
Initializes this error handler by loading the velocity template into the engine.

Throws:
IOException - thrown if there is a problem reading the template file

processRequest

public void processRequest(org.opensaml.ws.transport.InTransport in,
                           org.opensaml.ws.transport.OutTransport out)
Processes an incoming request.

Specified by:
processRequest in interface ProfileHandler
Specified by:
processRequest in class AbstractErrorHandler
Parameters:
in - the incoming request transport
out - the outgoing response transport


Copyright © 2006-2009 Internet2. All Rights Reserved.