001: /*
002: * File : $Source: /usr/local/cvs/opencms/src-modules/org/opencms/workplace/tools/content/check/A_CmsContentCheck.java,v $
003: * Date : $Date: 2008-02-27 12:05:41 $
004: * Version: $Revision: 1.6 $
005: *
006: * This library is part of OpenCms -
007: * the Open Source Content Management System
008: *
009: * Copyright (c) 2002 - 2008 Alkacon Software GmbH (http://www.alkacon.com)
010: *
011: * This library is free software; you can redistribute it and/or
012: * modify it under the terms of the GNU Lesser General Public
013: * License as published by the Free Software Foundation; either
014: * version 2.1 of the License, or (at your option) any later version.
015: *
016: * This library is distributed in the hope that it will be useful,
017: * but WITHOUT ANY WARRANTY; without even the implied warranty of
018: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
019: * Lesser General Public License for more details.
020: *
021: * For further information about Alkacon Software GmbH, please see the
022: * company website: http://www.alkacon.com
023: *
024: * For further information about OpenCms, please see the
025: * project website: http://www.opencms.org
026: *
027: * You should have received a copy of the GNU Lesser General Public
028: * License along with this library; if not, write to the Free Software
029: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
030: */
031:
032: package org.opencms.workplace.tools.content.check;
033:
034: import org.opencms.file.CmsObject;
035: import org.opencms.main.CmsException;
036: import org.opencms.workplace.CmsDialog;
037: import org.opencms.workplace.CmsWorkplace;
038: import org.opencms.workplace.tools.CmsToolManager;
039: import org.opencms.workplace.tools.CmsToolRootHandler;
040: import org.opencms.workplace.tools.I_CmsToolHandler;
041:
042: import java.util.HashMap;
043: import java.util.List;
044: import java.util.Map;
045:
046: /**
047: * Abstract class for a CmsContentCheck.<p>
048: *
049: * @author Michael Emmerich
050: *
051: * @version $Revision: 1.6 $
052: *
053: * @since 6.1.2
054: */
055: public abstract class A_CmsContentCheck implements I_CmsContentCheck,
056: I_CmsToolHandler {
057:
058: /** Closelink path. */
059: private static final String CLOSELINK = "/contenttools/checkconfig";
060:
061: /**
062: * @see org.opencms.workplace.tools.content.check.I_CmsContentCheck#executeContentCheck(org.opencms.file.CmsObject, org.opencms.workplace.tools.content.check.CmsContentCheckResource)
063: */
064: public abstract CmsContentCheckResource executeContentCheck(
065: CmsObject cms, CmsContentCheckResource testResource)
066: throws CmsException;
067:
068: /**
069: * @see org.opencms.workplace.tools.I_CmsToolHandler#getConfirmationMessage()
070: */
071: public String getConfirmationMessage() {
072:
073: return null;
074: }
075:
076: /**
077: * @see org.opencms.workplace.tools.content.check.I_CmsContentCheck#getDialogParameterName()
078: */
079: public abstract String getDialogParameterName();
080:
081: /**
082: * @see org.opencms.workplace.tools.I_CmsToolHandler#getDisabledHelpText()
083: */
084: public String getDisabledHelpText() {
085:
086: return null;
087: }
088:
089: /**
090: * @see org.opencms.workplace.tools.I_CmsToolHandler#getGroup()
091: */
092: public String getGroup() {
093:
094: return org.opencms.workplace.tools.content.Messages
095: .get()
096: .getBundle()
097: .key(
098: org.opencms.workplace.tools.content.Messages.GUI_CHECKCONTENT_CONFIGURATION_ADMIN_TOOL_NAME_0);
099: }
100:
101: /**
102: * @see org.opencms.workplace.tools.I_CmsToolHandler#getHelpText()
103: */
104: public abstract String getHelpText();
105:
106: /**
107: * @see org.opencms.workplace.tools.I_CmsToolHandler#getIconPath()
108: */
109: public abstract String getIconPath();
110:
111: /**
112: * @see org.opencms.workplace.tools.I_CmsToolHandler#getLink()
113: */
114:
115: public abstract String getLink();
116:
117: /**
118: * @see org.opencms.workplace.tools.content.check.I_CmsContentCheck#getMessageBundles()
119: */
120: public abstract List getMessageBundles();
121:
122: /**
123: * @see org.opencms.workplace.tools.I_CmsToolHandler#getName()
124: */
125: public abstract String getName();
126:
127: /**
128: * @see org.opencms.workplace.tools.I_CmsToolHandler#getParameters(org.opencms.workplace.CmsWorkplace)
129: */
130: public Map getParameters(CmsWorkplace wp) {
131:
132: Map parameters = new HashMap();
133: parameters.put(CmsDialog.PARAM_CLOSELINK, CmsToolManager
134: .linkForToolPath(wp.getJsp(), CLOSELINK));
135:
136: return parameters;
137: }
138:
139: /**
140: * @see org.opencms.workplace.tools.I_CmsToolHandler#getPath()
141: */
142: public abstract String getPath();
143:
144: /**
145: * @see org.opencms.workplace.tools.I_CmsToolHandler#getPosition()
146: */
147: public abstract float getPosition();
148:
149: /**
150: * @see org.opencms.workplace.tools.I_CmsToolHandler#getShortName()
151: */
152: public abstract String getShortName();
153:
154: /**
155: * @see org.opencms.workplace.tools.I_CmsToolHandler#getSmallIconPath()
156: */
157: public String getSmallIconPath() {
158:
159: return null;
160: }
161:
162: /**
163: * @see org.opencms.workplace.tools.content.check.I_CmsContentCheck#init(org.opencms.file.CmsObject)
164: */
165: public abstract void init(CmsObject cms) throws CmsException;
166:
167: /**
168: * @see org.opencms.workplace.tools.content.check.I_CmsContentCheck#isActive()
169: */
170: public abstract boolean isActive();
171:
172: /**
173: * @see org.opencms.workplace.tools.I_CmsToolHandler#isEnabled(org.opencms.file.CmsObject)
174: */
175: public boolean isEnabled(CmsObject cms) {
176:
177: return true;
178: }
179:
180: /**
181: * @see org.opencms.workplace.tools.I_CmsToolHandler#isEnabled(org.opencms.workplace.CmsWorkplace)
182: */
183: public boolean isEnabled(CmsWorkplace wp) {
184:
185: return true;
186: }
187:
188: /**
189: * @see org.opencms.workplace.tools.I_CmsToolHandler#isVisible(org.opencms.file.CmsObject)
190: */
191: public boolean isVisible(CmsObject cms) {
192:
193: return true;
194: }
195:
196: /**
197: * @see org.opencms.workplace.tools.I_CmsToolHandler#isVisible(org.opencms.workplace.CmsWorkplace)
198: */
199: public boolean isVisible(CmsWorkplace wp) {
200:
201: return true;
202: }
203:
204: /**
205: * @see org.opencms.workplace.tools.content.check.I_CmsContentCheck#setActive(boolean)
206: */
207: public abstract void setActive(boolean value);
208:
209: /**
210: * @see org.opencms.workplace.tools.I_CmsToolHandler#setup(org.opencms.file.CmsObject, org.opencms.workplace.tools.CmsToolRootHandler, java.lang.String)
211: */
212: public boolean setup(CmsObject cms, CmsToolRootHandler root,
213: String resourcePath) {
214:
215: return true;
216: }
217: }
|