KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > workplace > editors > I_CmsEditorActionHandler


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/workplace/editors/I_CmsEditorActionHandler.java,v $
3  * Date : $Date: 2006/10/26 12:25:34 $
4  * Version: $Revision: 1.10 $
5  *
6  * This library is part of OpenCms -
7  * the Open Source Content Mananagement System
8  *
9  * Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com)
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * For further information about Alkacon Software GmbH, please see the
22  * company website: http://www.alkacon.com
23  *
24  * For further information about OpenCms, please see the
25  * project website: http://www.opencms.org
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */

31
32 package org.opencms.workplace.editors;
33
34 import org.opencms.jsp.CmsJspActionElement;
35 import org.opencms.workplace.editors.directedit.CmsDirectEditButtonSelection;
36 import org.opencms.workplace.editors.directedit.CmsDirectEditJspIncludeProvider;
37 import org.opencms.workplace.editors.directedit.CmsDirectEditPermissions;
38
39 import java.io.IOException JavaDoc;
40
41 import javax.servlet.jsp.JspException JavaDoc;
42
43 /**
44  * Provides a method for performing an individual action if the user pressed a special button in the editor.<p>
45  *
46  * You can define the class of your own editor action method in the OpenCms XML configuration files.
47  * The class you enter must implement this interface to perform the editor action.<p>
48  *
49  * @author Andreas Zahner
50  *
51  * @version $Revision: 1.10 $
52  *
53  * @since 6.0.0
54  */

