01: // The contents of this file are subject to the Mozilla Public License Version
02: // 1.1
03: //(the "License"); you may not use this file except in compliance with the
04: //License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
05: //
06: //Software distributed under the License is distributed on an "AS IS" basis,
07: //WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
08: //for the specific language governing rights and
09: //limitations under the License.
10: //
11: //The Original Code is "The Columba Project"
12: //
13: //The Initial Developers of the Original Code are Frederik Dietz and Timo
14: // Stich.
15: //Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
16: //
17: //All Rights Reserved.
18: package org.columba.calendar;
19:
20: import java.io.InputStream;
21:
22: import org.apache.commons.cli.CommandLine;
23: import org.columba.api.plugin.IExtensionHandlerKeys;
24: import org.columba.api.plugin.PluginHandlerNotFoundException;
25: import org.columba.api.plugin.PluginMetadata;
26: import org.columba.calendar.store.CalendarStoreFactory;
27: import org.columba.core.component.api.IComponentPlugin;
28: import org.columba.core.plugin.PluginManager;
29:
30: /**
31: * @author fdietz
32: *
33: */
34: public class CalendarComponent implements IComponentPlugin {
35:
36: public final static String PLUGIN_ID = "org.columba.calendar.frenchvanilla";
37:
38: /**
39: *
40: */
41: public CalendarComponent() throws Exception {
42: super ();
43:
44: try {
45: // com.miginfocom.util.LicenseValidator.setLicenseKey("Cu=Frederik_Dietz\nCo=OpenSource\nDm=false\nEx=0\nSignature=302C021408B54A0B041E79362B1951E9FDB9AFEAD0EBFBDD021409F4830B4AD832766388107CB1D38126A9473C0C");
46: com.miginfocom.util.LicenseValidator
47: .setLicenseKey(getClass().getResourceAsStream(
48: "/license.lic"));
49:
50: } catch (IllegalAccessError e) {
51: System.out.println("License Code Invalid");
52:
53: e.printStackTrace();
54: }
55: }
56:
57: /**
58: * @see org.columba.core.main.IComponentPlugin#init()
59: */
60: public void init() {
61:
62: // try {
63: // PluginMetadata metadata = PluginManager.getInstance().getPluginMetadata(PLUGIN_ID);
64: //
65: // InputStream is = this.getClass().getResourceAsStream(
66: // "/org/columba/calendar/action/action.xml");
67: //
68: // PluginManager.getInstance().getExtensionHandler(
69: // IExtensionHandlerKeys.ORG_COLUMBA_CORE_ACTION).loadExternalExtensionsFromStream(metadata, is);
70: //
71: // } catch (PluginHandlerNotFoundException ex) {
72: // }
73:
74: }
75:
76: /**
77: * @see org.columba.core.main.IComponentPlugin#postStartup()
78: */
79: public void postStartup() {
80: CalendarStoreFactory.getInstance().getLocaleStore();
81: }
82:
83: /**
84: * @see org.columba.core.main.IComponentPlugin#registerCommandLineArguments()
85: */
86: public void registerCommandLineArguments() {
87: // TODO Auto-generated method stub
88:
89: }
90:
91: /**
92: * @see org.columba.core.main.IComponentPlugin#handleCommandLineParameters(org.apache.commons.cli.CommandLine)
93: */
94: public void handleCommandLineParameters(CommandLine commandLine) {
95: // TODO Auto-generated method stub
96:
97: }
98:
99: }
|