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
private  org.slf4j.Logger log
          Class logger.
private  String templatePath
          Location of the template to use to render the error page.
private  org.apache.velocity.app.VelocityEngine velocityEngine
          Velocity engine used to render error page.
 
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
 

Field Detail

log

private final org.slf4j.Logger log
Class logger.


velocityEngine

private org.apache.velocity.app.VelocityEngine velocityEngine
Velocity engine used to render error page.


templatePath

private String templatePath
Location of the template to use to render the error page.

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 © 1999-2012. All Rights Reserved.