net.sourceforge.stripes.action
Class OnwardResolution

java.lang.Object
  extended by net.sourceforge.stripes.action.OnwardResolution
Direct Known Subclasses:
ForwardResolution, RedirectResolution

public abstract class OnwardResolution
extends Object

Abstract class that provides a consistent API for all Resolutions that send the user onward to another view - either by forwarding, redirecting or some other mechanism. Provides methods for getting and setting the path that the user should be sent to next.

Author:
Tim Fennell

Field Summary
protected  String path
           
 
Constructor Summary
OnwardResolution()
           
 
Method Summary
abstract  void execute(HttpServletRequest request, HttpServletResponse response)
          Method should be implemented by sublcasses to perform the actual task of sending the user to the path specified.
 String getPath()
          Accessor for the path that the user should be sent to.
 void setPath(String path)
          Setter for the path that the user should be sent to.
 String toString()
          Method that will work for this class and subclasses; returns a String containing the class name, and the path to which it will send the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

path

protected String path
Constructor Detail

OnwardResolution

public OnwardResolution()
Method Detail

getPath

public String getPath()
Accessor for the path that the user should be sent to.


setPath

public void setPath(String path)
Setter for the path that the user should be sent to.


execute

public abstract void execute(HttpServletRequest request,
                             HttpServletResponse response)
                      throws Exception
Method should be implemented by sublcasses to perform the actual task of sending the user to the path specified.

Parameters:
request - the current HttpServletRequest
response - the current HttpServletResponse
Throws:
Exception - subclasses should throw an exception if the execution fails

toString

public String toString()
Method that will work for this class and subclasses; returns a String containing the class name, and the path to which it will send the user.

Overrides:
toString in class Object


© Copyright 2005, Stripes Development Team.