com.acciente.induction.dispatcher.resolver
Class URLResolver

java.lang.Object
  extended by com.acciente.induction.dispatcher.resolver.URLResolver

public class URLResolver
extends Object

This class is used to generate URLs dynamically from controller/view class names using the mapping rules defined for redirects.

Author:
Adinath Raveendra Raj

Constructor Summary
URLResolver(RedirectResolverExecutor oRedirectResolverExecutor, javax.servlet.http.HttpServletRequest oHttpServletRequest)
           
 
Method Summary
 String resolve(Class oTargetClass)
          Call to resolve a URL from a target controller or view.
 String resolve(Class oTargetClass, Map oURLQueryParameters)
          Call to resolve a URL from a target controller or view and a map of query parameters.
 String resolve(Class oControllerClass, String sControllerMethodName)
          Call to resolve a URL from a target controller and a specific target method in the controller.
 String resolve(Class oControllerClass, String sControllerMethodName, Map oURLQueryParameters)
          Call to resolve a URL from a target controller and a specific target method in the controller and has URL query parameters.
 String resolve(String sURLPart)
          Call to resolve a URL from a target URL, the URL may be a partial URL that this method is expected to complete.
 String resolve(String sURLPart, Map oURLQueryParameters)
          Use to resolve a URL from a target URL and URL query parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLResolver

public URLResolver(RedirectResolverExecutor oRedirectResolverExecutor,
                   javax.servlet.http.HttpServletRequest oHttpServletRequest)
Method Detail

resolve

public String resolve(Class oTargetClass)
Call to resolve a URL from a target controller or view.

Parameters:
oTargetClass - a class object representing a class that implements the Controller or interface or a view
Returns:
a string representing a complete URL

resolve

public String resolve(Class oTargetClass,
                      Map oURLQueryParameters)
Call to resolve a URL from a target controller or view and a map of query parameters.

Parameters:
oTargetClass - a class object representing a class that implements the Controller or interface or a view
oURLQueryParameters - a map to be converted to URL query parameters
Returns:
a string representing a complete URL

resolve

public String resolve(Class oControllerClass,
                      String sControllerMethodName)
Call to resolve a URL from a target controller and a specific target method in the controller.

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 representing a complete URL

resolve

public String resolve(Class oControllerClass,
                      String sControllerMethodName,
                      Map oURLQueryParameters)
Call to resolve a URL from a target controller and a specific target method in the controller and has URL query parameters.

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
oURLQueryParameters - a map to be converted to URL query parameters
Returns:
a string representing a complete URL

resolve

public String resolve(String sURLPart)
Call to resolve a URL from 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.

Parameters:
sURLPart - a string representing a complete or partial URL
Returns:
a string representing a complete URL

resolve

public String resolve(String sURLPart,
                      Map oURLQueryParameters)
Use to resolve a URL from a target URL and URL query parameters. 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.

Parameters:
sURLPart - a string representing a complete or partial URL
oURLQueryParameters - a map to be converted to URL query parameters
Returns:
a string representing a complete URL


Copyright © 2008-2013 Acciente, LLC. All Rights Reserved.