KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > barracuda > contrib > dbroggisch > page > Page


1 /*
2  * Copyright (C) 2003 Diez B. Roggisch [deets@web.de]
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * $Id: Page.java,v 1.4 2004/02/01 05:16:27 christianc Exp $
19  */

20 package org.enhydra.barracuda.contrib.dbroggisch.page;
21
22 import java.io.IOException JavaDoc;
23 import javax.servlet.ServletException JavaDoc;
24 import org.w3c.dom.Document JavaDoc;
25 import org.enhydra.barracuda.core.event.ControlEventContext;
26 import org.enhydra.barracuda.core.event.EventException;
27 import org.enhydra.barracuda.core.event.ViewEventContext;
28
29
30 /**
31  * The Page interface is the central interface for the Page-pattern.
32  * As you might have guessed by the name.
33  * Basically the page-pattern is a way to get rid of render-events and provides a convenient way to
34  * encapsulate and inherit code for rendering a html page.
35  *
36  * @author <a HREF="mailto:deets@web.de">Diez B. Roggisch</a>
37  * @version 1.0
38  */

39 public interface Page {
40
41     /**
42      * The name of this method is somewhat misleading -
43      *
44      * @param ctx a <code>ControlEventContext</code> value
45      */

46     public void createDefaultModels(ControlEventContext ctx);
47
48     /**
49      * Describe <code>render</code> method here.
50      *
51      * @param ctx a <code>ViewEventContext</code> value
52      * @exception EventException if an error occurs
53      * @exception javax.servlet.ServletException if an error occurs
54      * @exception java.io.IOException if an error occurs
55      */

56     public void render(ViewEventContext ctx)
57             throws EventException, ServletException JavaDoc, IOException JavaDoc;
58
59     /**
60      * Describe <code>handOver</code> method here.
61      *
62      * @param ctx a <code>ControlEventContext</code> value
63      * @param p a <code>Page</code> value
64      */

65     public void handOver(ControlEventContext ctx, Page p);
66
67 }
68
Popular Tags