Java tutorial
// The contents of this file are subject to the Mozilla Public License Version // 1.1 //(the "License"); you may not use this file except in compliance with the //License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ // //Software distributed under the License is distributed on an "AS IS" basis, //WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License //for the specific language governing rights and //limitations under the License. // //The Original Code is "The Columba Project" // //The Initial Developers of the Original Code are Frederik Dietz and Timo // Stich. //Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003. // //All Rights Reserved. package org.columba.calendar; import java.util.Iterator; import org.apache.commons.cli.CommandLine; import org.columba.calendar.config.CalendarList; import org.columba.calendar.store.api.ICalendarStore; import org.columba.core.component.api.IComponentPlugin; /** * @author fdietz * */ public class CalendarComponent implements IComponentPlugin { public final static String PLUGIN_ID = "org.columba.calendar.frenchvanilla"; /** * */ public CalendarComponent() throws Exception { super(); try { // com.miginfocom.util.LicenseValidator.setLicenseKey("Cu=Frederik_Dietz\nCo=OpenSource\nDm=false\nEx=0\nSignature=302C021408B54A0B041E79362B1951E9FDB9AFEAD0EBFBDD021409F4830B4AD832766388107CB1D38126A9473C0C"); com.miginfocom.util.LicenseValidator.setLicenseKey(getClass().getResourceAsStream("/license.lic")); } catch (IllegalAccessError e) { System.out.println("License Code Invalid"); e.printStackTrace(); } } /** * @see org.columba.core.main.IComponentPlugin#init() */ public void init() { // try { // PluginMetadata metadata = PluginManager.getInstance().getPluginMetadata(PLUGIN_ID); // // InputStream is = this.getClass().getResourceAsStream( // "/org/columba/calendar/action/action.xml"); // // PluginManager.getInstance().getExtensionHandler( // IExtensionHandlerKeys.ORG_COLUMBA_CORE_ACTION).loadExternalExtensionsFromStream(metadata, is); // // } catch (PluginHandlerNotFoundException ex) { // } } /** * @see org.columba.core.main.IComponentPlugin#postStartup() */ public void postStartup() { Iterator<ICalendarStore> it = CalendarList.getInstance().getStores(); while (it.hasNext()) { ICalendarStore store = it.next(); store.initActivities(); } } /** * @see org.columba.core.main.IComponentPlugin#registerCommandLineArguments() */ public void registerCommandLineArguments() { // TODO Auto-generated method stub } /** * @see org.columba.core.main.IComponentPlugin#handleCommandLineParameters(org.apache.commons.cli.CommandLine) */ public void handleCommandLineParameters(CommandLine commandLine) { // TODO Auto-generated method stub } }