001: /*
002: * File : $Source: /usr/local/cvs/opencms/src/org/opencms/module/A_CmsModuleAction.java,v $
003: * Date : $Date: 2008-02-27 12:05:44 $
004: * Version: $Revision: 1.15 $
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.module;
033:
034: import org.opencms.configuration.CmsConfigurationManager;
035: import org.opencms.db.CmsPublishList;
036: import org.opencms.file.CmsObject;
037: import org.opencms.main.CmsEvent;
038: import org.opencms.main.CmsLog;
039: import org.opencms.report.I_CmsReport;
040:
041: import org.apache.commons.logging.Log;
042:
043: /**
044: * Simple base implementation of the {@link I_CmsModuleAction} interface,
045: * extend this class for more sophisticated module action implementations.<p>
046: *
047: * @author Alexander Kandzior
048: *
049: * @version $Revision: 1.15 $
050: *
051: * @since 6.0.0
052: */
053: public abstract class A_CmsModuleAction implements I_CmsModuleAction {
054:
055: /** The log object for this class. */
056: private static final Log LOG = CmsLog
057: .getLog(A_CmsModuleAction.class);
058:
059: /**
060: * @see org.opencms.main.I_CmsEventListener#cmsEvent(org.opencms.main.CmsEvent)
061: */
062: public void cmsEvent(CmsEvent event) {
063:
064: if (LOG.isDebugEnabled()) {
065: LOG.debug(Messages.get().getBundle().key(
066: Messages.LOG_EVENT_CAUGHT_2,
067: this .getClass().getName(),
068: new Integer(event.getType())));
069: }
070: }
071:
072: /**
073: * @see org.opencms.module.I_CmsModuleAction#initialize(org.opencms.file.CmsObject, CmsConfigurationManager, CmsModule)
074: */
075: public void initialize(CmsObject adminCms,
076: CmsConfigurationManager configurationManager,
077: CmsModule module) {
078:
079: if (LOG.isDebugEnabled()) {
080: LOG.debug(Messages.get().getBundle().key(
081: Messages.LOG_MODULE_INITIALIZED_2,
082: module.getName(), this .getClass().getName()));
083: }
084: }
085:
086: /**
087: * @see org.opencms.module.I_CmsModuleAction#moduleUninstall(CmsModule)
088: */
089: public void moduleUninstall(CmsModule module) {
090:
091: if (LOG.isDebugEnabled()) {
092: LOG.debug(Messages.get().getBundle().key(
093: Messages.LOG_MODULE_UNINSTALLED_2,
094: module.getName(), this .getClass().getName()));
095: }
096: }
097:
098: /**
099: * @see org.opencms.module.I_CmsModuleAction#moduleUpdate(org.opencms.module.CmsModule)
100: */
101: public void moduleUpdate(CmsModule module) {
102:
103: if (LOG.isDebugEnabled()) {
104: LOG.debug(Messages.get().getBundle().key(
105: Messages.LOG_MODULE_UPDATED_2, module.getName(),
106: this .getClass().getName()));
107: }
108: }
109:
110: /**
111: * @see org.opencms.module.I_CmsModuleAction#publishProject(org.opencms.file.CmsObject, org.opencms.db.CmsPublishList, int, org.opencms.report.I_CmsReport)
112: */
113: public void publishProject(CmsObject cms,
114: CmsPublishList publishList, int publishTag,
115: I_CmsReport report) {
116:
117: if (LOG.isDebugEnabled()) {
118: LOG.debug(Messages.get().getBundle().key(
119: Messages.LOG_PUBLISH_PROJECT_1,
120: this .getClass().getName()));
121: }
122: }
123:
124: /**
125: * @see org.opencms.module.I_CmsModuleAction#shutDown(CmsModule)
126: */
127: public void shutDown(CmsModule module) {
128:
129: if (LOG.isDebugEnabled()) {
130: LOG.debug(Messages.get().getBundle().key(
131: Messages.LOG_MODULE_SHUTDOWN_2, module.getName(),
132: this.getClass().getName()));
133: }
134: }
135: }
|