Return to www.inductionframework.org

com.acciente.induction.resolver
Class URLPathRedirectResolver

java.lang.Object
  extended by com.acciente.induction.resolver.URLPathRedirectResolver
All Implemented Interfaces:
RedirectResolver

public class URLPathRedirectResolver
extends java.lang.Object
implements RedirectResolver

This class is an illustrative implementation of a RedirectResolver that works in a manner consistent to the scheme used by the default ControllerResolver class, URLPathControllerResolver. If you are going to use Induction redirect support please replace this class with an implementation that would make sense for your application.


Constructor Summary
URLPathRedirectResolver(Config.RedirectResolver oRedirectResolverConfig, javax.servlet.ServletConfig oServletConfig)
           
 
Method Summary
 java.lang.String resolve(java.lang.Class oControllerClass)
          Called by Induction to resolve a redirect request defined on in terms of a target controller.
 java.lang.String resolve(java.lang.Class oControllerClass, java.lang.String sControllerMethodName)
          Called by Induction to resolve a redirect request defined on in terms of a target controller and a specific target method in the controller.
 java.lang.String resolve(java.lang.String sURL)
          Called by Induction to resolve a redirect request defined on in terms of a target URL, the URL may be a partial URL that this method is expected to complete.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLPathRedirectResolver

public URLPathRedirectResolver(Config.RedirectResolver oRedirectResolverConfig,
                               javax.servlet.ServletConfig oServletConfig)
Method Detail

resolve

public java.lang.String resolve(java.lang.Class oControllerClass)
Description copied from interface: RedirectResolver
Called by Induction to resolve a redirect request defined on in terms of a target controller.

Specified by:
resolve in interface RedirectResolver
Parameters:
oControllerClass - a class object representing a class that implements the Controller interface
Returns:
a string represting a complete URL

resolve

public java.lang.String resolve(java.lang.Class oControllerClass,
                                java.lang.String sControllerMethodName)
Description copied from interface: RedirectResolver
Called by Induction to resolve a redirect request defined on in terms of a target controller and a specific target method in the controller.

Specified by:
resolve in interface RedirectResolver
Parameters:
oControllerClass - a class object representing a class that implements the Controller interface
sControllerMethodName - a specific method name in the controller that the client should redirect to
Returns:
a string represting a complete URL

resolve

public java.lang.String resolve(java.lang.String sURL)
Description copied from interface: RedirectResolver
Called by Induction to resolve a redirect request defined on in terms of a target URL, the URL may be a partial URL that this method is expected to complete. The URL may even simply be a mnemonic reference that is mapped to a complete URL by this method.

Specified by:
resolve in interface RedirectResolver
Parameters:
sURL - a string representing a complete or partial URL
Returns:
a string represting a complete URL

Return to www.inductionframework.org

Copyright (c) 2008 Acciente, LLC. All rights reserved.