KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > cms > servlets > MVCServletHandler


1 /**
2  *
3  * Magnolia and its source-code is licensed under the LGPL.
4  * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5  * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6  * you are required to provide proper attribution to obinary.
7  * If you reproduce or distribute the document without making any substantive modifications to its content,
8  * please use the following attribution line:
9  *
10  * Copyright 1993-2006 obinary Ltd. (http://www.obinary.com) All rights reserved.
11  *
12  */

13 package info.magnolia.cms.servlets;
14
15 import java.io.IOException JavaDoc;
16
17
18 /**
19  * This Handler is used in the MVCServlet
20  * @author Philipp Bracher
21  * @version $Id: MVCServletHandler.java 6341 2006-09-12 09:18:27Z philipp $
22  */

23 public interface MVCServletHandler {
24
25     String JavaDoc VIEW_NOTHING = "nothing"; //$NON-NLS-1$
26

27     /**
28      * Depending on the request it is generating a logical command name
29      * @return name of the command
30      */

31     String JavaDoc getCommand();
32
33     /**
34      * Call the method through reflection
35      * @param command
36      * @return the name of the view to show (used in renderHtml)
37      */

38     String JavaDoc execute(String JavaDoc command);
39
40     /**
41      * Render the tree depending on the view name.
42      * @param view
43      * @return
44      * @throws IOException
45      */

46     void renderHtml(String JavaDoc view) throws IOException JavaDoc;
47
48     /**
49      * The name of the handler
50      */

51     String JavaDoc getName();
52
53     /**
54      * Called after instantiating
55      */

56     void init() throws Exception JavaDoc;
57 }
Popular Tags