KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > bridge > jsp > taglib > editor > Editor


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10 package org.mmbase.bridge.jsp.taglib.editor;
11
12 import java.io.IOException JavaDoc;
13 import java.util.*;
14
15 import javax.servlet.jsp.PageContext JavaDoc;
16
17 import org.mmbase.bridge.*;
18 import org.mmbase.storage.search.*;
19 import org.mmbase.util.functions.*;
20 import org.mmbase.util.logging.Logger;
21 import org.mmbase.util.logging.Logging;
22
23 /**
24  * You should extend this class to implement your own EditTag.
25  * Create an implementation to serve information about the MMBase (sub)cloud
26  * and/or pages you want to access.
27  *
28  * @author André van Toly
29  * @author Michiel Meeuwissen
30  * @version $Id: Editor.java,v 1.12 2006/07/06 11:36:12 michiel Exp $
31  * @see EditTag
32  * @see YAMMEditor
33  * @since MMBase-1.8
34  */

35 abstract public class Editor {
36
37     private static final Logger log = Logging.getLoggerInstance(Editor.class);
38
39     protected final List queryList = new ArrayList(); // query List
40
protected final List nodenrList = new ArrayList(); // nodenr List
41
protected final List fieldList = new ArrayList(); // fieldname List
42

43     protected Parameters parameters = null;
44
45     /**
46      * @return A List with the parameters of the EditTag.
47      */

48     public final Parameters getParameters() {
49         if (parameters == null) {
50             parameters = new Parameters(getParameterDefinition());
51             parameters.setAutoCasting(true);
52         }
53         return parameters;
54     }
55     public final List getQueryList() {
56         return queryList;
57     }
58     public final List getNodenrList() {
59         return nodenrList;
60     }
61     public final List getFieldList() {
62         return fieldList;
63     }
64
65
66     protected Parameter[] getParameterDefinition() {
67         return Parameter.EMPTY;
68     }
69
70     /**
71      * Should create a link to an editor or some other way to edit the data displayed.
72      *
73      * @param context The PageContext
74      *
75     */

76     public abstract void getEditorHTML(PageContext JavaDoc context) throws IOException JavaDoc;
77
78 }
79
Popular Tags