KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > controller > Result


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.verge.mvc.controller;
8
9
10 import java.net.URISyntaxException JavaDoc;
11
12 import javax.servlet.http.HttpServletRequest JavaDoc;
13
14
15 /**
16  * <p>
17  * This class is returned from the {@link ControllerHandler
18  * ControllerHandlers} to tell the {@link ControllerParser
19  * ControllerParser} what to do with the response. This
20  * stores the URL and whether or not to forward. The {@link
21  * DefaultControllerParser DefaultControllerParser} will
22  * use this interface to either forward the request or send
23  * a redirect to the client.
24  * </p>
25  *
26  * @author Brian Pontarelli
27  * @since 2.0
28  * @version 2.0
29  */

30 public interface Result {
31
32     /**
33      * Returns the URL result
34      *
35      * @return The URL to forward or redirect to
36      */

37     public String JavaDoc getURL();
38
39     /**
40      * Returns whether or not to forward the request or send a redirect
41      *
42      * @return Whether to forward or redirect
43      */

44     public boolean isForward();
45
46     /**
47      * Returns the URL category of this result
48      *
49      * @return The URL category of the result
50      */

51     public String JavaDoc getCategory();
52
53     /**
54      * Returns the fully generated URL using the category if one was specified
55      *
56      * @return The fully generated URL
57      */

58     public String JavaDoc getGeneratedURL(HttpServletRequest JavaDoc request)
59     throws URISyntaxException JavaDoc;
60 }
Popular Tags