From c33f850d6d0538758a25bfea15fd91dab15945af Mon Sep 17 00:00:00 2001 From: joergviola Date: Fri, 12 Mar 2010 18:48:33 +0000 Subject: [PATCH] Pipo Dictionary Service implementation (2pack) https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- base/plugin.xml | 1 + ...org.adempiere.base.IDictionaryService.exsd | 102 ++++++++++++++++++ .../adempiere/base/IDictionaryService.java | 29 +++++ plugins/TestPlugin/META-INF/MANIFEST.MF | 3 +- .../org/adempiere/testplugin/Activator.java | 23 ++-- 5 files changed, 144 insertions(+), 14 deletions(-) create mode 100644 base/schema/org.adempiere.base.IDictionaryService.exsd create mode 100644 base/src/org/adempiere/base/IDictionaryService.java diff --git a/base/plugin.xml b/base/plugin.xml index f751974f4f..d960b2b036 100644 --- a/base/plugin.xml +++ b/base/plugin.xml @@ -3,5 +3,6 @@ + diff --git a/base/schema/org.adempiere.base.IDictionaryService.exsd b/base/schema/org.adempiere.base.IDictionaryService.exsd new file mode 100644 index 0000000000..a5da49f38e --- /dev/null +++ b/base/schema/org.adempiere.base.IDictionaryService.exsd @@ -0,0 +1,102 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/base/src/org/adempiere/base/IDictionaryService.java b/base/src/org/adempiere/base/IDictionaryService.java new file mode 100644 index 0000000000..00b894c91a --- /dev/null +++ b/base/src/org/adempiere/base/IDictionaryService.java @@ -0,0 +1,29 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * Copyright (C) 2009 ObjectCode GmbH * + * Contributor(s): Joerg Viola www.objectcode.de * + *****************************************************************************/ +package org.adempiere.base; + +import java.io.InputStream; + +/** + * A dictionary service provides for easy handling of dynamic Adempiere + * dictionary. + * + * @author Joerg Viola + * + */ +public interface IDictionaryService extends IService { + void merge(InputStream model) throws Exception; +} diff --git a/plugins/TestPlugin/META-INF/MANIFEST.MF b/plugins/TestPlugin/META-INF/MANIFEST.MF index 9434561756..36a9037756 100644 --- a/plugins/TestPlugin/META-INF/MANIFEST.MF +++ b/plugins/TestPlugin/META-INF/MANIFEST.MF @@ -6,5 +6,6 @@ Bundle-Version: 0.0.0.1 Bundle-Activator: org.adempiere.testplugin.Activator Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Import-Package: org.osgi.framework;version="1.3.0" +Import-Package: org.adempiere.plugin.utils, + org.osgi.framework;version="1.3.0" Require-Bundle: org.adempiere.base;bundle-version="0.0.0" diff --git a/plugins/TestPlugin/src/org/adempiere/testplugin/Activator.java b/plugins/TestPlugin/src/org/adempiere/testplugin/Activator.java index 5df28ad1b2..17824addd1 100644 --- a/plugins/TestPlugin/src/org/adempiere/testplugin/Activator.java +++ b/plugins/TestPlugin/src/org/adempiere/testplugin/Activator.java @@ -1,22 +1,19 @@ package org.adempiere.testplugin; +import org.adempiere.base.Service; +import org.adempiere.plugin.utils.AdempiereActivator; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; -public class Activator implements BundleActivator { +public class Activator extends AdempiereActivator { - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { + @Override + protected void start() { + System.out.println("Testplugin starting..."); } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { + + @Override + protected void stop() { + System.out.println("Testplugin stopping..."); } - }