com.sri.common.controller
Class ControllerUtil
java.lang.Object
com.sri.common.controller.ControllerUtil
public final class ControllerUtil
- extends Object
Utility and convenience methods that are related to controllers.
- Version:
- 1.0
- Author:
- Michael Rimov
Method Summary |
static Transition |
generateReflextiveTransition(Map requestParameters,
Class currentControllerClass,
String invokedState)
Generate a Transition that if invoked would result in a redirection directly
back to self with identical parameters as when a transition was first invoked. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
generateReflextiveTransition
public static Transition generateReflextiveTransition(Map requestParameters,
Class currentControllerClass,
String invokedState)
- Generate a Transition that if invoked would result in a redirection directly
back to self with identical parameters as when a transition was first invoked.
This function is useful for generating 'returnToSender' referral URLs
- Parameters:
requestParameters
- Call ControllerRequest.getParameters() to
populate thie method.currentControllerClass
- The current controller class we're in. this.getClass()
should mostly sufficeinvokedState
- The currently invoked State ControllerResponse.getState() should do
the trick.
- Returns:
- Transition that is populated. Must call setControllerResponse() if
you just want to extract the URL.
Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.