KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > workplace > tools > I_CmsToolHandler


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/workplace/tools/I_CmsToolHandler.java,v $
3  * Date : $Date: 2006/03/27 14:52:51 $
4  * Version: $Revision: 1.18 $
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.tools;
33
34 import org.opencms.file.CmsObject;
35 import org.opencms.workplace.CmsWorkplace;
36
37 import java.util.Map JavaDoc;
38
39 /**
40  * Interface for an admin tool handler.<p>
41  *
42  * These handlers are created and managed by the
43  * <code>{@link org.opencms.workplace.tools.CmsToolManager}</code>.<p>
44  *
45  * @author Michael Moossen
46  *
47  * @version $Revision: 1.18 $
48  *
49  * @since 6.0.0
50  */

51 public interface I_CmsToolHandler {
52
53     /**
54      * Returns the help text if disabled.<p>
55      *
56      * @return the help text if disabled
57      */

58     String JavaDoc getDisabledHelpText();
59
60     /**
61      * Returns the group.<p>
62      *
63      * @return the group
64      */

65     String JavaDoc getGroup();
66
67     /**
68      * Returns the help text.<p>
69      *
70      * @return the help text
71      */

72     String JavaDoc getHelpText();
73
74     /**
75      * Returns the path to the icon.<p>
76      *
77      * @return the path to the icon
78      */

79     String JavaDoc getIconPath();
80
81     /**
82      * Returns the link to the tool.<p>
83      *
84      * @return the link
85      */

86     String JavaDoc getLink();
87
88     /**
89      * Returns the displayed name.<p>
90      *
91      * @return the name
92      */

93     String JavaDoc getName();
94
95     /**
96      * Returns the evaluated map of parameters.<p>
97      *
98      * @param wp the workplace context
99      *
100      * @return the parameters map
101      */

102     Map JavaDoc getParameters(CmsWorkplace wp);
103     
104     /**
105      * Returns the tool path to install the tool in.<p>
106      *
107      * @return the path
108      */

109     String JavaDoc getPath();
110
111     /**
112      * Returns the relative position in the group.<p>
113      *
114      * @return the position
115      */

116     float getPosition();
117
118     /**
119      * Returns the name for the menu or navbar.<p>
120      *
121      * @return the short name
122      */

123     String JavaDoc getShortName();
124
125     /**
126      * Returns an optional confirmation message, displayed in a js confirm dialog.<p>
127      *
128      * @return the confirmation message
129      */

130     String JavaDoc getConfirmationMessage();
131
132     /**
133      * Returns the path to an optional small(16x16) icon.<p>
134      *
135      * @return the path to an optional small(16x16) icon
136      */

137     String JavaDoc getSmallIconPath();
138
139     /**
140      * Returns the state of the admin tool for a given cms context.<p>
141      *
142      * @param cms the cms context
143      *
144      * @return <code>true</code> if enabled
145      */

146     boolean isEnabled(CmsObject cms);
147
148     /**
149      * Returns the visibility flag for a given cms context.<p>
150      *
151      * @param cms the cms context
152      *
153      * @return <code>true</code> if visible
154      */

155     boolean isVisible(CmsObject cms);
156
157     /**
158      * Main method that somehow setups the admin tool handler.<p>
159      *
160      * @param cms the admin context (at opencms-workplace (re-)initialization time)
161      * @param root the root context
162      * @param resourcePath the resource path of the file/folder to use as admin tool
163      *
164      * @return <code>false</code> if something goes wrong
165      */

166     boolean setup(CmsObject cms, CmsToolRootHandler root, String JavaDoc resourcePath);
167 }
Popular Tags