01: /*--------------------------------------------------------------------------*
02: | Copyright (C) 2006 Christopher Kohlhaas |
03: | |
04: | This program is free software; you can redistribute it and/or modify |
05: | it under the terms of the GNU General Public License as published by the |
06: | Free Software Foundation. A copy of the license has been included with |
07: | these distribution in the COPYING file, if not go to www.fsf.org |
08: | |
09: | As a special exception, you are granted the permissions to link this |
10: | program with every library, which license fulfills the Open Source |
11: | Definition as published by the Open Source Initiative (OSI). |
12: *--------------------------------------------------------------------------*/
13: package org.rapla.plugin.tableview;
14:
15: import org.apache.avalon.framework.configuration.Configuration;
16: import org.rapla.framework.Container;
17: import org.rapla.framework.PluginDescriptor;
18: import org.rapla.plugin.RaplaExtensionPoints;
19: import org.rapla.plugin.RaplaPluginMetaInfo;
20:
21: public class TableViewPlugin implements PluginDescriptor {
22: static boolean ENABLE_BY_DEFAULT = true;
23:
24: public String toString() {
25: return "Table View";
26: }
27:
28: public void provideServices(Container container,
29: Configuration config) {
30: if (!config.getAttributeAsBoolean("enabled", ENABLE_BY_DEFAULT))
31: return;
32:
33: container.addContainerProvidedComponent(
34: RaplaExtensionPoints.CALENDAR_VIEW_EXTENSION,
35: TableViewFactory.class.getName(),
36: TableViewFactory.TABLE_VIEW, null);
37: }
38:
39: public Object getPluginMetaInfos(String key) {
40: if (RaplaPluginMetaInfo.METAINFO_PLUGIN_ENABLED_BY_DEFAULT
41: .equals(key)) {
42: return new Boolean(ENABLE_BY_DEFAULT);
43: }
44: return null;
45: }
46:
47: }
|