org.jboss.aerogear.controller.router.error
Class ErrorViewResolver
java.lang.Object
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.
|
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 |
delegate
private final ViewResolver delegate
ErrorViewResolver
public ErrorViewResolver(ViewResolver delegate)
- Sole constructor.
- Parameters:
delegate - the ViewResolver that this instance will delegate to.
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.
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.