KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > webapps > portal > components > Coplet


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.webapps.portal.components;
17
18 import java.util.Map JavaDoc;
19
20 import org.xml.sax.ContentHandler JavaDoc;
21 import org.xml.sax.ext.LexicalHandler JavaDoc;
22 import org.xml.sax.SAXException JavaDoc;
23 import org.apache.excalibur.source.SourceParameters;
24 import org.apache.cocoon.ProcessingException;
25
26 /**
27  * The coplet interface
28  *
29  * @author <a HREF="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
30  * @version CVS $Id: Coplet.java 30932 2004-07-29 17:35:38Z vgritsenko $
31 */

32 public interface Coplet {
33
34     /**
35      * This will be called before execute() is called. Should really
36      * only be called when the coplet is loaded (caching).
37      *
38     */

39     boolean init(Map JavaDoc objectModel,
40                  SourceParameters parameters)
41     throws ProcessingException;
42
43     /**
44      * Should stream the content to the consumer.
45      * The content must be inside a <content> node!
46      * If no content is provided (e.g. if size is min)
47      * than no <content> node should be generated!
48      */

49     void execute(ContentHandler JavaDoc contentHandler,
50                  LexicalHandler JavaDoc lexicalHandler,
51                  Map JavaDoc objectModel,
52                  SourceParameters parameters)
53     throws SAXException JavaDoc, ProcessingException;
54 }
55
56
Popular Tags