KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > openedit > Generator


1 /*
2 Copyright (c) 2003 eInnovation Inc. All rights reserved
3
4 This library is free software; you can redistribute it and/or modify it under the terms
5 of the GNU Lesser General Public License as published by the Free Software Foundation;
6 either version 2.1 of the License, or (at your option) any later version.
7
8 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the GNU Lesser General Public License for more details.
11 */

12
13 /*
14  * (c) Copyright 2001 MyCorporation.
15  * All Rights Reserved.
16  */

17 package com.openedit;
18
19 import com.openedit.generators.Output;
20 import com.openedit.page.Page;
21
22
23
24
25 /**
26  * A generator is responsible for rendering content (HTML, PDF, etc.) back to the client.
27  *
28  * @author Chris Burkey
29  */

30 public interface Generator
31 {
32     /**
33      * This method should retrieve the response from the context and write content to it based on
34      * the information in the page and its generator data (which will have come from this
35      * generator).
36      *
37      * @param inContext The context for the given page
38      * @param inGenConfig The generator's configuration for the given page
39      * @param inOutput The output stream to which to write output
40      //FIXME
41      */

42     public void generate( WebPageRequest inContext, Page inPage, Output inOut ) throws OpenEditException;
43     public String JavaDoc getName();
44     public void setName(String JavaDoc inName);
45     public boolean canGenerate(WebPageRequest inReq);
46     public boolean hasGenerator(Generator inChild);
47 }
48
Popular Tags