001: /*
002: * File : $Source: /usr/local/cvs/opencms/src-modules/org/opencms/workplace/tools/content/check/I_CmsContentCheck.java,v $
003: * Date : $Date: 2008-02-27 12:05:42 $
004: * Version: $Revision: 1.5 $
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:
037: import java.util.List;
038:
039: /**
040: * This interface defines an OpenCms content check. A content check will
041: * test the content of the properties of all resources inside of OpenCms if they
042: * follow the rules which are defined inside the test implementing this interface.<p>
043: *
044: * @author Michael Emmerich
045: *
046: * @version $Revision: 1.5 $
047: *
048: * @since 6.1.2
049: */
050: public interface I_CmsContentCheck {
051:
052: /** Parameter name for widgets. */
053: String PARAMETER = "active";
054:
055: /**
056: * Main method of the content check. It holds the implementation of the content check.<p>
057: *
058: * @param cms the CmsObject
059: * @param testResource a CmsContentTestResource containing the results of previous tests
060: * @return the updated testResouce containing the results of the content check
061: * @throws CmsException if an error occurs
062: */
063: CmsContentCheckResource executeContentCheck(CmsObject cms,
064: CmsContentCheckResource testResource) throws CmsException;
065:
066: /**
067: * Defines the name of the parameter which is used by the CmsContentCheckDialog to enable
068: * or disable the content check.<p>
069: *
070: * @return the name of the dialog parameter.
071: */
072: String getDialogParameterName();
073:
074: /**
075: * Gets a list of all required message bundles by this content check.<p>
076: *
077: * @return list of message bundle names
078: */
079: List getMessageBundles();
080:
081: /**
082: * Gets the name of this content check.<p>
083: *
084: * @return name of the content check
085: */
086: String getName();
087:
088: /**
089: * Initializer for the content check.<p>
090: *
091: * @param cms the current CmsObject
092: * @throws CmsException if an error occurs
093: */
094: void init(CmsObject cms) throws CmsException;
095:
096: /**
097: * Signals if this content check is active or not.<p>
098: *
099: *
100: * @return true if this content check is active, false otherwise.
101: */
102: boolean isActive();
103:
104: /**
105: * Sets the active flag for the content check.<p>
106: *
107: * @param value the value for the active flag
108: */
109: void setActive(boolean value);
110:
111: }
|