KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > cms > gui > dialog > DialogControl


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.gui.dialog;
14
15 import info.magnolia.cms.core.Content;
16
17 import java.io.IOException JavaDoc;
18 import java.io.Writer JavaDoc;
19
20 import javax.jcr.RepositoryException;
21 import javax.servlet.http.HttpServletRequest JavaDoc;
22 import javax.servlet.http.HttpServletResponse JavaDoc;
23
24
25 /**
26  * Interface for dialogs. A Magnolia Dialog should at least implements the <code>drawHtml</code> method to add html
27  * code to a page. Dialogs must have an empty constructor; the <code>init(Content, Content, PageContext)</code> is
28  * assured to be called before any other operation.
29  * @author Vinzenz Wyser
30  * @version 2.0
31  */

32 public interface DialogControl {
33
34     /**
35      * Initialize a Dialog. This method is guaranteed to be called just after the control instantiation.
36      * @param request current HttpServletRequest
37      * @param response current HttpServletResponse
38      * @param websiteNode current website node
39      * @param configNode configuration node for the dialog
40      * @throws RepositoryException
41      */

42     void init(HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response, Content websiteNode, Content configNode)
43         throws RepositoryException;
44
45     /**
46      * Actually draw the dialog content.
47      * @param out Writer
48      * @throws IOException exceptions thrown when writing to the Writer can be safely rethrown by the dialog
49      */

50     void drawHtml(Writer JavaDoc out) throws IOException JavaDoc;
51
52 }
53
Popular Tags