001/* 002 * This library is part of OpenCms - 003 * the Open Source Content Management System 004 * 005 * Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com) 006 * 007 * This library is free software; you can redistribute it and/or 008 * modify it under the terms of the GNU Lesser General Public 009 * License as published by the Free Software Foundation; either 010 * version 2.1 of the License, or (at your option) any later version. 011 * 012 * This library is distributed in the hope that it will be useful, 013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 015 * Lesser General Public License for more details. 016 * 017 * For further information about Alkacon Software GmbH & Co. KG, please see the 018 * company website: http://www.alkacon.com 019 * 020 * For further information about OpenCms, please see the 021 * project website: http://www.opencms.org 022 * 023 * You should have received a copy of the GNU Lesser General Public 024 * License along with this library; if not, write to the Free Software 025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 026 */ 027 028package org.opencms.module; 029 030import org.opencms.configuration.CmsConfigurationManager; 031import org.opencms.db.CmsPublishList; 032import org.opencms.file.CmsObject; 033import org.opencms.main.CmsEvent; 034import org.opencms.main.CmsLog; 035import org.opencms.report.I_CmsReport; 036 037import org.apache.commons.logging.Log; 038 039/** 040 * Simple base implementation of the {@link I_CmsModuleAction} interface, 041 * extend this class for more sophisticated module action implementations.<p> 042 * 043 * @since 6.0.0 044 */ 045public abstract class A_CmsModuleAction implements I_CmsModuleAction { 046 047 /** The log object for this class. */ 048 private static final Log LOG = CmsLog.getLog(A_CmsModuleAction.class); 049 050 /** 051 * @see org.opencms.main.I_CmsEventListener#cmsEvent(org.opencms.main.CmsEvent) 052 */ 053 public void cmsEvent(CmsEvent event) { 054 055 if (LOG.isDebugEnabled()) { 056 LOG.debug( 057 Messages.get().getBundle().key( 058 Messages.LOG_EVENT_CAUGHT_2, 059 this.getClass().getName(), 060 Integer.valueOf(event.getType()))); 061 } 062 } 063 064 /** 065 * @see org.opencms.module.I_CmsModuleAction#initialize(org.opencms.file.CmsObject, CmsConfigurationManager, CmsModule) 066 */ 067 public void initialize(CmsObject adminCms, CmsConfigurationManager configurationManager, CmsModule module) { 068 069 if (LOG.isDebugEnabled()) { 070 LOG.debug( 071 Messages.get().getBundle().key( 072 Messages.LOG_MODULE_INITIALIZED_2, 073 module.getName(), 074 this.getClass().getName())); 075 } 076 } 077 078 /** 079 * @see org.opencms.module.I_CmsModuleAction#moduleUninstall(CmsModule) 080 */ 081 public void moduleUninstall(CmsModule module) { 082 083 if (LOG.isDebugEnabled()) { 084 LOG.debug( 085 Messages.get().getBundle().key( 086 Messages.LOG_MODULE_UNINSTALLED_2, 087 module.getName(), 088 this.getClass().getName())); 089 } 090 } 091 092 /** 093 * @see org.opencms.module.I_CmsModuleAction#moduleUpdate(org.opencms.module.CmsModule) 094 */ 095 public void moduleUpdate(CmsModule module) { 096 097 if (LOG.isDebugEnabled()) { 098 LOG.debug( 099 Messages.get().getBundle().key( 100 Messages.LOG_MODULE_UPDATED_2, 101 module.getName(), 102 this.getClass().getName())); 103 } 104 } 105 106 /** 107 * @see org.opencms.module.I_CmsModuleAction#publishProject(org.opencms.file.CmsObject, org.opencms.db.CmsPublishList, int, org.opencms.report.I_CmsReport) 108 */ 109 public void publishProject(CmsObject cms, CmsPublishList publishList, int publishTag, I_CmsReport report) { 110 111 if (LOG.isDebugEnabled()) { 112 LOG.debug(Messages.get().getBundle().key(Messages.LOG_PUBLISH_PROJECT_1, this.getClass().getName())); 113 } 114 } 115 116 /** 117 * @see org.opencms.module.I_CmsModuleAction#shutDown(CmsModule) 118 */ 119 public void shutDown(CmsModule module) { 120 121 if (LOG.isDebugEnabled()) { 122 LOG.debug( 123 Messages.get().getBundle().key( 124 Messages.LOG_MODULE_SHUTDOWN_2, 125 module.getName(), 126 this.getClass().getName())); 127 } 128 } 129}