From 8d1ab1833c674be79e9f933f3c8fcde1212f8f3c Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Mon, 20 Dec 2010 10:46:25 +0800 Subject: [PATCH] Updated extension point documentation formatting. Remove the use of osgi: prefix for form, modelvalidator and process to ease migration, the framework will now always check whether an implementation exists in the extension registry before checking the java classpath. Rename org.adempiere.osgi in swing to org.adempiere.ui.swing.factory and drop the incomplete IMenuAction extension in swing ( will come back to this later ). --- .../schema/org.adempiere.base.Callout.exsd | 44 ++++---- ...org.adempiere.base.IDictionaryService.exsd | 38 ++++--- .../org.adempiere.base.IDocFactory.exsd | 38 ++++--- .../org.adempiere.base.IGridTabExporter.exsd | 40 ++++--- .../org.adempiere.base.IModelFactory.exsd | 40 ++++--- .../org.adempiere.base.IResourceFinder.exsd | 39 ++++--- .../org.adempiere.base.ModelValidator.exsd | 41 ++++--- .../schema/org.adempiere.base.Process.exsd | 49 ++++----- .../org.compiere.db.AdempiereDatabase.exsd | 38 ++++--- .../org.compiere.interfaces.Server.exsd | 37 +++---- .../org.compiere.interfaces.Status.exsd | 37 +++---- .../src/org/adempiere/base/Core.java | 40 ++++--- .../src/org/adempiere/util/ProcessUtil.java | 5 +- .../compiere/model/ModelValidationEngine.java | 7 +- ...org.adempiere.install.IDatabaseConfig.exsd | 38 ++++--- .../schema/org.adempiere.pipo.Handlers.exsd | 55 ++++------ .../org.compiere.report.JRViewerProvider.exsd | 38 ++++--- .../org.adempiere.server.IServerFactory.exsd | 38 ++++--- org.adempiere.ui.swing/META-INF/MANIFEST.MF | 1 - org.adempiere.ui.swing/plugin.xml | 17 ++- .../schema/org.adempiere.apps.Form.exsd | 52 ++++----- .../org.adempiere.osgi.IMenuAction.exsd | 101 ------------------ ...iere.ui.swing.factory.IEditorFactory.exsd} | 45 ++++---- ...mpiere.ui.swing.factory.IInfoFactory.exsd} | 47 ++++---- .../src/org/adempiere/client/Client.java | 37 ++++++- .../{osgi => client}/InfoManager.java | 3 +- .../adempiere/osgi/AbstractMenuAction.java | 35 ------ .../src/org/adempiere/osgi/IMenuAction.java | 9 -- .../swing/factory}/DefaultEditorFactory.java | 2 +- .../swing/factory}/DefaultInfoFactory.java | 2 +- .../swing/factory}/IEditorFactory.java | 2 +- .../swing/factory}/IInfoFactory.java | 2 +- .../src/org/compiere/apps/APanel.java | 9 -- .../src/org/compiere/apps/form/FormFrame.java | 71 ++++++------ .../src/org/compiere/apps/search/Info.java | 2 +- .../org/compiere/grid/ed/VEditorFactory.java | 2 +- .../src/org/compiere/grid/ed/VLookup.java | 2 +- .../src/org/adempiere/webui/Extensions.java | 43 ++++++-- .../src/org/adempiere/webui/panel/ADForm.java | 55 ++++------ .../schema/org.adempiere.webui.Form.exsd | 54 ++++------ ...dempiere.webui.factory.IEditorFactory.exsd | 38 ++++--- ....adempiere.webui.factory.IInfoFactory.exsd | 38 ++++--- ...g.compiere.print.ReportViewerProvider.exsd | 40 ++++--- 43 files changed, 592 insertions(+), 779 deletions(-) delete mode 100644 org.adempiere.ui.swing/schema/org.adempiere.osgi.IMenuAction.exsd rename org.adempiere.ui.swing/schema/{org.adempiere.osgi.IEditorFactory.exsd => org.adempiere.ui.swing.factory.IEditorFactory.exsd} (66%) rename org.adempiere.ui.swing/schema/{org.adempiere.osgi.IInfoFactory.exsd => org.adempiere.ui.swing.factory.IInfoFactory.exsd} (65%) rename org.adempiere.ui.swing/src/org/adempiere/{osgi => client}/InfoManager.java (97%) delete mode 100644 org.adempiere.ui.swing/src/org/adempiere/osgi/AbstractMenuAction.java delete mode 100644 org.adempiere.ui.swing/src/org/adempiere/osgi/IMenuAction.java rename org.adempiere.ui.swing/src/org/adempiere/{osgi => ui/swing/factory}/DefaultEditorFactory.java (99%) rename org.adempiere.ui.swing/src/org/adempiere/{osgi => ui/swing/factory}/DefaultInfoFactory.java (99%) rename org.adempiere.ui.swing/src/org/adempiere/{osgi => ui/swing/factory}/IEditorFactory.java (97%) rename org.adempiere.ui.swing/src/org/adempiere/{osgi => ui/swing/factory}/IInfoFactory.java (98%) diff --git a/org.adempiere.base/schema/org.adempiere.base.Callout.exsd b/org.adempiere.base/schema/org.adempiere.base.Callout.exsd index 69c2fe563c..77297f6ba2 100644 --- a/org.adempiere.base/schema/org.adempiere.base.Callout.exsd +++ b/org.adempiere.base/schema/org.adempiere.base.Callout.exsd @@ -93,10 +93,12 @@ Instead, you specify Table and Column in the extension declaration. - <extension id="org.adempiere.extend.myCallout point="org.adempiere.base.Callout> - <callout class="org.adempiere.extend.MyCallout tableName="C_Order" columnName="C_BPartner_ID"> + <pre> +<extension id="org.adempiere.extend.myCallout" point="org.adempiere.base.Callout"> + <callout class="org.adempiere.extend.MyCallout" tableName="C_Order" columnName="C_BPartner_ID"> </callout> </extension> +</pre> @@ -115,26 +117,24 @@ Instead, you specify Table and Column in the extension declaration. - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Jorg Viola * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - * - Heng Sin Low * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Jorg Viola. + Copyright (C) Contributors. + + 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. + + Contributors: + Heng Sin Low + diff --git a/org.adempiere.base/schema/org.adempiere.base.IDictionaryService.exsd b/org.adempiere.base/schema/org.adempiere.base.IDictionaryService.exsd index 66bfe56b4e..ab7e92c496 100644 --- a/org.adempiere.base/schema/org.adempiere.base.IDictionaryService.exsd +++ b/org.adempiere.base/schema/org.adempiere.base.IDictionaryService.exsd @@ -76,12 +76,14 @@ - <extension + <pre> +<extension point="org.adempiere.base.IDictionaryService"> <client class="org.adempiere.pipo.srv.PipoDictionaryService"> </client> </extension> +</pre> @@ -108,25 +110,21 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Jorg Viola * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Jorg Viola. + Copyright (C) Contributors. + + 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. + diff --git a/org.adempiere.base/schema/org.adempiere.base.IDocFactory.exsd b/org.adempiere.base/schema/org.adempiere.base.IDocFactory.exsd index f584897a8e..383f81f3a4 100644 --- a/org.adempiere.base/schema/org.adempiere.base.IDocFactory.exsd +++ b/org.adempiere.base/schema/org.adempiere.base.IDocFactory.exsd @@ -90,7 +90,8 @@ - <extension + <pre> +<extension id="org.adempiere.base.DefaultDocFactory" name="Default Document Factory" point="org.adempiere.base.IDocFactory"> @@ -100,6 +101,7 @@ priority="0"> </factory> </extension> +</pre> @@ -126,25 +128,21 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Heng Sin Low. + Copyright (C) Contributors. + + 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. + diff --git a/org.adempiere.base/schema/org.adempiere.base.IGridTabExporter.exsd b/org.adempiere.base/schema/org.adempiere.base.IGridTabExporter.exsd index 6cf34a922c..ef86a97175 100644 --- a/org.adempiere.base/schema/org.adempiere.base.IGridTabExporter.exsd +++ b/org.adempiere.base/schema/org.adempiere.base.IGridTabExporter.exsd @@ -83,7 +83,8 @@ - <extension + <pre> +<extension id="org.adempiere.impexp.GridTabXlsExporter" name="Grid data excel exporter" point="org.adempiere.base.IGridTabExporter"> @@ -92,6 +93,7 @@ priority="0"> </exporter> </extension> +</pre> @@ -109,7 +111,7 @@ - excel export in org.adempiere.base and 2pack archive export in org.adempiere.pipo[Enter information about supplied implementation of this extension point.] + excel export in org.adempiere.base and 2pack archive export in org.adempiere.pipo @@ -118,25 +120,21 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Heng Sin Low. + Copyright (C) Contributors. + + 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. + diff --git a/org.adempiere.base/schema/org.adempiere.base.IModelFactory.exsd b/org.adempiere.base/schema/org.adempiere.base.IModelFactory.exsd index 04d76cca8b..01f9f63760 100644 --- a/org.adempiere.base/schema/org.adempiere.base.IModelFactory.exsd +++ b/org.adempiere.base/schema/org.adempiere.base.IModelFactory.exsd @@ -59,7 +59,7 @@ - + Implementation class name for the org.adempiere.base.IModelFactory interface @@ -83,7 +83,8 @@ - <extension + <pre> +<extension id="org.adempiere.base.DefaultModelFactory" name="Default model factory" point="org.adempiere.base.IModelFactory"> @@ -92,6 +93,7 @@ priority="0"> </factory> </extension> +</pre> @@ -118,25 +120,21 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Heng Sin Low. + Copyright (C) Contributors. + + 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. + diff --git a/org.adempiere.base/schema/org.adempiere.base.IResourceFinder.exsd b/org.adempiere.base/schema/org.adempiere.base.IResourceFinder.exsd index 8dfb2f5c51..0626aaa694 100644 --- a/org.adempiere.base/schema/org.adempiere.base.IResourceFinder.exsd +++ b/org.adempiere.base/schema/org.adempiere.base.IResourceFinder.exsd @@ -52,7 +52,7 @@ - Implementation class for the org.compiere.util.IResourceFinder interface + Implementation class name for the org.compiere.util.IResourceFinder interface @@ -76,7 +76,8 @@ - <extension + <pre> +<extension id="RF" name="RF" point="org.adempiere.base.IResourceFinder"> @@ -84,6 +85,7 @@ class="org.compiere.util.ResourceFinder"> </finder> </extension> +</pre> @@ -110,25 +112,20 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Jorg Viola * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Jorg Viola. + Copyright (C) Contributors. + + 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. diff --git a/org.adempiere.base/schema/org.adempiere.base.ModelValidator.exsd b/org.adempiere.base/schema/org.adempiere.base.ModelValidator.exsd index 4068cfc026..493d7183b9 100644 --- a/org.adempiere.base/schema/org.adempiere.base.ModelValidator.exsd +++ b/org.adempiere.base/schema/org.adempiere.base.ModelValidator.exsd @@ -6,7 +6,7 @@ - Extension point to provide model validator instance. Use the osgi:{extension id} syntax in AD_ModelValidator.ModelValidationClass to reference the extension that will provide the concrete ModelValidator instance ( replace {extension id} with your actual extension id ). Alternatively, you can use the EventManager service to listen to model and document event which doesn't need any AD table entry ( see event.test project for example ). + Extension point to provide model validator instance. Use the {extension id} syntax in AD_ModelValidator.ModelValidationClass to reference the extension that will provide the concrete ModelValidator instance ( replace {extension id} with your actual extension id ). Alternatively, you can use the EventManager service to listen to model and document event which doesn't need any AD table entry ( see event.test project for example ). @@ -76,7 +76,8 @@ - <extension + <pre> +<extension id="org.adempiere.extend.myModelValidator" name="My Model Validator" point="org.adempiere.base.ModelValidator"> @@ -85,6 +86,9 @@ priority="0"> </listener> </extension> + +AD_ModelValidator.ModelValidationClass="org.adempiere.extend.myModelValidator" +</pre> @@ -103,25 +107,20 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Jorg Viola * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Jorg Viola. + Copyright (C) Contributors. + + 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. diff --git a/org.adempiere.base/schema/org.adempiere.base.Process.exsd b/org.adempiere.base/schema/org.adempiere.base.Process.exsd index 43a12d7a91..b817f05353 100644 --- a/org.adempiere.base/schema/org.adempiere.base.Process.exsd +++ b/org.adempiere.base/schema/org.adempiere.base.Process.exsd @@ -6,7 +6,7 @@ - Extension to provide process implementation. Use the osgi:{extension id} syntax in AD_Process.ClassName to reference the extension that will provide the ProcessCall/SvrProcess instance (replace {extension id} with your actual extension id ) + Extension to provide process implementation. Use the {extension id} syntax in AD_Process.ClassName to reference the extension that will provide the ProcessCall/SvrProcess instance (replace {extension id} with your actual extension id ) @@ -76,7 +76,8 @@ - <extension + <pre> +<extension id="org.adempiere.extend.myProcess" name="My Process" point="org.adempiere.base.Process"> @@ -84,6 +85,9 @@ class="org.adempiere.extend.MyProcess"> </process> </extension> + +AD_Process.ClassName="org.adempiere.extend.myProcess" +</pre> @@ -96,39 +100,26 @@ - - - - - - [Enter information about supplied implementation of this extension point.] - - - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Jorg Viola * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Jorg Viola. + Copyright (C) Contributors. + + 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. diff --git a/org.adempiere.base/schema/org.compiere.db.AdempiereDatabase.exsd b/org.adempiere.base/schema/org.compiere.db.AdempiereDatabase.exsd index 6320991fcc..980fc4eece 100644 --- a/org.adempiere.base/schema/org.compiere.db.AdempiereDatabase.exsd +++ b/org.adempiere.base/schema/org.compiere.db.AdempiereDatabase.exsd @@ -85,13 +85,15 @@ To support a database in adempiere, you need to extend this extension point and - <extension + <pre> +<extension point="org.compiere.db.AdempiereDatabase"> <database class="org.compiere.db.DB_PostgreSQL" id="PostgreSQL"> </database> </extension> +</pre> @@ -118,25 +120,21 @@ To support a database in adempiere, you need to extend this extension point and - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Heng Sin Low. + Copyright (C) Contributors. + + 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. + diff --git a/org.adempiere.base/schema/org.compiere.interfaces.Server.exsd b/org.adempiere.base/schema/org.compiere.interfaces.Server.exsd index 58db0b011c..3024d691b4 100644 --- a/org.adempiere.base/schema/org.compiere.interfaces.Server.exsd +++ b/org.adempiere.base/schema/org.compiere.interfaces.Server.exsd @@ -76,12 +76,14 @@ - <extension + <pre> +<extension point="org.compiere.interfaces.Server"> <interface class="org.adempiere.client.ServerInterface"> </interface> </extension> +</Pre> @@ -108,25 +110,20 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Jorg Viola. + Copyright (C) Contributors. + + 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. diff --git a/org.adempiere.base/schema/org.compiere.interfaces.Status.exsd b/org.adempiere.base/schema/org.compiere.interfaces.Status.exsd index 0f596707d9..01c1737403 100644 --- a/org.adempiere.base/schema/org.compiere.interfaces.Status.exsd +++ b/org.adempiere.base/schema/org.compiere.interfaces.Status.exsd @@ -76,12 +76,14 @@ - <extension + <pre> +<extension point="org.compiere.interfaces.Status"> <interface class="org.adempiere.client.StatusInterface"> </interface> </extension> +</pre> @@ -108,25 +110,20 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Jorg Viola. + Copyright (C) Contributors. + + 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. diff --git a/org.adempiere.base/src/org/adempiere/base/Core.java b/org.adempiere.base/src/org/adempiere/base/Core.java index 19eea8d249..a277f03a9a 100644 --- a/org.adempiere.base/src/org/adempiere/base/Core.java +++ b/org.adempiere.base/src/org/adempiere/base/Core.java @@ -31,11 +31,13 @@ import org.compiere.process.ProcessCall; * It provides simple access to all core services. * * @author viola + * @author hengsin */ public class Core { - public static final String OSGI_PREFIX = "osgi:"; - + /** + * @return list of active resource finder + */ public static IResourceFinder getResourceFinder() { return new IResourceFinder() { @@ -51,6 +53,12 @@ public class Core { }; } + /** + * + * @param tableName + * @param columnName + * @return list of callout register for tableName.columnName + */ public static List findCallout(String tableName, String columnName) { ServiceQuery query = new ServiceQuery(); query.put("tableName", tableName); @@ -59,25 +67,25 @@ public class Core { return Service.list(IColumnCallout.class, query); } - public static boolean isExtension(String className) { - return className.startsWith(OSGI_PREFIX); - } - - public static ProcessCall getProcess(String className) { - if (isExtension(className)) - className = className.substring(Core.OSGI_PREFIX.length()); - + /** + * + * @param extensionId + * @return ProcessCall instance or null if extensionId not found + */ + public static ProcessCall getProcess(String extensionId) { ServiceQuery query = new ServiceQuery(); - query.put(ServiceQuery.EXTENSION_ID, className); + query.put(ServiceQuery.EXTENSION_ID, extensionId); return Service.locate(ProcessCall.class, "org.adempiere.base.Process", query); } - public static ModelValidator getModelValidator(String className) { - if (isExtension(className)) - className = className.substring(Core.OSGI_PREFIX.length()); - + /** + * + * @param extensionId + * @return ModelValidator instance of null if extensionId not found + */ + public static ModelValidator getModelValidator(String extensionId) { ServiceQuery query = new ServiceQuery(); - query.put(ServiceQuery.EXTENSION_ID, className); + query.put(ServiceQuery.EXTENSION_ID, extensionId); return Service.locate(ModelValidator.class, "org.adempiere.base.ModelValidator", query); } diff --git a/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java b/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java index 83119cb52c..1164944227 100644 --- a/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java +++ b/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java @@ -142,9 +142,8 @@ public final class ProcessUtil { } ProcessCall process = null; - if (Core.isExtension(className)) { - process = Core.getProcess(className); - } + //always query equinox extension first + process = Core.getProcess(className); if (process == null) { //Get Class diff --git a/org.adempiere.base/src/org/compiere/model/ModelValidationEngine.java b/org.adempiere.base/src/org/compiere/model/ModelValidationEngine.java index faab982dfa..117ce3592f 100644 --- a/org.adempiere.base/src/org/compiere/model/ModelValidationEngine.java +++ b/org.adempiere.base/src/org/compiere/model/ModelValidationEngine.java @@ -155,10 +155,9 @@ public class ModelValidationEngine { // ModelValidator validator = null; - if (Core.isExtension(className)) - { - validator = Core.getModelValidator(className); - } + //always query equinox extension first + validator = Core.getModelValidator(className); + if (validator == null) { Class clazz = Class.forName(className); diff --git a/org.adempiere.install/schema/org.adempiere.install.IDatabaseConfig.exsd b/org.adempiere.install/schema/org.adempiere.install.IDatabaseConfig.exsd index a6114aee22..45cf7ef359 100644 --- a/org.adempiere.install/schema/org.adempiere.install.IDatabaseConfig.exsd +++ b/org.adempiere.install/schema/org.adempiere.install.IDatabaseConfig.exsd @@ -83,7 +83,8 @@ - <extension + <pre> +<extension id="org.adempiere.db.postgresql.config.ConfigPostgreSQL" name="PostgreSQL Database Configuration" point="org.adempiere.install.IDatabaseConfig"> @@ -92,6 +93,7 @@ id="PostgreSQL"> </database> </extension> +</pre> @@ -118,25 +120,21 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Heng Sin Low. + Copyright (C) Contributors. + + 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. + diff --git a/org.adempiere.pipo/schema/org.adempiere.pipo.Handlers.exsd b/org.adempiere.pipo/schema/org.adempiere.pipo.Handlers.exsd index adfc87f416..4b49f80b3e 100644 --- a/org.adempiere.pipo/schema/org.adempiere.pipo.Handlers.exsd +++ b/org.adempiere.pipo/schema/org.adempiere.pipo.Handlers.exsd @@ -3,7 +3,7 @@ - + Extension point to provide 2pack handler implementation @@ -59,7 +59,7 @@ - + Implementation class name for the org.adempiere.pipo2.ElementHandler interface @@ -90,35 +90,24 @@ - <extension + <pre> +<extension id="defaultHandlers" name="Default Handlers" point="org.adempiere.pipo.Handlers"> - <handler - class="org.adempiere.pipo2.handler.AdElementHandler" - id="AD_Element"> - </handler> - <handler - class="org.adempiere.pipo2.handler.CodeSnippetElementHandler" - id="Code_Snippet"> - </handler> <handler class="org.adempiere.pipo2.handler.ColumnElementHandler" id="AD_Column"> </handler> - ... <handler class="org.adempiere.pipo2.handler.SQLStatementElementHandler" id="SQLStatement"> </handler> - <handler - class="org.adempiere.pipo2.handler.CommonTranslationHandler" - id="table.translationHandler"> - </handler> <handler class="org.adempiere.pipo2.handler.GenericPOElementHandler" id="table.genericHandler"> </handler> </extension> +</pre> @@ -145,25 +134,21 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Heng Sin Low. + Copyright (C) Contributors. + + 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. + diff --git a/org.adempiere.report.jasper/schema/org.compiere.report.JRViewerProvider.exsd b/org.adempiere.report.jasper/schema/org.compiere.report.JRViewerProvider.exsd index e99d0c7e91..bf7389fb1b 100644 --- a/org.adempiere.report.jasper/schema/org.compiere.report.JRViewerProvider.exsd +++ b/org.adempiere.report.jasper/schema/org.compiere.report.JRViewerProvider.exsd @@ -76,12 +76,14 @@ - <extension + <pre> +<extension point="org.compiere.report.JRViewerProvider"> <provider class="org.adempiere.webui.window.ZkJRViewerProvider"> </provider> </extension> +</pre> @@ -108,25 +110,21 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Heng Sin Low. + Copyright (C) Contributors. + + 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. + diff --git a/org.adempiere.server/schema/org.adempiere.server.IServerFactory.exsd b/org.adempiere.server/schema/org.adempiere.server.IServerFactory.exsd index 1271a12250..096876bac1 100644 --- a/org.adempiere.server/schema/org.adempiere.server.IServerFactory.exsd +++ b/org.adempiere.server/schema/org.adempiere.server.IServerFactory.exsd @@ -76,12 +76,14 @@ - <extension + <pre> +<extension point="org.adempiere.server.IServerFactory"> <factory class="org.adempiere.server.rpl.imp.ReplicationServerFactory"> </factory> </extension> +</pre> @@ -108,25 +110,21 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Heng Sin Low. + Copyright (C) Contributors. + + 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. + diff --git a/org.adempiere.ui.swing/META-INF/MANIFEST.MF b/org.adempiere.ui.swing/META-INF/MANIFEST.MF index ce0771dae1..78189dadf9 100644 --- a/org.adempiere.ui.swing/META-INF/MANIFEST.MF +++ b/org.adempiere.ui.swing/META-INF/MANIFEST.MF @@ -12,7 +12,6 @@ Export-Package: de.schaeffer.compiere.tools, net.miginfocom.layout, net.miginfocom.swing, org.adempiere.apps.graph, - org.adempiere.osgi, org.adempiere.pdf.viewer, org.adempiere.plaf, org.compiere, diff --git a/org.adempiere.ui.swing/plugin.xml b/org.adempiere.ui.swing/plugin.xml index 1e1aa8fb0a..3d741188e3 100644 --- a/org.adempiere.ui.swing/plugin.xml +++ b/org.adempiere.ui.swing/plugin.xml @@ -1,10 +1,9 @@ - - - + + + point="org.adempiere.ui.swing.factory.IInfoFactory"> + point="org.adempiere.ui.swing.factory.IEditorFactory"> diff --git a/org.adempiere.ui.swing/schema/org.adempiere.apps.Form.exsd b/org.adempiere.ui.swing/schema/org.adempiere.apps.Form.exsd index 383dc30c7c..5899b99a69 100644 --- a/org.adempiere.ui.swing/schema/org.adempiere.apps.Form.exsd +++ b/org.adempiere.ui.swing/schema/org.adempiere.apps.Form.exsd @@ -6,7 +6,7 @@ - Extension point to provide FormPanel instance. Use the osgi:{extension id} syntax in AD_Form.ClassName to reference the extension that will provide the FormPanel instance ( replace {extension_id} with your actual extension id ). + Extension point to provide FormPanel instance. Use the {extension id} syntax in AD_Form.ClassName to reference the extension that will provide the FormPanel instance ( replace {extension id} with your actual extension id ). @@ -76,14 +76,18 @@ - <extension + <pre> +<extension id="org.adempiere.extend.myForm" name="My Form" point="org.adempiere.apps.Form"> <process - class="org.adempiere.extend.MyForm"> + class="org.adempiere.ui.swing.extend.MyForm"> </process> </extension> + +AD_Form.ClassName="org.adempiere.extend.myForm" +</pre> @@ -96,39 +100,27 @@ - - - - - - [Enter information about supplied implementation of this extension point.] - - - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Heng Sin Low. + Copyright (C) Contributors. + + 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. + diff --git a/org.adempiere.ui.swing/schema/org.adempiere.osgi.IMenuAction.exsd b/org.adempiere.ui.swing/schema/org.adempiere.osgi.IMenuAction.exsd deleted file mode 100644 index 14f2107919..0000000000 --- a/org.adempiere.ui.swing/schema/org.adempiere.osgi.IMenuAction.exsd +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - [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/org.adempiere.ui.swing/schema/org.adempiere.osgi.IEditorFactory.exsd b/org.adempiere.ui.swing/schema/org.adempiere.ui.swing.factory.IEditorFactory.exsd similarity index 66% rename from org.adempiere.ui.swing/schema/org.adempiere.osgi.IEditorFactory.exsd rename to org.adempiere.ui.swing/schema/org.adempiere.ui.swing.factory.IEditorFactory.exsd index cc6da5d4cb..cea33696c3 100644 --- a/org.adempiere.ui.swing/schema/org.adempiere.osgi.IEditorFactory.exsd +++ b/org.adempiere.ui.swing/schema/org.adempiere.ui.swing.factory.IEditorFactory.exsd @@ -83,15 +83,17 @@ - <extension - id="org.adempiere.osgi.DefaultEditorFactory" + <pre> +<extension + id="org.adempiere.ui.swing.factory.DefaultEditorFactory" name="Default field editor factory" - point="org.adempiere.osgi.IEditorFactory"> + point="org.adempiere.ui.swing.factory.IEditorFactory"> <factory - class="org.adempiere.osgi.DefaultEditorFactory" + class="org.adempiere.ui.swing.factory.DefaultEditorFactory" priority="0"> </factory> </extension> +</pre> @@ -100,7 +102,7 @@ - The class attribute must represent an implementor of org.adempiere.osgi.IEditorFactory + The class attribute must represent an implementor of org.adempiere.ui.swing.factory.IEditorFactory @@ -118,25 +120,20 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Heng Sin Low. + Copyright (C) Contributors. + + 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. diff --git a/org.adempiere.ui.swing/schema/org.adempiere.osgi.IInfoFactory.exsd b/org.adempiere.ui.swing/schema/org.adempiere.ui.swing.factory.IInfoFactory.exsd similarity index 65% rename from org.adempiere.ui.swing/schema/org.adempiere.osgi.IInfoFactory.exsd rename to org.adempiere.ui.swing/schema/org.adempiere.ui.swing.factory.IInfoFactory.exsd index 8a63fc9659..e733ca4b52 100644 --- a/org.adempiere.ui.swing/schema/org.adempiere.osgi.IInfoFactory.exsd +++ b/org.adempiere.ui.swing/schema/org.adempiere.ui.swing.factory.IInfoFactory.exsd @@ -59,7 +59,7 @@ - + Implementation class name for the org.adempiere.osgi.IInfoFactory interface @@ -83,15 +83,17 @@ - <extension - id="org.adempiere.osgi.DefaultInfoFactory" + <pre> +<extension + id="org.adempiere.ui.swing.factory.DefaultInfoFactory" name="Default Info Factory" - point="org.adempiere.osgi.IInfoFactory"> + point="org.adempiere.ui.swing.factory.IInfoFactory"> <factory - class="org.adempiere.osgi.DefaultInfoFactory" + class="org.adempiere.ui.swing.factory.DefaultInfoFactory" priority="0"> </factory> </extension> +</pre> @@ -100,7 +102,7 @@ - The class attribute must represent an implementor of org.adempiere.osgi.IInfoFactory + The class attribute must represent an implementor of org.adempiere.ui.swing.factory.IInfoFactory @@ -118,25 +120,20 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Heng Sin Low. + Copyright (C) Contributors. + + 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. diff --git a/org.adempiere.ui.swing/src/org/adempiere/client/Client.java b/org.adempiere.ui.swing/src/org/adempiere/client/Client.java index f72f6590cc..b8dcdfbe9e 100644 --- a/org.adempiere.ui.swing/src/org/adempiere/client/Client.java +++ b/org.adempiere.ui.swing/src/org/adempiere/client/Client.java @@ -1,17 +1,44 @@ +/****************************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Jorg Viola * + * Copyright (C) Contributors * + * * + * 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. * + * * + * Contributors: * + * - Heng Sin Low * + *****************************************************************************/ package org.adempiere.client; -import org.adempiere.base.Core; import org.adempiere.base.Service; import org.adempiere.base.ServiceQuery; import org.compiere.apps.form.FormPanel; +/** + * + * @author viola + * @author hengsin + */ public class Client { - public static FormPanel getFormPanel(String className) { - if (Core.isExtension(className)) - className = className.substring(Core.OSGI_PREFIX.length()); + /** + * + * @param extensionId + * @return + */ + public static FormPanel getFormPanel(String extensionId) { ServiceQuery query = new ServiceQuery(); - query.put(ServiceQuery.EXTENSION_ID, className); + query.put(ServiceQuery.EXTENSION_ID, extensionId); return Service.locate(FormPanel.class, "org.adempiere.apps.Form", query); } diff --git a/org.adempiere.ui.swing/src/org/adempiere/osgi/InfoManager.java b/org.adempiere.ui.swing/src/org/adempiere/client/InfoManager.java similarity index 97% rename from org.adempiere.ui.swing/src/org/adempiere/osgi/InfoManager.java rename to org.adempiere.ui.swing/src/org/adempiere/client/InfoManager.java index 743203c69d..3a5aa681ea 100644 --- a/org.adempiere.ui.swing/src/org/adempiere/osgi/InfoManager.java +++ b/org.adempiere.ui.swing/src/org/adempiere/client/InfoManager.java @@ -11,12 +11,13 @@ * with this program; if not, write to the Free Software Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * *****************************************************************************/ -package org.adempiere.osgi; +package org.adempiere.client; import java.awt.Frame; import java.util.List; import org.adempiere.base.Service; +import org.adempiere.ui.swing.factory.IInfoFactory; import org.compiere.apps.search.Info; import org.compiere.model.GridField; import org.compiere.model.Lookup; diff --git a/org.adempiere.ui.swing/src/org/adempiere/osgi/AbstractMenuAction.java b/org.adempiere.ui.swing/src/org/adempiere/osgi/AbstractMenuAction.java deleted file mode 100644 index 164c2777d0..0000000000 --- a/org.adempiere.ui.swing/src/org/adempiere/osgi/AbstractMenuAction.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.adempiere.osgi; - -import javax.swing.JMenu; -import javax.swing.JMenuBar; - -import org.compiere.util.CLogger; -import org.compiere.util.Env; -import org.compiere.util.Msg; - -public abstract class AbstractMenuAction implements IMenuAction { - - protected CLogger log = CLogger.getCLogger(getClass()); - - protected JMenu getMenu(JMenuBar menuBar, String label) { - - // Translated text - String text = Msg.getMsg(Env.getCtx(), label); - int pos = text.indexOf('&'); - if (pos != -1) { - text = text.substring(0, pos) + text.substring(pos+1); - } - - for (int i=0; i < menuBar.getMenuCount(); i++) { - JMenu menu = menuBar.getMenu(i); - if (text.equals(menu.getText())) { - return menu; - } - } - // menu not found. - log.warning("Menu " + label + " not found."); - return null; - } - - -} diff --git a/org.adempiere.ui.swing/src/org/adempiere/osgi/IMenuAction.java b/org.adempiere.ui.swing/src/org/adempiere/osgi/IMenuAction.java deleted file mode 100644 index f8478fcaae..0000000000 --- a/org.adempiere.ui.swing/src/org/adempiere/osgi/IMenuAction.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.adempiere.osgi; - -import javax.swing.JMenuBar; - -public interface IMenuAction { - - public void addAction(JMenuBar menuBar); - -} diff --git a/org.adempiere.ui.swing/src/org/adempiere/osgi/DefaultEditorFactory.java b/org.adempiere.ui.swing/src/org/adempiere/ui/swing/factory/DefaultEditorFactory.java similarity index 99% rename from org.adempiere.ui.swing/src/org/adempiere/osgi/DefaultEditorFactory.java rename to org.adempiere.ui.swing/src/org/adempiere/ui/swing/factory/DefaultEditorFactory.java index 1fdbd3759e..346b66dbd3 100644 --- a/org.adempiere.ui.swing/src/org/adempiere/osgi/DefaultEditorFactory.java +++ b/org.adempiere.ui.swing/src/org/adempiere/ui/swing/factory/DefaultEditorFactory.java @@ -11,7 +11,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * *****************************************************************************/ -package org.adempiere.osgi; +package org.adempiere.ui.swing.factory; import org.compiere.grid.ed.ADempiereAutoCompleteDecorator; import org.compiere.grid.ed.VAccount; diff --git a/org.adempiere.ui.swing/src/org/adempiere/osgi/DefaultInfoFactory.java b/org.adempiere.ui.swing/src/org/adempiere/ui/swing/factory/DefaultInfoFactory.java similarity index 99% rename from org.adempiere.ui.swing/src/org/adempiere/osgi/DefaultInfoFactory.java rename to org.adempiere.ui.swing/src/org/adempiere/ui/swing/factory/DefaultInfoFactory.java index 77fb079fb1..5872ac886b 100644 --- a/org.adempiere.ui.swing/src/org/adempiere/osgi/DefaultInfoFactory.java +++ b/org.adempiere.ui.swing/src/org/adempiere/ui/swing/factory/DefaultInfoFactory.java @@ -11,7 +11,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * *****************************************************************************/ -package org.adempiere.osgi; +package org.adempiere.ui.swing.factory; import java.awt.Frame; import java.util.logging.Level; diff --git a/org.adempiere.ui.swing/src/org/adempiere/osgi/IEditorFactory.java b/org.adempiere.ui.swing/src/org/adempiere/ui/swing/factory/IEditorFactory.java similarity index 97% rename from org.adempiere.ui.swing/src/org/adempiere/osgi/IEditorFactory.java rename to org.adempiere.ui.swing/src/org/adempiere/ui/swing/factory/IEditorFactory.java index 97efac0865..df1dc595a8 100644 --- a/org.adempiere.ui.swing/src/org/adempiere/osgi/IEditorFactory.java +++ b/org.adempiere.ui.swing/src/org/adempiere/ui/swing/factory/IEditorFactory.java @@ -11,7 +11,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * *****************************************************************************/ -package org.adempiere.osgi; +package org.adempiere.ui.swing.factory; import org.compiere.grid.ed.VEditor; import org.compiere.model.GridField; diff --git a/org.adempiere.ui.swing/src/org/adempiere/osgi/IInfoFactory.java b/org.adempiere.ui.swing/src/org/adempiere/ui/swing/factory/IInfoFactory.java similarity index 98% rename from org.adempiere.ui.swing/src/org/adempiere/osgi/IInfoFactory.java rename to org.adempiere.ui.swing/src/org/adempiere/ui/swing/factory/IInfoFactory.java index 3ee09f5881..87f0cda4b4 100644 --- a/org.adempiere.ui.swing/src/org/adempiere/osgi/IInfoFactory.java +++ b/org.adempiere.ui.swing/src/org/adempiere/ui/swing/factory/IInfoFactory.java @@ -11,7 +11,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * *****************************************************************************/ -package org.adempiere.osgi; +package org.adempiere.ui.swing.factory; import java.awt.Frame; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java index c1b3a96346..16485c093e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java @@ -33,7 +33,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; -import java.util.List; import java.util.Map; import java.util.Properties; import java.util.TreeMap; @@ -60,8 +59,6 @@ import javax.swing.SwingUtilities; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import org.adempiere.base.Service; -import org.adempiere.osgi.IMenuAction; import org.compiere.apps.form.FormFrame; import org.compiere.apps.search.Find; import org.compiere.grid.APanelTab; @@ -528,12 +525,6 @@ public final class APanel extends CPanel toolBar.add(aEnd.getButton()); } - // Create OSGi menu actions.. - List osgiActions = Service.list(IMenuAction.class); - for (IMenuAction action:osgiActions) { - action.addAction(menuBar); - } - // if (CLogMgt.isLevelAll()) Util.printActionInputMap(this); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java index fdf0b4c9f9..cb74544c3e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java @@ -33,7 +33,6 @@ import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.KeyStroke; -import org.adempiere.base.Core; import org.adempiere.client.Client; import org.compiere.apps.AEnv; import org.compiere.apps.AGlassPane; @@ -55,15 +54,15 @@ import org.compiere.util.Trace; * * @author Jorg Janke * @version $Id: FormFrame.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $ - * - * Colin Rooney 2007/03/20 RFE#1670185 & BUG#1684142 + * + * Colin Rooney 2007/03/20 RFE#1670185 & BUG#1684142 * Extend security to Info Queries */ -public class FormFrame extends CFrame - implements ActionListener +public class FormFrame extends CFrame + implements ActionListener { /** - * + * */ private static final long serialVersionUID = 2559005548469735515L; @@ -76,7 +75,7 @@ public class FormFrame extends CFrame { this(null); } // FormFrame - + /** * Create Form. * Need to call openForm @@ -85,14 +84,14 @@ public class FormFrame extends CFrame public FormFrame (GraphicsConfiguration gc) { super(gc); - addWindowListener(new java.awt.event.WindowAdapter() + addWindowListener(new java.awt.event.WindowAdapter() { - public void windowOpened(java.awt.event.WindowEvent evt) + public void windowOpened(java.awt.event.WindowEvent evt) { formWindowOpened(evt); } }); - + m_WindowNo = AEnv.createWindowNo (this); setGlassPane(m_glassPane); try @@ -107,7 +106,7 @@ public class FormFrame extends CFrame } // FormFrame private ProcessInfo m_pi; - + /** WindowNo */ private int m_WindowNo; /** The GlassPane */ @@ -124,7 +123,7 @@ public class FormFrame extends CFrame public boolean m_maximize = false; /** Logger */ private static CLogger log = CLogger.getCLogger(FormFrame.class); - + /** Form ID */ private int p_AD_Form_ID = 0; @@ -160,7 +159,7 @@ public class FormFrame extends CFrame if (MRole.getDefault().isAllow_Info_Product()) { - AEnv.addMenuItem("InfoProduct", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), mView, this); + AEnv.addMenuItem("InfoProduct", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), mView, this); } if (MRole.getDefault().isAllow_Info_BPartner()) { @@ -172,36 +171,36 @@ public class FormFrame extends CFrame } if (MRole.getDefault().isAllow_Info_Schedule()) { - AEnv.addMenuItem("InfoSchedule", null, null, mView, this); + AEnv.addMenuItem("InfoSchedule", null, null, mView, this); } mView.addSeparator(); if (MRole.getDefault().isAllow_Info_Order()) { - AEnv.addMenuItem("InfoOrder", "Info", null, mView, this); + AEnv.addMenuItem("InfoOrder", "Info", null, mView, this); } if (MRole.getDefault().isAllow_Info_Invoice()) { - AEnv.addMenuItem("InfoInvoice", "Info", null, mView, this); + AEnv.addMenuItem("InfoInvoice", "Info", null, mView, this); } if (MRole.getDefault().isAllow_Info_InOut()) { - AEnv.addMenuItem("InfoInOut", "Info", null, mView, this); + AEnv.addMenuItem("InfoInOut", "Info", null, mView, this); } if (MRole.getDefault().isAllow_Info_Payment()) { - AEnv.addMenuItem("InfoPayment", "Info", null, mView, this); + AEnv.addMenuItem("InfoPayment", "Info", null, mView, this); } if (MRole.getDefault().isAllow_Info_CashJournal()) { - AEnv.addMenuItem("InfoCashLine", "Info", null, mView, this); + AEnv.addMenuItem("InfoCashLine", "Info", null, mView, this); } if (MRole.getDefault().isAllow_Info_Resource()) { - AEnv.addMenuItem("InfoAssignment", "Info", null, mView, this); + AEnv.addMenuItem("InfoAssignment", "Info", null, mView, this); } if (MRole.getDefault().isAllow_Info_Asset()) { - AEnv.addMenuItem("InfoAsset", "Info", null, mView, this); + AEnv.addMenuItem("InfoAsset", "Info", null, mView, this); } // Tools JMenu mTools = AEnv.getMenu("Tools"); @@ -217,7 +216,7 @@ public class FormFrame extends CFrame mTools.addSeparator(); AEnv.addMenuItem("Preference", null, null, mTools, this); } - + // Window AMenu aMenu = (AMenu)AEnv.getWindow(0); JMenu mWindow = new WindowMenu(aMenu.getWindowManager(), this); @@ -299,7 +298,7 @@ public class FormFrame extends CFrame // return openForm(AD_Form_ID, className, name); } // openForm - + /** * Open Form * @param AD_Form_ID Form @@ -316,10 +315,10 @@ public class FormFrame extends CFrame try { - // Create instance w/o parameters - if (Core.isExtension(className)) - m_panel = Client.getFormPanel(className); - else + // Create instance w/o parameters + // Try equinox extension then java classpath + m_panel = Client.getFormPanel(className); + if (m_panel == null) m_panel = (FormPanel)Class.forName(className).newInstance(); } catch (Exception e) @@ -407,8 +406,8 @@ public class FormFrame extends CFrame { m_glassPane.setBusyTimer (time); } // setBusyTimer - - + + /** * Set Maximize Window * @param max maximize @@ -417,14 +416,14 @@ public class FormFrame extends CFrame { m_maximize = max; } // setMaximize - - + + /** * Form Window Opened. * Maximize window if required * @param evt event */ - private void formWindowOpened(java.awt.event.WindowEvent evt) + private void formWindowOpened(java.awt.event.WindowEvent evt) { if (m_maximize == true) { @@ -434,20 +433,20 @@ public class FormFrame extends CFrame } // formWindowOpened // Add window and tab no called from - + public void setProcessInfo(ProcessInfo pi) { m_pi = pi; - + } - + public ProcessInfo getProcessInfo() { return m_pi; } // End - + /** * Start Batch * @param process diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java index 745792f557..7c002b8293 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java @@ -40,7 +40,7 @@ import javax.swing.SwingUtilities; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; -import org.adempiere.osgi.InfoManager; +import org.adempiere.client.InfoManager; import org.compiere.apps.ADialog; import org.compiere.apps.AEnv; import org.compiere.apps.AWindow; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VEditorFactory.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VEditorFactory.java index 68f6780b9b..f6c67a3224 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VEditorFactory.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VEditorFactory.java @@ -19,7 +19,7 @@ package org.compiere.grid.ed; import java.util.List; import org.adempiere.base.Service; -import org.adempiere.osgi.IEditorFactory; +import org.adempiere.ui.swing.factory.IEditorFactory; import org.compiere.model.GridField; import org.compiere.model.GridTab; import org.compiere.swing.CLabel; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java index 37166bdee9..92938d2159 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java @@ -46,7 +46,7 @@ import javax.swing.KeyStroke; import javax.swing.LookAndFeel; import javax.swing.SwingUtilities; -import org.adempiere.osgi.InfoManager; +import org.adempiere.client.InfoManager; import org.compiere.apps.ADialog; import org.compiere.apps.AEnv; import org.compiere.apps.AWindow; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/Extensions.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/Extensions.java index f552d00e4b..90c97755d1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/Extensions.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/Extensions.java @@ -1,18 +1,45 @@ +/****************************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Jorg Viola * + * Copyright (C) Contributors * + * * + * 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. * + * * + * Contributors: * + * - Heng Sin Low * + *****************************************************************************/ package org.adempiere.webui; -import org.adempiere.base.Core; import org.adempiere.base.Service; import org.adempiere.base.ServiceQuery; +import org.adempiere.webui.panel.IFormController; +/** + * + * @author viola + * @author hengsin + * + */ public class Extensions { - public static Object getForm(String id) { - if (Core.isExtension(id)) { - id = id.substring(Core.OSGI_PREFIX.length()); - } - + /** + * + * @param extensionId + * @return IFormController instance or null if extensionId not found + */ + public static IFormController getForm(String extensionId) { ServiceQuery query = new ServiceQuery(); - query.put(ServiceQuery.EXTENSION_ID, id); - return Service.locate(Object.class, "org.adempiere.webui.Form", query); + query.put(ServiceQuery.EXTENSION_ID, extensionId); + return Service.locate(IFormController.class, "org.adempiere.webui.Form", query); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ADForm.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ADForm.java index 1764343ba5..07a91d9a1c 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ADForm.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ADForm.java @@ -19,7 +19,6 @@ package org.adempiere.webui.panel; import java.util.logging.Level; -import org.adempiere.base.Core; import org.adempiere.webui.Extensions; import org.adempiere.webui.component.Window; import org.adempiere.webui.exception.ApplicationException; @@ -42,7 +41,7 @@ import org.zkoss.zk.ui.event.EventListener; public abstract class ADForm extends Window implements EventListener { /** - * + * */ private static final long serialVersionUID = -5183711788893823434L; /** The class' logging enabler */ @@ -63,7 +62,7 @@ public abstract class ADForm extends Window implements EventListener private ProcessInfo m_pi; - + private IFormController m_customForm; /** @@ -157,7 +156,7 @@ public abstract class ADForm extends Window implements EventListener if (tail != null) { zkName = zkPackage + tail; - + try { Class clazz = ADForm.class.getClassLoader().loadClass(zkName); if (!isZkFormClass(clazz)) @@ -167,7 +166,7 @@ public abstract class ADForm extends Window implements EventListener } catch (ClassNotFoundException e) { zkName = null; } - + //try replace package and add W prefix to class name if (zkName == null) { @@ -184,7 +183,7 @@ public abstract class ADForm extends Window implements EventListener { className = tail; } - + //try convert V* to W* if (className.startsWith(swingPrefix)) { @@ -199,7 +198,7 @@ public abstract class ADForm extends Window implements EventListener zkName = null; } } - + //try append W prefix to original class name if (zkName == null) { @@ -216,9 +215,9 @@ public abstract class ADForm extends Window implements EventListener } } } - + /* - * not found, try changing only the class name + * not found, try changing only the class name */ if (zkName == null) { @@ -240,10 +239,10 @@ public abstract class ADForm extends Window implements EventListener zkName = null; } } - + //try just append W to the original class name if (zkName == null) - { + { String zkClassName = zkPrefix + className; zkName = packageName + "." + zkClassName; try { @@ -256,7 +255,7 @@ public abstract class ADForm extends Window implements EventListener zkName = null; } } - + if (zkName == null) { //finally try whether same name is used for zk @@ -303,12 +302,8 @@ public abstract class ADForm extends Window implements EventListener { logger.info("AD_Form_ID=" + adFormID + " - Class=" + richClassName); - if (Core.isExtension(richClassName)) - { - obj = Extensions.getForm(richClassName); - } - - if (obj == null) + obj = Extensions.getForm(richClassName); + if (obj == null) { //static lookup webClassName = ADClassNameMap.get(richClassName); @@ -317,13 +312,13 @@ public abstract class ADForm extends Window implements EventListener { webClassName = translateFormClassName(richClassName); } - + if (webClassName == null) { throw new ApplicationException("Web UI form not implemented for the swing form " + richClassName); } - + try { // Create instance w/o parameters @@ -348,18 +343,10 @@ public abstract class ADForm extends Window implements EventListener else if (obj instanceof IFormController) { IFormController customForm = (IFormController)obj; - Object o = customForm.getForm(); - if(o instanceof ADForm) - { - form = (ADForm)o; - form.setICustomForm(customForm); - form.init(adFormID, name); - return form; - } - else - throw new ApplicationException("The web user interface custom form '" + - webClassName + - "' cannot be displayed in the web user interface."); + form = customForm.getForm(); + form.setICustomForm(customForm); + form.init(adFormID, name); + return form; } else { @@ -400,12 +387,12 @@ public abstract class ADForm extends Window implements EventListener { return m_pi; } - + public void setICustomForm(IFormController customForm) { m_customForm = customForm; } - + public IFormController getICustomForm() { return m_customForm; diff --git a/org.adempiere.ui.zk/schema/org.adempiere.webui.Form.exsd b/org.adempiere.ui.zk/schema/org.adempiere.webui.Form.exsd index 38a5db16ef..a79c21e858 100644 --- a/org.adempiere.ui.zk/schema/org.adempiere.webui.Form.exsd +++ b/org.adempiere.ui.zk/schema/org.adempiere.webui.Form.exsd @@ -6,7 +6,7 @@ - Extension point to provide form controller implementation. Use the osgi:{extension id} in AD_Form.ClassName to reference the extension that will provide the form controller instance ( replace osgi:{extension id} with your actual extension id ). Note that if you intend to support both swing and zk client, you should use the same extension id for the swing and zk form extension ( of course, class name should be different ). + Extension point to provide form controller implementation. Use the {extension id} in AD_Form.ClassName to reference the extension that will provide the form controller instance ( replace {extension id} with your actual extension id ). Note that if you intend to support both swing and zk client, you should use the same extension id for the swing and zk form extension ( of course, class name should be different ). @@ -76,14 +76,18 @@ - <extension - id="org.adempiere.webui.extend.myForm" + <pre> +<extension + id="org.adempiere.extend.myForm" name="My Form" point="org.adempiere.webui.Form"> <process - class="org.adempiere.webui.extend.MyForm"> + class="org.adempiere.ui.zk.extend.MyForm"> </process> </extension> + +AD_Form.ClassName="org.adempiere.extend.myForm" +</pre> @@ -96,39 +100,27 @@ - - - - - - [Enter information about supplied implementation of this extension point.] - - - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Heng Sin Low. + Copyright (C) Contributors. + + 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. + diff --git a/org.adempiere.ui.zk/schema/org.adempiere.webui.factory.IEditorFactory.exsd b/org.adempiere.ui.zk/schema/org.adempiere.webui.factory.IEditorFactory.exsd index 4833b79251..bca5f34ca2 100644 --- a/org.adempiere.ui.zk/schema/org.adempiere.webui.factory.IEditorFactory.exsd +++ b/org.adempiere.ui.zk/schema/org.adempiere.webui.factory.IEditorFactory.exsd @@ -83,7 +83,8 @@ - <extension + <pre> +<extension id="org.adempiere.webui.factory.DefaultEditorFactory" name="Default field editor factory" point="org.adempiere.webui.factory.IEditorFactory"> @@ -92,6 +93,7 @@ priority="0"> </factory> </extension> +</pre> @@ -118,25 +120,21 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Heng Sin Low. + Copyright (C) Contributors. + + 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. + diff --git a/org.adempiere.ui.zk/schema/org.adempiere.webui.factory.IInfoFactory.exsd b/org.adempiere.ui.zk/schema/org.adempiere.webui.factory.IInfoFactory.exsd index 8792c48179..1c85a1d735 100644 --- a/org.adempiere.ui.zk/schema/org.adempiere.webui.factory.IInfoFactory.exsd +++ b/org.adempiere.ui.zk/schema/org.adempiere.webui.factory.IInfoFactory.exsd @@ -83,7 +83,8 @@ - <extension + <pre> +<extension id="org.adempiere.webui.factory.DefaultInfoFactory" name="Default Info Factory" point="org.adempiere.webui.factory.IInfoFactory"> @@ -92,6 +93,7 @@ priority="0"> </factory> </extension> +</pre> @@ -118,25 +120,21 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Heng Sin Low. + Copyright (C) Contributors. + + 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. + diff --git a/org.adempiere.ui/schema/org.compiere.print.ReportViewerProvider.exsd b/org.adempiere.ui/schema/org.compiere.print.ReportViewerProvider.exsd index 57978b8906..ce7db23fd4 100644 --- a/org.adempiere.ui/schema/org.compiere.print.ReportViewerProvider.exsd +++ b/org.adempiere.ui/schema/org.compiere.print.ReportViewerProvider.exsd @@ -52,7 +52,7 @@ - + Implementation class name of the org.compiere.print.ReportViewerProvider interface @@ -76,12 +76,14 @@ - <extension + <pre> +<extension point="org.compiere.print.ReportViewerProvider"> <provider class="org.adempiere.webui.window.ZkReportViewerProvider"> </provider> </extension> +</pre> @@ -108,25 +110,21 @@ - /****************************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Heng Sin Low * - * Copyright (C) Contributors * - * * - * 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. * - * * - * Contributors: * - *****************************************************************************/ + This file is part of Adempiere ERP Bazaar http://www.adempiere.org. + + Copyright (C) Heng Sin Low. + Copyright (C) Contributors. + + 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. +