1 // The contents of this file are subject to the Mozilla Public License Version2 // 1.13 //(the "License"); you may not use this file except in compliance with the4 //License. You may obtain a copy of the License at http://www.mozilla.org/MPL/5 //6 //Software distributed under the License is distributed on an "AS IS" basis,7 //WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License8 //for the specific language governing rights and9 //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 Timo14 // 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 fdietz32 * 33 */34 public class CalendarComponent implements IComponentPlugin {35 36 public final static String PLUGIN_ID = "org.columba.calendar.frenchvanilla";37 /**38 * 39 */40 public CalendarComponent() throws Exception {41 super();42 43 try {44 // com.miginfocom.util.LicenseValidator.setLicenseKey("Cu=Frederik_Dietz\nCo=OpenSource\nDm=false\nEx=0\nSignature=302C021408B54A0B041E79362B1951E9FDB9AFEAD0EBFBDD021409F4830B4AD832766388107CB1D38126A9473C0C");45 com.miginfocom.util.LicenseValidator.setLicenseKey(getClass()46 .getResourceAsStream("/license.lic"));47 48 } catch (IllegalAccessError e) {49 System.out.println("License Code Invalid");50 51 e.printStackTrace();52 }53 }54 55 /**56 * @see org.columba.core.main.IComponentPlugin#init()57 */58 public void init() {59 60 // try {61 // PluginMetadata metadata = PluginManager.getInstance().getPluginMetadata(PLUGIN_ID);62 // 63 // InputStream is = this.getClass().getResourceAsStream(64 // "/org/columba/calendar/action/action.xml");65 //66 // PluginManager.getInstance().getExtensionHandler(67 // IExtensionHandlerKeys.ORG_COLUMBA_CORE_ACTION).loadExternalExtensionsFromStream(metadata, is);68 //69 // } catch (PluginHandlerNotFoundException ex) {70 // }71 72 }73 74 /**75 * @see org.columba.core.main.IComponentPlugin#postStartup()76 */77 public void postStartup() {78 CalendarStoreFactory.getInstance().getLocaleStore();79 }80 81 /**82 * @see org.columba.core.main.IComponentPlugin#registerCommandLineArguments()83 */84 public void registerCommandLineArguments() {85 // TODO Auto-generated method stub86 87 }88 89 /**90 * @see org.columba.core.main.IComponentPlugin#handleCommandLineParameters(org.apache.commons.cli.CommandLine)91 */92 public void handleCommandLineParameters(CommandLine commandLine) {93 // TODO Auto-generated method stub94 95 }96 97 }