55 public interface I_CmsEditorActionHandler {
56
57     /**
58      * Prefix for direct edit end elements, used on JPS pages that supply the direct edit html.
59      *
60      * @deprecated use {@link CmsDirectEditJspIncludeProvider#DIRECT_EDIT_AREA_END}
61      */

62     String JavaDoc DIRECT_EDIT_AREA_END = CmsDirectEditJspIncludeProvider.DIRECT_EDIT_AREA_END;
63
64     /**
65      * Prefix for direct edit start elements, used on JPS pages that supply the direct edit html.
66      *
67      * @deprecated use {@link CmsDirectEditJspIncludeProvider#DIRECT_EDIT_AREA_END}
68      */

69     String JavaDoc DIRECT_EDIT_AREA_START = CmsDirectEditJspIncludeProvider.DIRECT_EDIT_AREA_START;
70
71     /**
72      * Key to identify the direct edit configuration file.
73      *
74      * @deprecated not longer used (the file URI is not longer stored in the page context)
75      */

76     String JavaDoc DIRECT_EDIT_INCLUDE_FILE_URI = "__directEditIncludeFileUri";
77
78     /**
79      * Default direct edit include file URI.
80      *
81      * @deprecated use {@link CmsDirectEditJspIncludeProvider#DIRECT_EDIT_INCLUDE_FILE_URI_DEFAULT}
82      */

83     String JavaDoc DIRECT_EDIT_INCLUDE_FILE_URI_DEFAULT = CmsDirectEditJspIncludeProvider.DIRECT_EDIT_INCLUDE_FILE_URI_DEFAULT;
84
85     /**
86      * Element name for direct edit includes.
87      *
88      * @deprecated use {@link CmsDirectEditJspIncludeProvider#DIRECT_EDIT_INCLUDES}
89      */

90     String JavaDoc DIRECT_EDIT_INCLUDES = "directedit_includes";
91
92     /**
93      * Constant for: direct edit mode disabled.
94      *
95      * @deprecated use {@link CmsDirectEditPermissions#VALUE_DISABLED} or better {@link CmsDirectEditPermissions#DISABLED}
96      */

97     String JavaDoc DIRECT_EDIT_MODE_DISABLED = CmsDirectEditPermissions.VALUE_DISABLED;
98
99     /**
100      * Constant for: direct edit mode enabled.
101      *
102      * @deprecated use {@link CmsDirectEditPermissions#VALUE_ENABLED} or better {@link CmsDirectEditPermissions#ENABLED}
103      */

104     String JavaDoc DIRECT_EDIT_MODE_ENABLED = CmsDirectEditPermissions.VALUE_ENABLED;
105
106     /**
107      * Constant for: direct edit mode inactive.
108      *
109      * @deprecated use {@link CmsDirectEditPermissions#VALUE_INACTIVE} or better {@link CmsDirectEditPermissions#INACTIVE}
110      */

111     String JavaDoc DIRECT_EDIT_MODE_INACTIVE = CmsDirectEditPermissions.VALUE_INACTIVE;
112
113     /**
114      * Option value that indicates the "delete" button should be displayed.
115      *
116      * @deprecated use {@link CmsDirectEditButtonSelection#VALUE_DELETE}
117      */

118     String JavaDoc DIRECT_EDIT_OPTION_DELETE = CmsDirectEditButtonSelection.VALUE_DELETE;
119
120     /**
121      * Option value that indicates the "edit" button should be displayed.
122      *
123      * @deprecated use {@link CmsDirectEditButtonSelection#VALUE_EDIT} or better {@link CmsDirectEditButtonSelection#EDIT}
124      */

125     String JavaDoc DIRECT_EDIT_OPTION_EDIT = CmsDirectEditButtonSelection.VALUE_EDIT;
126
127     /**
128      * Option value that indicates the "new" button should be displayed.
129      *
130      * @deprecated use {@link CmsDirectEditButtonSelection#VALUE_NEW}
131      */

132     String JavaDoc DIRECT_EDIT_OPTION_NEW = CmsDirectEditButtonSelection.VALUE_NEW;
133
134     /**
135      * Key to identify the edit button style, used on JPS pages that supply the direct edit html.
136      *
137      * @deprecated use {@link CmsDirectEditJspIncludeProvider#DIRECT_EDIT_PARAM_BUTTONSTYLE}
138      */

139     String JavaDoc DIRECT_EDIT_PARAM_BUTTONSTYLE = CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_BUTTONSTYLE;
140
141     /**
142      * Key to identify the edit element, used on JPS pages that supply the direct edit html.
143      *
144      * @deprecated use {@link CmsDirectEditJspIncludeProvider#DIRECT_EDIT_PARAM_ELEMENT}
145      */

146     String JavaDoc DIRECT_EDIT_PARAM_ELEMENT = CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_ELEMENT;
147
148     /**
149      * Key to identify the edit language, used on JPS pages that supply the direct edit html.
150      *
151      * @deprecated use {@link CmsDirectEditJspIncludeProvider#DIRECT_EDIT_PARAM_LOCALE}
152      */

153     String JavaDoc DIRECT_EDIT_PARAM_LOCALE = CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_LOCALE;
154
155     /**
156      * Key to identify the link to use for the "new" button (if enabled).
157      *
158      * @deprecated use {@link CmsDirectEditJspIncludeProvider#DIRECT_EDIT_PARAM_NEWLINK}
159      */

160     String JavaDoc DIRECT_EDIT_PARAM_NEWLINK = CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_NEWLINK;
161
162     /**
163      * Key to identify additional direct edit options, used e.g. to control which direct edit buttons are displayed
164      *
165      * @deprecated use {@link CmsDirectEditJspIncludeProvider#DIRECT_EDIT_PARAM_OPTIONS}
166      */

167     String JavaDoc DIRECT_EDIT_PARAM_OPTIONS = CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_OPTIONS;
168
169     /**
170      * Key to identify the edit target, used on JPS pages that supply the direct edit html.
171      *
172      * @deprecated use {@link CmsDirectEditJspIncludeProvider#DIRECT_EDIT_PARAM_TARGET}
173      */

174     String JavaDoc DIRECT_EDIT_PARAM_TARGET = CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_TARGET;
175
176     /**
177      * Performs an action which is configurable in the implementation of the interface, e.g. save, exit, publish.<p>
178      *
179      * @param editor the current editor instance
180      * @param jsp the JSP action element
181      * @throws IOException if a redirection fails
182      * @throws JspException if including a JSP fails
183      */

184     void editorAction(CmsEditor editor, CmsJspActionElement jsp) throws IOException JavaDoc, JspException JavaDoc;
185
186     /**
187      * Returns the key name of the button displayed in the editor.<p>
188      *
189      * @return the key name of the button
190      */

191     String JavaDoc getButtonName();
192
193     /**
194      * Returns the URL of the button displayed in the editor.<p>
195      *
196      * @param jsp the JSP action element
197      * @param resourceName the name of the edited resource
198      * @return the URL of the button
199      */

200     String JavaDoc getButtonUrl(CmsJspActionElement jsp, String JavaDoc resourceName);
201
202     /**
203      * Returns true if the customized button should be active, otherwise false.<p>
204      *
205      * @param jsp the JSP action element
206      * @param resourceName the name of the edited resource
207      * @return true if the customized button should be active, otherwise false
208      */

209     boolean isButtonActive(CmsJspActionElement jsp, String JavaDoc resourceName);
210 }
Popular Tags