aerogear-controller 1.0.2

org.jboss.aerogear.controller.router.error
Class ErrorViewResolver

java.lang.Object
  extended by org.jboss.aerogear.controller.router.error.ErrorViewResolver
All Implemented Interfaces:
ViewResolver

public class ErrorViewResolver
extends Object
implements ViewResolver

A ViewResolver that decorates a ViewResolver to enable short-circuiting the call to resolve the views path.

This ViewResolver used only for error handling and specifically in the situation when a custom error route has not been defined.


Field Summary
private  ViewResolver delegate
           
 
Constructor Summary
ErrorViewResolver(ViewResolver delegate)
          Sole constructor.
 
Method Summary
 String resolveViewPathFor(Route route)
          Returns the path of the passed-in Route if it is a default error Route, and if not, will let the delegate handle resolving the path for the Route
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

private final ViewResolver delegate
Constructor Detail

ErrorViewResolver

public ErrorViewResolver(ViewResolver delegate)
Sole constructor.

Parameters:
delegate - the ViewResolver that this instance will delegate to.
Method Detail

resolveViewPathFor

public String resolveViewPathFor(Route route)
Returns the path of the passed-in Route if it is a default error Route, and if not, will let the delegate handle resolving the path for the Route

Specified by:
resolveViewPathFor in interface ViewResolver
Parameters:
route - the route for which a view is to be resolved
Returns:
String the view for the passed in Route.

aerogear-controller 1.0.2

Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.