KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > module > A_CmsModuleAction


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/module/A_CmsModuleAction.java,v $
3  * Date : $Date: 2006/03/27 14:53:03 $
4  * Version: $Revision: 1.12 $
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.module;
33
34 import org.opencms.configuration.CmsConfigurationManager;
35 import org.opencms.db.CmsPublishList;
36 import org.opencms.file.CmsObject;
37 import org.opencms.main.CmsEvent;
38 import org.opencms.main.CmsLog;
39 import org.opencms.report.I_CmsReport;
40
41 import org.apache.commons.logging.Log;
42
43 /**
44  * Simple base implementation of the {@link I_CmsModuleAction} interface,
45  * extend this class for more sophisticated module action implementations.<p>
46  *
47  * @author Alexander Kandzior
48  *
49  * @version $Revision: 1.12 $
50  *
51  * @since 6.0.0
52  */

53 public abstract class A_CmsModuleAction implements I_CmsModuleAction {
54
55     /** The log object for this class. */
56     private static final Log LOG = CmsLog.getLog(A_CmsModuleAction.class);
57
58     /**
59      * @see org.opencms.main.I_CmsEventListener#cmsEvent(org.opencms.main.CmsEvent)
60      */

61     public void cmsEvent(CmsEvent event) {
62
63         if (LOG.isDebugEnabled()) {
64             LOG.debug(Messages.get().getBundle().key(
65                 Messages.LOG_EVENT_CAUGHT_2,
66                 this.getClass().getName(),
67                 new Integer JavaDoc(event.getType())));
68         }
69     }
70
71     /**
72      * @see org.opencms.module.I_CmsModuleAction#initialize(org.opencms.file.CmsObject, CmsConfigurationManager, CmsModule)
73      */

74     public void initialize(CmsObject adminCms, CmsConfigurationManager configurationManager, CmsModule module) {
75
76         if (LOG.isDebugEnabled()) {
77             LOG.debug(Messages.get().getBundle().key(
78                 Messages.LOG_MODULE_INITIALIZED_2,
79                 module.getName(),
80                 this.getClass().getName()));
81         }
82     }
83
84     /**
85      * @see org.opencms.module.I_CmsModuleAction#moduleUninstall(CmsModule)
86      */

87     public void moduleUninstall(CmsModule module) {
88
89         if (LOG.isDebugEnabled()) {
90             LOG.debug(Messages.get().getBundle().key(
91                 Messages.LOG_MODULE_UNINSTALLED_2,
92                 module.getName(),
93                 this.getClass().getName()));
94         }
95     }
96
97     /**
98      * @see org.opencms.module.I_CmsModuleAction#moduleUpdate(org.opencms.module.CmsModule)
99      */

100     public void moduleUpdate(CmsModule module) {
101
102         if (LOG.isDebugEnabled()) {
103             LOG.debug(Messages.get().getBundle().key(
104                 Messages.LOG_MODULE_UPDATED_2,
105                 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, CmsPublishList publishList, int backupTagId, I_CmsReport report) {
114
115         if (LOG.isDebugEnabled()) {
116             LOG.debug(Messages.get().getBundle().key(Messages.LOG_PUBLISH_PROJECT_1, this.getClass().getName()));
117         }
118     }
119
120     /**
121      * @see org.opencms.module.I_CmsModuleAction#shutDown(CmsModule)
122      */

123     public void shutDown(CmsModule module) {
124
125         if (LOG.isDebugEnabled()) {
126             LOG.debug(Messages.get().getBundle().key(
127                 Messages.LOG_MODULE_SHUTDOWN_2,
128                 module.getName(),
129                 this.getClass().getName()));
130         }
131     }
132 }
133
Popular Tags