diff --git a/migration/i6.1/oracle/201811121420_IDEMPIERE-2648.sql b/migration/i6.1/oracle/201811121420_IDEMPIERE-2648.sql new file mode 100644 index 0000000000..70c485cd7a --- /dev/null +++ b/migration/i6.1/oracle/201811121420_IDEMPIERE-2648.sql @@ -0,0 +1,67 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-2648 implement pack-in pack-out handle for infoWindow +-- Nov 12, 2018, 2:11:41 PM BRST +INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (213804,0,'Info Window','Info and search/select Window','The Info window is used to search and select records as well as display information relevant to the selection.',50006,'AD_InfoWindow_ID',10,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_DATE('2018-11-12 14:11:40','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2018-11-12 14:11:40','YYYY-MM-DD HH24:MI:SS'),100,3068,'N','N','D','N','N','N','Y','6b52cd03-c9ae-4b0e-b24f-45323a7ed42d','Y',0,'N','N','C','N') +; + +-- Nov 12, 2018, 2:12:32 PM BRST +UPDATE AD_Column SET FKConstraintType='N',Updated=TO_DATE('2018-11-12 14:12:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=213804 +; + +-- Nov 12, 2018, 2:12:35 PM BRST +UPDATE AD_Column SET FKConstraintName='ADInfoWindow_ADPackageExpDetai', FKConstraintType='N',Updated=TO_DATE('2018-11-12 14:12:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=213804 +; + +-- Nov 12, 2018, 2:12:35 PM BRST +ALTER TABLE AD_Package_Exp_Detail ADD AD_InfoWindow_ID NUMBER(10) DEFAULT NULL +; + +-- Nov 12, 2018, 2:12:35 PM BRST +ALTER TABLE AD_Package_Exp_Detail ADD CONSTRAINT ADInfoWindow_ADPackageExpDetai FOREIGN KEY (AD_InfoWindow_ID) REFERENCES ad_infowindow(ad_infowindow_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 12, 2018, 2:14:03 PM BRST +INSERT INTO AD_Ref_List (AD_Ref_List_ID,Name,AD_Reference_ID,Value,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Ref_List_UU) VALUES (200445,'Info Window',50004,'IW',0,0,'Y',TO_DATE('2018-11-12 14:14:02','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2018-11-12 14:14:02','YYYY-MM-DD HH24:MI:SS'),100,'D','c1e5ee93-987c-43cd-90e9-e4cf5d592105') +; + +-- Nov 12, 2018, 2:15:14 PM BRST +INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (205861,'Info Window','Info and search/select Window','The Info window is used to search and select records as well as display information relevant to the selection.',50006,213804,'Y',10,330,'N','N','N','N',0,0,'Y',TO_DATE('2018-11-12 14:15:13','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2018-11-12 14:15:13','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','9cbe0104-e976-411a-9aa3-d35798c57519','Y',330,2) +; + +-- Nov 12, 2018, 2:15:57 PM BRST +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-12 14:15:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=53284 +; + +-- Nov 12, 2018, 2:15:57 PM BRST +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-12 14:15:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=57418 +; + +-- Nov 12, 2018, 2:15:57 PM BRST +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=310, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-12 14:15:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205861 +; + +-- Nov 12, 2018, 2:15:57 PM BRST +UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-12 14:15:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50116 +; + +-- Nov 12, 2018, 2:15:57 PM BRST +UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-12 14:15:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50117 +; + +-- Nov 12, 2018, 2:15:57 PM BRST +UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-12 14:15:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204547 +; + +-- Nov 12, 2018, 2:16:29 PM BRST +UPDATE AD_Field SET DisplayLogic='@Type@=''IW''', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-12 14:16:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205861 +; + +-- Nov 12, 2018 2:49:09 PM BRST +UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_DATE('2018-11-12 14:49:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=213804 +; + +SELECT register_migration_script('201811121420_IDEMPIERE-2648.sql') FROM dual +; + diff --git a/migration/i6.1/postgresql/201811121420_IDEMPIERE-2648.sql b/migration/i6.1/postgresql/201811121420_IDEMPIERE-2648.sql new file mode 100644 index 0000000000..67a83cd985 --- /dev/null +++ b/migration/i6.1/postgresql/201811121420_IDEMPIERE-2648.sql @@ -0,0 +1,64 @@ +-- IDEMPIERE-2648 implement pack-in pack-out handle for infoWindow +-- Nov 12, 2018, 2:11:41 PM BRST +INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213804,0,'Info Window','Info and search/select Window','The Info window is used to search and select records as well as display information relevant to the selection.',50006,'AD_InfoWindow_ID',10,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2018-11-12 14:11:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-11-12 14:11:40','YYYY-MM-DD HH24:MI:SS'),100,3068,'N','N','D','N','N','N','Y','6b52cd03-c9ae-4b0e-b24f-45323a7ed42d','Y',0,'N','N','C') +; + +-- Nov 12, 2018, 2:12:32 PM BRST +UPDATE AD_Column SET FKConstraintType='N',Updated=TO_TIMESTAMP('2018-11-12 14:12:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=213804 +; + +-- Nov 12, 2018, 2:12:35 PM BRST +UPDATE AD_Column SET FKConstraintName='ADInfoWindow_ADPackageExpDetai', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-11-12 14:12:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=213804 +; + +-- Nov 12, 2018, 2:12:35 PM BRST +ALTER TABLE AD_Package_Exp_Detail ADD COLUMN AD_InfoWindow_ID NUMERIC(10) DEFAULT NULL +; + +-- Nov 12, 2018, 2:12:35 PM BRST +ALTER TABLE AD_Package_Exp_Detail ADD CONSTRAINT ADInfoWindow_ADPackageExpDetai FOREIGN KEY (AD_InfoWindow_ID) REFERENCES ad_infowindow(ad_infowindow_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 12, 2018, 2:14:03 PM BRST +INSERT INTO AD_Ref_List (AD_Ref_List_ID,Name,AD_Reference_ID,Value,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Ref_List_UU) VALUES (200445,'Info Window',50004,'IW',0,0,'Y',TO_TIMESTAMP('2018-11-12 14:14:02','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-11-12 14:14:02','YYYY-MM-DD HH24:MI:SS'),100,'D','c1e5ee93-987c-43cd-90e9-e4cf5d592105') +; + +-- Nov 12, 2018, 2:15:14 PM BRST +INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (205861,'Info Window','Info and search/select Window','The Info window is used to search and select records as well as display information relevant to the selection.',50006,213804,'Y',10,330,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-11-12 14:15:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-11-12 14:15:13','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','9cbe0104-e976-411a-9aa3-d35798c57519','Y',330,2) +; + +-- Nov 12, 2018, 2:15:57 PM BRST +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-12 14:15:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=53284 +; + +-- Nov 12, 2018, 2:15:57 PM BRST +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-12 14:15:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=57418 +; + +-- Nov 12, 2018, 2:15:57 PM BRST +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=310, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-12 14:15:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205861 +; + +-- Nov 12, 2018, 2:15:57 PM BRST +UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-12 14:15:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50116 +; + +-- Nov 12, 2018, 2:15:57 PM BRST +UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-12 14:15:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50117 +; + +-- Nov 12, 2018, 2:15:57 PM BRST +UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-12 14:15:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204547 +; + +-- Nov 12, 2018, 2:16:29 PM BRST +UPDATE AD_Field SET DisplayLogic='@Type@=''IW''', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-12 14:16:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205861 +; + +-- Nov 12, 2018 2:49:09 PM BRST +UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_TIMESTAMP('2018-11-12 14:49:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=213804 +; + +SELECT register_migration_script('201811121420_IDEMPIERE-2648.sql') FROM dual +; + diff --git a/migration/processes_post_migration/oracle/03_update_sequences.sql b/migration/processes_post_migration/oracle/03_update_sequences.sql index 156bf102a6..73f01f56d9 100644 --- a/migration/processes_post_migration/oracle/03_update_sequences.sql +++ b/migration/processes_post_migration/oracle/03_update_sequences.sql @@ -105,7 +105,12 @@ BEGIN || 'WHERE Name = ''' || r.tablename || ''' AND istableid = ''Y'''; - EXECUTE IMMEDIATE cmdseq INTO currentseq, currentseqsys; + BEGIN + EXECUTE IMMEDIATE cmdseq INTO currentseq, currentseqsys; + EXCEPTION + WHEN NO_DATA_FOUND THEN + DBMS_OUTPUT.PUT_LINE ('Sequence does not exist for table '|| r.tablename); + END; END IF; IF currentnextsys <> currentseqsys OR (currentnext <> currentseq AND Isnativeseqon ='N') diff --git a/org.adempiere.base-feature/packinfolder.app.launch b/org.adempiere.base-feature/packinfolder.app.launch new file mode 100644 index 0000000000..70d4457fd7 --- /dev/null +++ b/org.adempiere.base-feature/packinfolder.app.launch @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.adempiere.base/buckminster.cspex b/org.adempiere.base/buckminster.cspex deleted file mode 100644 index 37e112943c..0000000000 --- a/org.adempiere.base/buckminster.cspex +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/org.adempiere.base/copyjars.xml b/org.adempiere.base/copyjars.xml deleted file mode 100644 index 266e620174..0000000000 --- a/org.adempiere.base/copyjars.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - diff --git a/org.adempiere.base/plugin.xml b/org.adempiere.base/plugin.xml index 0779342114..6aa93bd88f 100644 --- a/org.adempiere.base/plugin.xml +++ b/org.adempiere.base/plugin.xml @@ -128,4 +128,16 @@ + + + + + + diff --git a/org.adempiere.base/src/org/adempiere/base/PackInFolderApplication.java b/org.adempiere.base/src/org/adempiere/base/PackInFolderApplication.java new file mode 100644 index 0000000000..880b0450ce --- /dev/null +++ b/org.adempiere.base/src/org/adempiere/base/PackInFolderApplication.java @@ -0,0 +1,88 @@ +/*********************************************************************** + * This file is part of iDempiere ERP Open Source * + * http://www.idempiere.org * + * * + * Copyright (C) Contributors * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Carlos Ruiz (sponsored by FH) * + **********************************************************************/ +package org.adempiere.base; + +import java.util.Map; +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.Adempiere; +import org.compiere.model.MPInstance; +import org.compiere.process.ProcessCall; +import org.compiere.process.ProcessInfo; +import org.compiere.util.CLogMgt; +import org.compiere.util.Env; +import org.eclipse.equinox.app.IApplication; +import org.eclipse.equinox.app.IApplicationContext; + +/** + * @author Carlos Ruiz (globalqss) + * + */ +public class PackInFolderApplication implements IApplication { + + /* (non-Javadoc) + * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext) + */ + @Override + public Object start(IApplicationContext context) throws Exception { + Adempiere.startup(false); + CLogMgt.setLevel(Level.FINE); + + Map args = context.getArguments(); + String commandlineArgs[] = (String[]) args.get("application.args"); + if (commandlineArgs.length == 1) { + Properties ctx = Env.getCtx(); + String directory = commandlineArgs[0]; + ProcessInfo pi = new ProcessInfo("PackInFolder", 200099); + pi.setAD_Client_ID(0); + pi.setAD_User_ID(100); + MPInstance instance = new MPInstance(ctx, 200099, 0); + instance.saveEx(); + instance.createParameter(10, "Folder", directory); + pi.setAD_PInstance_ID(instance.getAD_PInstance_ID()); + ProcessCall process = Core.getProcess("org.adempiere.pipo2.PackInFolder"); + process.startProcess(ctx, pi, null); + StringBuilder msgout = new StringBuilder("Process=").append(pi.getTitle()) + .append(" Error=").append(pi.isError()).append(" Summary=") + .append(pi.getSummary()); + System.out.println(msgout.toString()); + } else { + System.out.println("Apply PackIn from Folder usage:"); + System.out.println("RUN_ApplyPackInFromFolder.sh folder"); + } + + + return IApplication.EXIT_OK; + } + + /* (non-Javadoc) + * @see org.eclipse.equinox.app.IApplication#stop() + */ + @Override + public void stop() { + } + +} diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_Package_Exp_Detail.java b/org.adempiere.base/src/org/compiere/model/I_AD_Package_Exp_Detail.java index 70ccdb04bf..8f5b7d7b92 100644 --- a/org.adempiere.base/src/org/compiere/model/I_AD_Package_Exp_Detail.java +++ b/org.adempiere.base/src/org/compiere/model/I_AD_Package_Exp_Detail.java @@ -90,6 +90,21 @@ public interface I_AD_Package_Exp_Detail public org.compiere.model.I_AD_ImpFormat getAD_ImpFormat() throws RuntimeException; + /** Column name AD_InfoWindow_ID */ + public static final String COLUMNNAME_AD_InfoWindow_ID = "AD_InfoWindow_ID"; + + /** Set Info Window. + * Info and search/select Window + */ + public void setAD_InfoWindow_ID (int AD_InfoWindow_ID); + + /** Get Info Window. + * Info and search/select Window + */ + public int getAD_InfoWindow_ID(); + + public org.compiere.model.I_AD_InfoWindow getAD_InfoWindow() throws RuntimeException; + /** Column name AD_Menu_ID */ public static final String COLUMNNAME_AD_Menu_ID = "AD_Menu_ID"; diff --git a/org.adempiere.base/src/org/compiere/model/MOrder.java b/org.adempiere.base/src/org/compiere/model/MOrder.java index 2174f90b0a..44da00ff9f 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrder.java +++ b/org.adempiere.base/src/org/compiere/model/MOrder.java @@ -808,7 +808,7 @@ public class MOrder extends X_C_Order implements DocAction +" WHERE iol.M_InOut_ID=M_InOut.M_InOut_ID" +" AND iol.C_OrderLine_ID=ol.C_OrderLine_ID" +" AND ol.C_Order_ID=?)"; - List list = new Query(getCtx(), I_M_InOut.Table_Name, whereClause, get_TrxName()) + List list = new Query(getCtx(), MInOut.Table_Name, whereClause, get_TrxName()) .setParameters(get_ID()) .setOrderBy("M_InOut_ID DESC") .list(); diff --git a/org.adempiere.base/src/org/compiere/model/MPackageExpDetail.java b/org.adempiere.base/src/org/compiere/model/MPackageExpDetail.java index 201aeea012..06bc61f6f9 100644 --- a/org.adempiere.base/src/org/compiere/model/MPackageExpDetail.java +++ b/org.adempiere.base/src/org/compiere/model/MPackageExpDetail.java @@ -119,6 +119,8 @@ public class MPackageExpDetail extends X_AD_Package_Exp_Detail return getAD_Workflow_ID(); } else if (TYPE_EntityType.equals(type)) { return getAD_EntityType_ID(); + } else if (TYPE_InfoWindow.equals(type)) { + return getAD_InfoWindow_ID(); } else { return 0; } diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_Package_Exp_Detail.java b/org.adempiere.base/src/org/compiere/model/X_AD_Package_Exp_Detail.java index 96ab9954a4..2d0386c5e5 100644 --- a/org.adempiere.base/src/org/compiere/model/X_AD_Package_Exp_Detail.java +++ b/org.adempiere.base/src/org/compiere/model/X_AD_Package_Exp_Detail.java @@ -30,7 +30,7 @@ public class X_AD_Package_Exp_Detail extends PO implements I_AD_Package_Exp_Deta /** * */ - private static final long serialVersionUID = 20181104L; + private static final long serialVersionUID = 20181112L; /** Standard Constructor */ public X_AD_Package_Exp_Detail (Properties ctx, int AD_Package_Exp_Detail_ID, String trxName) @@ -154,6 +154,34 @@ public class X_AD_Package_Exp_Detail extends PO implements I_AD_Package_Exp_Deta return ii.intValue(); } + public org.compiere.model.I_AD_InfoWindow getAD_InfoWindow() throws RuntimeException + { + return (org.compiere.model.I_AD_InfoWindow)MTable.get(getCtx(), org.compiere.model.I_AD_InfoWindow.Table_Name) + .getPO(getAD_InfoWindow_ID(), get_TrxName()); } + + /** Set Info Window. + @param AD_InfoWindow_ID + Info and search/select Window + */ + public void setAD_InfoWindow_ID (int AD_InfoWindow_ID) + { + if (AD_InfoWindow_ID < 1) + set_ValueNoCheck (COLUMNNAME_AD_InfoWindow_ID, null); + else + set_ValueNoCheck (COLUMNNAME_AD_InfoWindow_ID, Integer.valueOf(AD_InfoWindow_ID)); + } + + /** Get Info Window. + @return Info and search/select Window + */ + public int getAD_InfoWindow_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_InfoWindow_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + public org.compiere.model.I_AD_Menu getAD_Menu() throws RuntimeException { return (org.compiere.model.I_AD_Menu)MTable.get(getCtx(), org.compiere.model.I_AD_Menu.Table_Name) @@ -915,6 +943,8 @@ public class X_AD_Package_Exp_Detail extends PO implements I_AD_Package_Exp_Deta public static final String TYPE_EntityType = "ET"; /** SQL Mandatory = SQM */ public static final String TYPE_SQLMandatory = "SQM"; + /** Info Window = IW */ + public static final String TYPE_InfoWindow = "IW"; /** Set Type. @param Type Type of Validation (SQL, Java Script, Java Language) diff --git a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java index a69b64d256..5c3be7d46c 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java @@ -60,7 +60,7 @@ public class MPrintFormat extends X_AD_PrintFormat /** * */ - private static final long serialVersionUID = 5563074831750686572L; + private static final long serialVersionUID = 2979978408305853342L; /** * Public Constructor. @@ -650,6 +650,7 @@ public class MPrintFormat extends X_AD_PrintFormat } // createFromTable /** + * * Create MPrintFormat for Table * @param ctx context * @param AD_Table_ID table @@ -657,12 +658,25 @@ public class MPrintFormat extends X_AD_PrintFormat * @return print format */ static public MPrintFormat createFromTable (Properties ctx, - int AD_Table_ID, int AD_PrintFormat_ID) + int AD_Table_ID, int AD_PrintFormat_ID) { + return createFromTable(ctx, AD_Table_ID, AD_PrintFormat_ID, null); + } + + /** + * Create MPrintFormat for Table + * @param ctx context + * @param AD_Table_ID table + * @param AD_PrintFormat_ID 0 or existing PrintFormat + * @param trxName the transaction + * @return print format + */ + static public MPrintFormat createFromTable (Properties ctx, + int AD_Table_ID, int AD_PrintFormat_ID, String trxName) { int AD_Client_ID = Env.getAD_Client_ID(ctx); if (s_log.isLoggable(Level.INFO)) s_log.info ("AD_Table_ID=" + AD_Table_ID + " - AD_Client_ID=" + AD_Client_ID); - MPrintFormat pf = new MPrintFormat(ctx, AD_PrintFormat_ID, null); + MPrintFormat pf = new MPrintFormat(ctx, AD_PrintFormat_ID, trxName); pf.setAD_Table_ID (AD_Table_ID); // Get Info @@ -682,7 +696,7 @@ public class MPrintFormat extends X_AD_PrintFormat ResultSet rs = null; try { - pstmt = DB.prepareStatement(sql, null); + pstmt = DB.prepareStatement(sql, trxName); pstmt.setInt(1, AD_Table_ID); pstmt.setInt(2, AD_Client_ID); rs = pstmt.executeQuery(); diff --git a/org.adempiere.install/src/org/compiere/install/ConfigVM.java b/org.adempiere.install/src/org/compiere/install/ConfigVM.java index 4c2764b0fd..357ca9a9ce 100644 --- a/org.adempiere.install/src/org/compiere/install/ConfigVM.java +++ b/org.adempiere.install/src/org/compiere/install/ConfigVM.java @@ -46,8 +46,6 @@ public class ConfigVM extends Config // Java Home, e.g. D:\j2sdk1.4.1\jre String javaHome = System.getProperty("java.home"); log.fine(javaHome); - if (javaHome.endsWith("jre")) - javaHome = javaHome.substring(0, javaHome.length()-4); p_data.setJavaHome(javaHome); } // init diff --git a/org.adempiere.payment.processor/buckminster.cspex b/org.adempiere.payment.processor/buckminster.cspex deleted file mode 100644 index ecfc6ce11a..0000000000 --- a/org.adempiere.payment.processor/buckminster.cspex +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/org.adempiere.payment.processor/copyjars.xml b/org.adempiere.payment.processor/copyjars.xml deleted file mode 100644 index c9b8ba83ea..0000000000 --- a/org.adempiere.payment.processor/copyjars.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/org.adempiere.pipo.handlers/plugin.xml b/org.adempiere.pipo.handlers/plugin.xml index 20e921045b..898e6fb806 100644 --- a/org.adempiere.pipo.handlers/plugin.xml +++ b/org.adempiere.pipo.handlers/plugin.xml @@ -207,7 +207,27 @@ - + + + + + + + + + + + diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/InfoColumnElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/InfoColumnElementHandler.java new file mode 100644 index 0000000000..d837a6ecf8 --- /dev/null +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/InfoColumnElementHandler.java @@ -0,0 +1,155 @@ +/*********************************************************************** + * This file is part of iDempiere ERP Open Source * + * http://www.idempiere.org * + * * + * Copyright (C) Contributors * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Carlos Ruiz (globalqss) - sponsored by FH * + **********************************************************************/ + +package org.adempiere.pipo2.handler; + +import java.util.List; +import java.util.logging.Level; + +import javax.xml.transform.sax.TransformerHandler; + +import org.adempiere.pipo2.AbstractElementHandler; +import org.adempiere.pipo2.Element; +import org.adempiere.pipo2.ElementHandler; +import org.adempiere.pipo2.PIPOContext; +import org.adempiere.pipo2.PackOut; +import org.adempiere.pipo2.PoExporter; +import org.adempiere.pipo2.PoFiller; +import org.adempiere.pipo2.exception.POSaveFailedException; +import org.compiere.model.I_AD_Element; +import org.compiere.model.I_AD_InfoColumn; +import org.compiere.model.I_AD_InfoWindow; +import org.compiere.model.X_AD_InfoColumn; +import org.compiere.model.X_AD_Package_Imp_Detail; +import org.compiere.util.Env; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.AttributesImpl; + +public class InfoColumnElementHandler extends AbstractElementHandler { + + public void startElement(PIPOContext ctx, Element element) throws SAXException { + List excludes = defaultExcludeList(X_AD_InfoColumn.Table_Name); + + String entitytype = getStringValue(element, "EntityType"); + if (isProcessElement(ctx.ctx, entitytype)) { + if (isParentDefer(element, I_AD_InfoWindow.Table_Name)) { + element.defer = true; + return; + } + + X_AD_InfoColumn mInfoColumn = findPO(ctx, element); + if (mInfoColumn == null) { + mInfoColumn = new X_AD_InfoColumn(ctx.ctx, 0, getTrxName(ctx)); + } + PoFiller filler = new PoFiller(ctx, mInfoColumn, element, this); + + List notfounds = filler.autoFill(excludes); + if (notfounds.size() > 0) { + element.defer = true; + element.unresolved = notfounds.toString(); + return; + } + + element.recordId = mInfoColumn.get_ID(); + if (mInfoColumn.is_new() || mInfoColumn.is_Changed()) { + X_AD_Package_Imp_Detail impDetail = createImportDetail(ctx, element.qName, X_AD_InfoColumn.Table_Name, X_AD_InfoColumn.Table_ID); + String action = null; + if (!mInfoColumn.is_new()) { + backupRecord(ctx, impDetail.getAD_Package_Imp_Detail_ID(), X_AD_InfoColumn.Table_Name, mInfoColumn); + action = "Update"; + } else { + action = "New"; + } + if (mInfoColumn.save(getTrxName(ctx)) == true) { + logImportDetail(ctx, impDetail, 1, mInfoColumn.getColumnName(), mInfoColumn.get_ID(), action); + element.recordId = mInfoColumn.get_ID(); + } else { + logImportDetail(ctx, impDetail, 0, mInfoColumn.getColumnName(), mInfoColumn.get_ID(), action); + throw new POSaveFailedException("Failed to save InfoColumn " + mInfoColumn.getColumnName()); + } + } + } else { + element.skip = true; + } + } + + public void endElement(PIPOContext ctx, Element element) throws SAXException { + } + + public void create(PIPOContext ctx, TransformerHandler document) throws SAXException { + int AD_InfoColumn_ID = Env.getContextAsInt(ctx.ctx, X_AD_InfoColumn.COLUMNNAME_AD_InfoColumn_ID); + if (ctx.packOut.isExported(X_AD_InfoColumn.COLUMNNAME_AD_InfoColumn_ID+"|"+AD_InfoColumn_ID)) + return; + + X_AD_InfoColumn m_InfoColumn = new X_AD_InfoColumn(ctx.ctx, AD_InfoColumn_ID, getTrxName(ctx)); + + if (m_InfoColumn.getAD_Element_ID() > 0) { + PackOut packOut = ctx.packOut; + ElementHandler handler = packOut.getHandler(I_AD_Element.Table_Name); + try { + handler.packOut(packOut,document,null,m_InfoColumn.getAD_Element_ID()); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + if (!isPackOutElement(ctx, m_InfoColumn)) + return; + + verifyPackOutRequirement(m_InfoColumn); + + AttributesImpl atts = new AttributesImpl(); + addTypeName(atts, "table"); + document.startElement("", "", I_AD_InfoColumn.Table_Name, atts); + createInfoColumnBinding(ctx, document, m_InfoColumn); + + PackOut packOut = ctx.packOut; + packOut.getCtx().ctx.put("Table_Name",I_AD_InfoColumn.Table_Name); + try { + new CommonTranslationHandler().packOut(packOut,document,null,m_InfoColumn.get_ID()); + } catch(Exception e) { + if (log.isLoggable(Level.INFO)) log.info(e.toString()); + } + + document.endElement("", "", I_AD_InfoColumn.Table_Name); + } + + private void createInfoColumnBinding(PIPOContext ctx, TransformerHandler document, X_AD_InfoColumn m_InfoColumn) { + + PoExporter filler = new PoExporter(ctx, document, m_InfoColumn); + List excludes = defaultExcludeList(X_AD_InfoColumn.Table_Name); + + if (m_InfoColumn.getAD_InfoColumn_ID() <= PackOut.MAX_OFFICIAL_ID) + filler.add("AD_InfoColumn_ID", new AttributesImpl()); + filler.export(excludes); + } + + @Override + public void packOut(PackOut packout, TransformerHandler packoutHandler, TransformerHandler docHandler, int recordId) throws Exception { + Env.setContext(packout.getCtx().ctx, I_AD_InfoColumn.COLUMNNAME_AD_InfoColumn_ID, recordId); + create(packout.getCtx(), packoutHandler); + packout.getCtx().ctx.remove(I_AD_InfoColumn.COLUMNNAME_AD_InfoColumn_ID); + } +} diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/InfoProcessElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/InfoProcessElementHandler.java new file mode 100644 index 0000000000..3fc4fc47dd --- /dev/null +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/InfoProcessElementHandler.java @@ -0,0 +1,143 @@ +/*********************************************************************** + * This file is part of iDempiere ERP Open Source * + * http://www.idempiere.org * + * * + * Copyright (C) Contributors * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Carlos Ruiz (globalqss) - sponsored by FH * + **********************************************************************/ + +package org.adempiere.pipo2.handler; + +import java.util.List; +import java.util.logging.Level; + +import javax.xml.transform.sax.TransformerHandler; + +import org.adempiere.pipo2.AbstractElementHandler; +import org.adempiere.pipo2.Element; +import org.adempiere.pipo2.PIPOContext; +import org.adempiere.pipo2.PackOut; +import org.adempiere.pipo2.PoExporter; +import org.adempiere.pipo2.PoFiller; +import org.adempiere.pipo2.exception.POSaveFailedException; +import org.compiere.model.I_AD_InfoProcess; +import org.compiere.model.I_AD_InfoWindow; +import org.compiere.model.X_AD_InfoProcess; +import org.compiere.model.X_AD_Package_Imp_Detail; +import org.compiere.util.Env; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.AttributesImpl; + +public class InfoProcessElementHandler extends AbstractElementHandler { + + public void startElement(PIPOContext ctx, Element element) throws SAXException { + List excludes = defaultExcludeList(X_AD_InfoProcess.Table_Name); + + String entitytype = getStringValue(element, "EntityType"); + if (isProcessElement(ctx.ctx, entitytype)) { + if (isParentDefer(element, I_AD_InfoWindow.Table_Name)) { + element.defer = true; + return; + } + + X_AD_InfoProcess mInfoProcess = findPO(ctx, element); + if (mInfoProcess == null) { + mInfoProcess = new X_AD_InfoProcess(ctx.ctx, 0, getTrxName(ctx)); + } + PoFiller filler = new PoFiller(ctx, mInfoProcess, element, this); + + List notfounds = filler.autoFill(excludes); + if (notfounds.size() > 0) { + element.defer = true; + element.unresolved = notfounds.toString(); + return; + } + + element.recordId = mInfoProcess.get_ID(); + if (mInfoProcess.is_new() || mInfoProcess.is_Changed()) { + X_AD_Package_Imp_Detail impDetail = createImportDetail(ctx, element.qName, X_AD_InfoProcess.Table_Name, X_AD_InfoProcess.Table_ID); + String action = null; + if (!mInfoProcess.is_new()) { + backupRecord(ctx, impDetail.getAD_Package_Imp_Detail_ID(), X_AD_InfoProcess.Table_Name, mInfoProcess); + action = "Update"; + } else { + action = "New"; + } + if (mInfoProcess.save(getTrxName(ctx)) == true) { + logImportDetail(ctx, impDetail, 1, mInfoProcess.toString(), mInfoProcess.get_ID(), action); + element.recordId = mInfoProcess.get_ID(); + } else { + logImportDetail(ctx, impDetail, 0, mInfoProcess.toString(), mInfoProcess.get_ID(), action); + throw new POSaveFailedException("Failed to save InfoProcess " + mInfoProcess.toString()); + } + } + } else { + element.skip = true; + } + } + + public void endElement(PIPOContext ctx, Element element) throws SAXException { + } + + public void create(PIPOContext ctx, TransformerHandler document) throws SAXException { + int AD_InfoProcess_ID = Env.getContextAsInt(ctx.ctx, X_AD_InfoProcess.COLUMNNAME_AD_InfoProcess_ID); + if (ctx.packOut.isExported(X_AD_InfoProcess.COLUMNNAME_AD_InfoProcess_ID+"|"+AD_InfoProcess_ID)) + return; + + X_AD_InfoProcess m_InfoProcess = new X_AD_InfoProcess(ctx.ctx, AD_InfoProcess_ID, getTrxName(ctx)); + + if (!isPackOutElement(ctx, m_InfoProcess)) + return; + + verifyPackOutRequirement(m_InfoProcess); + + AttributesImpl atts = new AttributesImpl(); + addTypeName(atts, "table"); + document.startElement("", "", I_AD_InfoProcess.Table_Name, atts); + createInfoProcessBinding(ctx, document, m_InfoProcess); + + PackOut packOut = ctx.packOut; + packOut.getCtx().ctx.put("Table_Name",I_AD_InfoProcess.Table_Name); + try { + new CommonTranslationHandler().packOut(packOut,document,null,m_InfoProcess.get_ID()); + } catch(Exception e) { + if (log.isLoggable(Level.INFO)) log.info(e.toString()); + } + + document.endElement("", "", I_AD_InfoProcess.Table_Name); + } + + private void createInfoProcessBinding(PIPOContext ctx, TransformerHandler document, X_AD_InfoProcess m_InfoProcess) { + + PoExporter filler = new PoExporter(ctx, document, m_InfoProcess); + List excludes = defaultExcludeList(X_AD_InfoProcess.Table_Name); + + if (m_InfoProcess.getAD_InfoProcess_ID() <= PackOut.MAX_OFFICIAL_ID) + filler.add("AD_InfoProcess_ID", new AttributesImpl()); + filler.export(excludes); + } + + @Override + public void packOut(PackOut packout, TransformerHandler packoutHandler, TransformerHandler docHandler, int recordId) throws Exception { + Env.setContext(packout.getCtx().ctx, I_AD_InfoProcess.COLUMNNAME_AD_InfoProcess_ID, recordId); + create(packout.getCtx(), packoutHandler); + packout.getCtx().ctx.remove(I_AD_InfoProcess.COLUMNNAME_AD_InfoProcess_ID); + } +} diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/InfoRelatedElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/InfoRelatedElementHandler.java new file mode 100644 index 0000000000..906f13654b --- /dev/null +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/InfoRelatedElementHandler.java @@ -0,0 +1,143 @@ +/*********************************************************************** + * This file is part of iDempiere ERP Open Source * + * http://www.idempiere.org * + * * + * Copyright (C) Contributors * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Carlos Ruiz (globalqss) - sponsored by FH * + **********************************************************************/ + +package org.adempiere.pipo2.handler; + +import java.util.List; +import java.util.logging.Level; + +import javax.xml.transform.sax.TransformerHandler; + +import org.adempiere.pipo2.AbstractElementHandler; +import org.adempiere.pipo2.Element; +import org.adempiere.pipo2.PIPOContext; +import org.adempiere.pipo2.PackOut; +import org.adempiere.pipo2.PoExporter; +import org.adempiere.pipo2.PoFiller; +import org.adempiere.pipo2.exception.POSaveFailedException; +import org.compiere.model.I_AD_InfoRelated; +import org.compiere.model.I_AD_InfoWindow; +import org.compiere.model.X_AD_InfoRelated; +import org.compiere.model.X_AD_Package_Imp_Detail; +import org.compiere.util.Env; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.AttributesImpl; + +public class InfoRelatedElementHandler extends AbstractElementHandler { + + public void startElement(PIPOContext ctx, Element element) throws SAXException { + List excludes = defaultExcludeList(X_AD_InfoRelated.Table_Name); + + String entitytype = getStringValue(element, "EntityType"); + if (isProcessElement(ctx.ctx, entitytype)) { + if (isParentDefer(element, I_AD_InfoWindow.Table_Name)) { + element.defer = true; + return; + } + + X_AD_InfoRelated mInfoRelated = findPO(ctx, element); + if (mInfoRelated == null) { + mInfoRelated = new X_AD_InfoRelated(ctx.ctx, 0, getTrxName(ctx)); + } + PoFiller filler = new PoFiller(ctx, mInfoRelated, element, this); + + List notfounds = filler.autoFill(excludes); + if (notfounds.size() > 0) { + element.defer = true; + element.unresolved = notfounds.toString(); + return; + } + + element.recordId = mInfoRelated.get_ID(); + if (mInfoRelated.is_new() || mInfoRelated.is_Changed()) { + X_AD_Package_Imp_Detail impDetail = createImportDetail(ctx, element.qName, X_AD_InfoRelated.Table_Name, X_AD_InfoRelated.Table_ID); + String action = null; + if (!mInfoRelated.is_new()) { + backupRecord(ctx, impDetail.getAD_Package_Imp_Detail_ID(), X_AD_InfoRelated.Table_Name, mInfoRelated); + action = "Update"; + } else { + action = "New"; + } + if (mInfoRelated.save(getTrxName(ctx)) == true) { + logImportDetail(ctx, impDetail, 1, mInfoRelated.toString(), mInfoRelated.get_ID(), action); + element.recordId = mInfoRelated.get_ID(); + } else { + logImportDetail(ctx, impDetail, 0, mInfoRelated.toString(), mInfoRelated.get_ID(), action); + throw new POSaveFailedException("Failed to save InfoRelated " + mInfoRelated.toString()); + } + } + } else { + element.skip = true; + } + } + + public void endElement(PIPOContext ctx, Element element) throws SAXException { + } + + public void create(PIPOContext ctx, TransformerHandler document) throws SAXException { + int AD_InfoRelated_ID = Env.getContextAsInt(ctx.ctx, X_AD_InfoRelated.COLUMNNAME_AD_InfoRelated_ID); + if (ctx.packOut.isExported(X_AD_InfoRelated.COLUMNNAME_AD_InfoRelated_ID+"|"+AD_InfoRelated_ID)) + return; + + X_AD_InfoRelated m_InfoRelated = new X_AD_InfoRelated(ctx.ctx, AD_InfoRelated_ID, getTrxName(ctx)); + + if (!isPackOutElement(ctx, m_InfoRelated)) + return; + + verifyPackOutRequirement(m_InfoRelated); + + AttributesImpl atts = new AttributesImpl(); + addTypeName(atts, "table"); + document.startElement("", "", I_AD_InfoRelated.Table_Name, atts); + createInfoRelatedBinding(ctx, document, m_InfoRelated); + + PackOut packOut = ctx.packOut; + packOut.getCtx().ctx.put("Table_Name",I_AD_InfoRelated.Table_Name); + try { + new CommonTranslationHandler().packOut(packOut,document,null,m_InfoRelated.get_ID()); + } catch(Exception e) { + if (log.isLoggable(Level.INFO)) log.info(e.toString()); + } + + document.endElement("", "", I_AD_InfoRelated.Table_Name); + } + + private void createInfoRelatedBinding(PIPOContext ctx, TransformerHandler document, X_AD_InfoRelated m_InfoRelated) { + + PoExporter filler = new PoExporter(ctx, document, m_InfoRelated); + List excludes = defaultExcludeList(X_AD_InfoRelated.Table_Name); + + if (m_InfoRelated.getAD_InfoRelated_ID() <= PackOut.MAX_OFFICIAL_ID) + filler.add("AD_InfoRelated_ID", new AttributesImpl()); + filler.export(excludes); + } + + @Override + public void packOut(PackOut packout, TransformerHandler packoutHandler, TransformerHandler docHandler, int recordId) throws Exception { + Env.setContext(packout.getCtx().ctx, I_AD_InfoRelated.COLUMNNAME_AD_InfoRelated_ID, recordId); + create(packout.getCtx(), packoutHandler); + packout.getCtx().ctx.remove(I_AD_InfoRelated.COLUMNNAME_AD_InfoRelated_ID); + } +} diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/InfoWindowAccessElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/InfoWindowAccessElementHandler.java new file mode 100644 index 0000000000..d03a4dc4c0 --- /dev/null +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/InfoWindowAccessElementHandler.java @@ -0,0 +1,96 @@ +/*********************************************************************** + * This file is part of iDempiere ERP Open Source * + * http://www.idempiere.org * + * * + * Copyright (C) Contributors * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Carlos Ruiz (globalqss) - sponsored by FH * + **********************************************************************/ + +package org.adempiere.pipo2.handler; + +import java.util.List; + +import javax.xml.transform.sax.TransformerHandler; + +import org.adempiere.pipo2.AbstractElementHandler; +import org.adempiere.pipo2.Element; +import org.adempiere.pipo2.PIPOContext; +import org.adempiere.pipo2.PackOut; +import org.adempiere.pipo2.PoExporter; +import org.adempiere.pipo2.PoFiller; +import org.compiere.model.I_AD_InfoWindow_Access; +import org.compiere.model.Query; +import org.compiere.model.X_AD_InfoWindow; +import org.compiere.model.X_AD_InfoWindow_Access; +import org.compiere.model.X_AD_Role; +import org.compiere.util.Env; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.AttributesImpl; + +public class InfoWindowAccessElementHandler extends AbstractElementHandler { + + public void startElement(PIPOContext ctx, Element element) throws SAXException { + List excludes = defaultExcludeList(X_AD_InfoWindow_Access.Table_Name); + + X_AD_InfoWindow_Access po = findPO(ctx, element); + if (po == null) { + po = new X_AD_InfoWindow_Access(ctx.ctx, 0, getTrxName(ctx)); + } + PoFiller filler = new PoFiller(ctx, po, element, this); + List notfounds = filler.autoFill(excludes); + if (notfounds.size() > 0) { + element.defer = true; + element.unresolved = notfounds.toString(); + return; + } + po.saveEx(); + } + + public void endElement(PIPOContext ctx, Element element) throws SAXException { + } + + public void create(PIPOContext ctx, TransformerHandler document) throws SAXException { + int AD_InfoWindow_ID = Env.getContextAsInt(ctx.ctx, X_AD_InfoWindow.COLUMNNAME_AD_InfoWindow_ID); + int AD_Role_ID = Env.getContextAsInt(ctx.ctx, X_AD_Role.COLUMNNAME_AD_Role_ID); + Query query = new Query(ctx.ctx, "AD_InfoWindow_Access", "AD_Role_ID=? AND AD_InfoWindow_ID=?", getTrxName(ctx)); + X_AD_InfoWindow_Access po = query.setParameters(AD_Role_ID, AD_InfoWindow_ID).first(); + if (po != null) { + if (!isPackOutElement(ctx, po)) + return; + verifyPackOutRequirement(po); + AttributesImpl atts = new AttributesImpl(); + addTypeName(atts, "table"); + document.startElement("", "", I_AD_InfoWindow_Access.Table_Name, atts); + createInfoWindowAccessBinding(ctx, document, po); + document.endElement("", "", I_AD_InfoWindow_Access.Table_Name); + } + } + + private void createInfoWindowAccessBinding(PIPOContext ctx, TransformerHandler document, X_AD_InfoWindow_Access po) { + PoExporter filler = new PoExporter(ctx, document, po); + List excludes = defaultExcludeList(X_AD_InfoWindow_Access.Table_Name); + filler.export(excludes); + } + + @Override + public void packOut(PackOut packout, TransformerHandler packoutHandler, TransformerHandler docHandler, int recordId) throws Exception { + create(packout.getCtx(), packoutHandler); + } +} diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/InfoWindowElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/InfoWindowElementHandler.java new file mode 100644 index 0000000000..fef3962b43 --- /dev/null +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/InfoWindowElementHandler.java @@ -0,0 +1,226 @@ +/*********************************************************************** + * This file is part of iDempiere ERP Open Source * + * http://www.idempiere.org * + * * + * Copyright (C) Contributors * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Carlos Ruiz (globalqss) - sponsored by FH * + **********************************************************************/ + +package org.adempiere.pipo2.handler; + +import java.util.List; +import java.util.logging.Level; + +import javax.xml.transform.sax.TransformerHandler; + +import org.adempiere.exceptions.AdempiereException; +import org.adempiere.pipo2.AbstractElementHandler; +import org.adempiere.pipo2.Element; +import org.adempiere.pipo2.ElementHandler; +import org.adempiere.pipo2.PIPOContext; +import org.adempiere.pipo2.PackOut; +import org.adempiere.pipo2.PoExporter; +import org.adempiere.pipo2.PoFiller; +import org.adempiere.pipo2.exception.POSaveFailedException; +import org.compiere.model.I_AD_InfoWindow; +import org.compiere.model.I_AD_Process; +import org.compiere.model.I_AD_Reference; +import org.compiere.model.I_AD_Table; +import org.compiere.model.I_AD_Val_Rule; +import org.compiere.model.Query; +import org.compiere.model.X_AD_InfoColumn; +import org.compiere.model.X_AD_InfoProcess; +import org.compiere.model.X_AD_InfoRelated; +import org.compiere.model.X_AD_InfoWindow; +import org.compiere.model.X_AD_Package_Imp_Detail; +import org.compiere.util.Env; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.AttributesImpl; + +public class InfoWindowElementHandler extends AbstractElementHandler { + + private InfoColumnElementHandler infoColumnHandler = new InfoColumnElementHandler(); + private InfoProcessElementHandler infoProcessHandler = new InfoProcessElementHandler(); + private InfoRelatedElementHandler infoRelatedHandler = new InfoRelatedElementHandler(); + + public void startElement(PIPOContext ctx, Element element) throws SAXException { + String entitytype = getStringValue(element, "EntityType"); + if (isProcessElement(ctx.ctx, entitytype)) { + X_AD_InfoWindow mInfoWindow = findPO(ctx, element); + if (mInfoWindow == null) { + mInfoWindow = new X_AD_InfoWindow(ctx.ctx, 0, getTrxName(ctx)); + } + PoFiller filler = new PoFiller(ctx, mInfoWindow, element, this); + List excludes = defaultExcludeList(X_AD_InfoWindow.Table_Name); + + List notfounds = filler.autoFill(excludes); + if (notfounds.size() > 0) { + element.defer = true; + element.unresolved = notfounds.toString(); + return; + } + + element.recordId = mInfoWindow.get_ID(); + if (mInfoWindow.is_new() || mInfoWindow.is_Changed()) { + X_AD_Package_Imp_Detail impDetail = createImportDetail(ctx, element.qName, X_AD_InfoWindow.Table_Name, X_AD_InfoWindow.Table_ID); + String action = null; + if (!mInfoWindow.is_new()) { + backupRecord(ctx, impDetail.getAD_Package_Imp_Detail_ID(), X_AD_InfoWindow.Table_Name, mInfoWindow); + action = "Update"; + } else { + action = "New"; + } + + if (mInfoWindow.save(getTrxName(ctx)) == true) { + logImportDetail(ctx, impDetail, 1, mInfoWindow.getName(), mInfoWindow.get_ID(), action); + element.recordId = mInfoWindow.get_ID(); + element.requireRoleAccessUpdate = true; + } else { + logImportDetail(ctx, impDetail, 0, mInfoWindow.getName(), mInfoWindow.get_ID(), action); + throw new POSaveFailedException("Failed to save InfoWindow " + mInfoWindow.getName()); + } + } + } else { + element.skip = true; + } + } + + public void endElement(PIPOContext ctx, Element element) throws SAXException { + } + + public void create(PIPOContext ctx, TransformerHandler document) throws SAXException { + int AD_InfoWindow_ID = Env.getContextAsInt(ctx.ctx, "AD_InfoWindow_ID"); + if (ctx.packOut.isExported("AD_InfoWindow_ID"+"|"+AD_InfoWindow_ID)) + return; + + PackOut packOut = ctx.packOut; + + X_AD_InfoWindow m_InfoWindow = new X_AD_InfoWindow(ctx.ctx, AD_InfoWindow_ID, getTrxName(ctx)); + + AttributesImpl atts = new AttributesImpl(); + + try { + if (m_InfoWindow.getAD_Table_ID() > 0) { + ElementHandler handler = packOut.getHandler(I_AD_Table.Table_Name); + handler.packOut(packOut,document,null,m_InfoWindow.getAD_Table_ID()); + } + + boolean createElement = isPackOutElement(ctx, m_InfoWindow); + + if (createElement) { + verifyPackOutRequirement(m_InfoWindow); + addTypeName(atts, "table"); + document.startElement("", "", I_AD_InfoWindow.Table_Name, atts); + createInfoWindowBinding(ctx, document, m_InfoWindow); + + packOut.getCtx().ctx.put("Table_Name",I_AD_InfoWindow.Table_Name); + try { + new CommonTranslationHandler().packOut(packOut,document,null,m_InfoWindow.get_ID()); + } catch(Exception e) { + if (log.isLoggable(Level.INFO)) log.info(e.toString()); + } + + } + + Query queryCols = new Query(ctx.ctx, "AD_InfoColumn", "AD_InfoWindow_ID = ?", getTrxName(ctx)); + List infoColumnlist = queryCols.setParameters(AD_InfoWindow_ID).list(); + for (X_AD_InfoColumn infoColumn : infoColumnlist) { + if (infoColumn.getAD_Reference_ID()>0) + { + ElementHandler handler = packOut.getHandler(I_AD_Reference.Table_Name); + handler.packOut(packOut,document,null,infoColumn.getAD_Reference_ID()); + } + + if (infoColumn.getAD_Reference_Value_ID()>0) + { + ElementHandler handler = packOut.getHandler(I_AD_Reference.Table_Name); + handler.packOut(packOut,document,null,infoColumn.getAD_Reference_Value_ID()); + } + + if (infoColumn.getAD_Val_Rule_ID() > 0) + { + ElementHandler handler = packOut.getHandler(I_AD_Val_Rule.Table_Name); + handler.packOut(packOut,document,null,infoColumn.getAD_Val_Rule_ID()); + } + + createInfoColumn(ctx, document, infoColumn.getAD_InfoColumn_ID()); + } + + Query queryProc= new Query(ctx.ctx, "AD_InfoProcess", "AD_InfoWindow_ID = ?", getTrxName(ctx)); + List infoProcesslist = queryProc.setParameters(AD_InfoWindow_ID).list(); + for (X_AD_InfoProcess infoProcess : infoProcesslist) { + if (infoProcess.getAD_Process_ID()>0) + { + ElementHandler handler = packOut.getHandler(I_AD_Process.Table_Name); + handler.packOut(packOut,document,null,infoProcess.getAD_Process_ID()); + } + createInfoProcess(ctx, document, infoProcess.getAD_InfoProcess_ID()); + } + + Query queryRel= new Query(ctx.ctx, "AD_InfoRelated", "AD_InfoWindow_ID = ?", getTrxName(ctx)); + List infoRelatedlist = queryRel.setParameters(AD_InfoWindow_ID).list(); + for (X_AD_InfoRelated infoRelated : infoRelatedlist) { + createInfoRelated(ctx, document, infoRelated.getAD_InfoRelated_ID()); + } + + if (createElement) { + document.endElement("", "", X_AD_InfoWindow.Table_Name); + } + } catch (Exception e) { + throw new AdempiereException(e); + } + + } + + private void createInfoColumn(PIPOContext ctx, TransformerHandler document, int AD_InfoColumn_ID) throws SAXException { + Env.setContext(ctx.ctx, X_AD_InfoColumn.COLUMNNAME_AD_InfoColumn_ID, AD_InfoColumn_ID); + infoColumnHandler.create(ctx, document); + ctx.ctx.remove(X_AD_InfoColumn.COLUMNNAME_AD_InfoColumn_ID); + } + + private void createInfoProcess(PIPOContext ctx, TransformerHandler document, int AD_InfoProcess_ID) throws SAXException { + Env.setContext(ctx.ctx, X_AD_InfoProcess.COLUMNNAME_AD_InfoProcess_ID, AD_InfoProcess_ID); + infoProcessHandler.create(ctx, document); + ctx.ctx.remove(X_AD_InfoProcess.COLUMNNAME_AD_InfoProcess_ID); + } + + private void createInfoRelated(PIPOContext ctx, TransformerHandler document, int AD_InfoRelated_ID) throws SAXException { + Env.setContext(ctx.ctx, X_AD_InfoRelated.COLUMNNAME_AD_InfoRelated_ID, AD_InfoRelated_ID); + infoRelatedHandler.create(ctx, document); + ctx.ctx.remove(X_AD_InfoRelated.COLUMNNAME_AD_InfoRelated_ID); + } + + private void createInfoWindowBinding(PIPOContext ctx, TransformerHandler document, X_AD_InfoWindow m_InfoWindow) { + PoExporter filler = new PoExporter(ctx, document, m_InfoWindow); + List excludes = defaultExcludeList(X_AD_InfoWindow.Table_Name); + + if (m_InfoWindow.getAD_InfoWindow_ID() <= PackOut.MAX_OFFICIAL_ID) + filler.add("AD_InfoWindow_ID", new AttributesImpl()); + + filler.export(excludes); + } + + public void packOut(PackOut packout, TransformerHandler packoutHandler, TransformerHandler docHandler,int recordId) throws Exception + { + Env.setContext(packout.getCtx().ctx, "AD_InfoWindow_ID", recordId); + this.create(packout.getCtx(), packoutHandler); + packout.getCtx().ctx.remove("AD_InfoWindow_ID"); + } +} diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/MenuElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/MenuElementHandler.java index edbbff4eab..8d1c0288c6 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/MenuElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/MenuElementHandler.java @@ -34,6 +34,7 @@ import org.adempiere.pipo2.PackOut; import org.adempiere.pipo2.PoFiller; import org.adempiere.pipo2.ReferenceUtils; import org.compiere.model.I_AD_Form; +import org.compiere.model.I_AD_InfoWindow; import org.compiere.model.I_AD_Menu; import org.compiere.model.I_AD_Process; import org.compiere.model.I_AD_Task; @@ -230,7 +231,7 @@ public class MenuElementHandler extends AbstractElementHandler { String sql = null; int AD_Tree_ID = getDefaultMenuTreeId(); sql = "SELECT A.Node_ID, B.AD_Menu_ID, B.Name, B.AD_WINDOW_ID, B.AD_WORKFLOW_ID, B.AD_TASK_ID, " - + "B.AD_PROCESS_ID, B.AD_FORM_ID, B.AD_WORKBENCH_ID " + + "B.AD_PROCESS_ID, B.AD_FORM_ID, B.AD_WORKBENCH_ID, B.AD_INFOWINDOW_ID " + "FROM AD_TreeNodeMM A, AD_Menu B " + "WHERE A.Node_ID = " + AD_Menu_ID + " AND A.Node_ID = B.AD_Menu_ID" + " AND A.AD_Tree_ID="+AD_Tree_ID; @@ -257,10 +258,11 @@ public class MenuElementHandler extends AbstractElementHandler { } if (rs.getInt("AD_WINDOW_ID") > 0 - || rs.getInt("AD_WORKFLOW_ID") > 0 - || rs.getInt("AD_TASK_ID") > 0 || rs.getInt("AD_PROCESS_ID") > 0 - || rs.getInt("AD_FORM_ID") > 0) { + || rs.getInt("AD_TASK_ID") > 0 + || rs.getInt("AD_FORM_ID") > 0 + || rs.getInt("AD_WORKFLOW_ID") > 0 + || rs.getInt("AD_INFOWINDOW_ID") > 0) { // Call CreateWindow. if (rs.getInt(X_AD_Package_Exp_Detail.COLUMNNAME_AD_Window_ID)>0) { @@ -286,6 +288,11 @@ public class MenuElementHandler extends AbstractElementHandler { ElementHandler handler = packOut.getHandler(I_AD_Workflow.Table_Name); handler.packOut(packOut,document,null,rs.getInt(X_AD_Package_Exp_Detail.COLUMNNAME_AD_Workflow_ID)); } + else if (rs.getInt(X_AD_Package_Exp_Detail.COLUMNNAME_AD_InfoWindow_ID) > 0) + { + ElementHandler handler = packOut.getHandler(I_AD_InfoWindow.Table_Name); + handler.packOut(packOut,document,null,rs.getInt(X_AD_Package_Exp_Detail.COLUMNNAME_AD_InfoWindow_ID)); + } // Call CreateModule because entry is a summary menu } else { createModule(ctx, document, rs.getInt("Node_ID")); @@ -306,7 +313,7 @@ public class MenuElementHandler extends AbstractElementHandler { String sql = null; int AD_Tree_ID = getDefaultMenuTreeId(); sql = "SELECT A.Node_ID, B.AD_Menu_ID, B.Name, B.AD_WINDOW_ID, B.AD_WORKFLOW_ID, B.AD_TASK_ID, " - + "B.AD_PROCESS_ID, B.AD_FORM_ID, B.AD_WORKBENCH_ID " + + "B.AD_PROCESS_ID, B.AD_FORM_ID, B.AD_WORKBENCH_ID, B.AD_INFOWINDOW_ID " + "FROM AD_TreeNodeMM A, AD_Menu B " + "WHERE A.Parent_ID = " + menu_id + " AND A.Node_ID = B.AD_Menu_ID" + " AND A.AD_Tree_ID="+AD_Tree_ID; @@ -326,10 +333,11 @@ public class MenuElementHandler extends AbstractElementHandler { document.startElement("", "", I_AD_Menu.Table_Name, atts); createMenuBinding(ctx, document, m_Menu); if (rs.getInt("AD_WINDOW_ID") > 0 - || rs.getInt("AD_WORKFLOW_ID") > 0 - || rs.getInt("AD_TASK_ID") > 0 || rs.getInt("AD_PROCESS_ID") > 0 - || rs.getInt("AD_FORM_ID") > 0) { + || rs.getInt("AD_TASK_ID") > 0 + || rs.getInt("AD_FORM_ID") > 0 + || rs.getInt("AD_WORKFLOW_ID") > 0 + || rs.getInt("AD_INFOWINDOW_ID") > 0) { // Call CreateWindow. if (rs.getInt(X_AD_Package_Exp_Detail.COLUMNNAME_AD_Window_ID)>0) { @@ -356,6 +364,11 @@ public class MenuElementHandler extends AbstractElementHandler { ElementHandler handler = packOut.getHandler("AD_Workflow"); handler.packOut(packOut,document,null,rs.getInt(X_AD_Package_Exp_Detail.COLUMNNAME_AD_Workflow_ID)); } + else if (rs.getInt(X_AD_Package_Exp_Detail.COLUMNNAME_AD_InfoWindow_ID) > 0) + { + ElementHandler handler = packOut.getHandler("AD_InfoWindow"); + handler.packOut(packOut,document,null,rs.getInt(X_AD_Package_Exp_Detail.COLUMNNAME_AD_InfoWindow_ID)); + } // Call CreateModule because entry is a summary menu } else { createModule(ctx, document, rs.getInt("Node_ID")); diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/RoleElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/RoleElementHandler.java index e209ea966f..837f49b4fc 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/RoleElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/RoleElementHandler.java @@ -34,6 +34,7 @@ import org.adempiere.pipo2.exception.POSaveFailedException; import org.compiere.model.I_AD_Role; import org.compiere.model.MRole; import org.compiere.model.X_AD_Form; +import org.compiere.model.X_AD_InfoWindow; import org.compiere.model.X_AD_Package_Exp_Detail; import org.compiere.model.X_AD_Package_Imp_Detail; import org.compiere.model.X_AD_Process; @@ -55,6 +56,7 @@ public class RoleElementHandler extends AbstractElementHandler { private FormAccessElementHandler formHandler = new FormAccessElementHandler(); private TaskAccessElementHandler taskHandler = new TaskAccessElementHandler(); private WorkflowAccessElementHandler workflowHandler = new WorkflowAccessElementHandler(); + private InfoWindowAccessElementHandler infoWindowHandler = new InfoWindowAccessElementHandler(); public void startElement(PIPOContext ctx, Element element) throws SAXException { @@ -240,6 +242,23 @@ public class RoleElementHandler extends AbstractElementHandler { } finally { DB.close(rs, pstmt); } + + // Process AD_InfoWindow_Access Values + sql = "SELECT AD_InfoWindow_ID, AD_Role_ID FROM AD_InfoWindow_Access WHERE AD_Role_ID= " + Role_id; + pstmt = null; + rs = null; + try { + pstmt = DB.prepareStatement(sql, getTrxName(ctx)); + rs = pstmt.executeQuery(); + while (rs.next()) { + createInfoWindowAccess(ctx, document, rs.getInt("AD_InfoWindow_ID"), rs.getInt("AD_Role_ID")); + } + } catch (Exception e) { + log.log(Level.SEVERE, "AD_InfoWindow_Access", e); + throw new DatabaseAccessException("Failed to export InfoWindow access."); + } finally { + DB.close(rs, pstmt); + } if (createElement) { document.endElement("", "", X_AD_Role.Table_Name); @@ -291,6 +310,15 @@ public class RoleElementHandler extends AbstractElementHandler { ctx.ctx.remove(X_AD_Role.COLUMNNAME_AD_Role_ID); } + private void createInfoWindowAccess(PIPOContext ctx, + TransformerHandler document, int AD_InfoWindow_ID, int AD_Role_ID) throws SAXException { + Env.setContext(ctx.ctx, X_AD_InfoWindow.COLUMNNAME_AD_InfoWindow_ID, AD_InfoWindow_ID); + Env.setContext(ctx.ctx, X_AD_Role.COLUMNNAME_AD_Role_ID, AD_Role_ID); + infoWindowHandler.create(ctx, document); + ctx.ctx.remove(X_AD_InfoWindow.COLUMNNAME_AD_InfoWindow_ID); + ctx.ctx.remove(X_AD_Role.COLUMNNAME_AD_Role_ID); + } + /* private void createUserRole(PIPOContext ctx, TransformerHandler document, int AD_User_ID, int AD_Role_ID, int AD_Org_ID) throws SAXException { diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java index 708948629d..0db87d3389 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java @@ -426,12 +426,14 @@ public class PackInHandler extends DefaultHandler { String fkConstraintSql = MColumn.getForeignKeyConstraintSql(md, catalog, schema, tableName, table, column, false); if (! Util.isEmpty(fkConstraintSql)) { + if (fkConstraintSql.toLowerCase().contains(" ad_sequence(ad_sequence_id)")) + fkConstraintSql = fkConstraintSql + "; COMMIT"; if (fkConstraintSql.indexOf(DB.SQLSTATEMENT_SEPARATOR) == -1) { DB.executeUpdate(fkConstraintSql, false, m_ctx.trx.getTrxName()); } else { String statements[] = fkConstraintSql.split(DB.SQLSTATEMENT_SEPARATOR); for (int i = 0; i < statements.length; i++) { - if (Util.isEmpty(statements[i])) + if (Util.isEmpty(statements[i], true)) continue; DB.executeUpdateEx(statements[i], m_ctx.trx.getTrxName()); } diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PackOutProcess.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PackOutProcess.java index d6ffe9d340..e7c267d197 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PackOutProcess.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PackOutProcess.java @@ -29,6 +29,7 @@ import java.util.logging.Level; import org.compiere.model.I_AD_EntityType; import org.compiere.model.I_AD_Form; import org.compiere.model.I_AD_ImpFormat; +import org.compiere.model.I_AD_InfoWindow; import org.compiere.model.I_AD_Menu; import org.compiere.model.I_AD_Message; import org.compiere.model.I_AD_ModelValidator; @@ -195,6 +196,8 @@ public class PackOutProcess extends SvrProcess return I_AD_ModelValidator.Table_Name; else if (X_AD_Package_Exp_Detail.TYPE_EntityType.equals(type)) return I_AD_EntityType.Table_Name; + else if (X_AD_Package_Exp_Detail.TYPE_InfoWindow.equals(type)) + return I_AD_InfoWindow.Table_Name; return type; } diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java index 8414308d7f..04d693f56c 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java @@ -303,7 +303,7 @@ public class PoFiller{ } else if (info.getColumnClass(index) == Timestamp.class) { setTimestamp(qName); }else if(DisplayType.TextLong == info.getColumnDisplayType(index)) {// export column from system have type is normal string, but import to system have this column but type is textlong (mean blob) - if (getStringValue (qName) != null || !isBlobOnPackinFile(qName)) { + if (getStringValue (qName) != null && !isBlobOnPackinFile(qName)) { setString(qName); }else { setBlob(qName); diff --git a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AbstractActivator.java b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AbstractActivator.java index 53f03f4b7a..9d049f8482 100644 --- a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AbstractActivator.java +++ b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AbstractActivator.java @@ -43,7 +43,7 @@ public abstract class AbstractActivator implements BundleActivator, ServiceTrack protected BundleContext context; protected ServiceTracker serviceTracker; protected IDictionaryService service; - private String trxName = ""; + private String trxName = null; private ProcessInfo m_processInfo = null; private IProcessUI m_processUI = null; @@ -54,7 +54,7 @@ public abstract class AbstractActivator implements BundleActivator, ServiceTrack service.merge(context, zipfile); success = true; } else { - logger.log(Level.SEVERE, "The file was previously installed: " + zipfile.getName()); + logger.log(Level.WARNING, "The file was previously installed: " + zipfile.getName()); } return success; @@ -77,7 +77,7 @@ public abstract class AbstractActivator implements BundleActivator, ServiceTrack addLog(Level.SEVERE, "Could not find an IDictionaryService to process the zip files"); } } else { - addLog(Level.SEVERE, "The file was previously installed: " + zipfile.getName()); + addLog(Level.WARNING, "The file was previously installed: " + zipfile.getName()); success = true; } @@ -107,15 +107,24 @@ public abstract class AbstractActivator implements BundleActivator, ServiceTrack while(maxAttempts > 0 && !lockAcquired) { maxAttempts --; - if (getDBLock(timeout)) - lockAcquired = true; + if (logger.isLoggable(Level.INFO)) logger.log(Level.INFO, "Acquiring lock with timeout " + timeout + " for " + getName() + " / remaining attempts " + maxAttempts); + try { + if (getDBLock(timeout)) + lockAcquired = true; + } catch (Exception e) { + // Timeout throws DBException, ignore and try again + releaseLock(); + } } return lockAcquired; } public void releaseLock() { - Trx.get(trxName, false).close(); + if (trxName != null) { + Trx.get(trxName, false).close(); + trxName = null; + } } private boolean getDBLock(int timeout) throws AdempiereSystemError { diff --git a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AdempiereActivator.java b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AdempiereActivator.java index 0c366700ed..97fa3b0f8a 100644 --- a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AdempiereActivator.java +++ b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AdempiereActivator.java @@ -60,16 +60,17 @@ public class AdempiereActivator extends AbstractActivator { if (pkg == null) { try { if (getDBLock()) { - System.out.println("Installing " + getName() + " " + version + " ..."); + logger.log(Level.WARNING, "Installing " + getName() + " " + version + " ..."); packIn(); install(); - releaseLock(); - System.out.println(getName() + " " + version + " installed."); + logger.log(Level.WARNING, getName() + " " + version + " installed."); } else { - logger.log(Level.SEVERE, "Could not acquire the DB lock to install:" + getName()); + logger.log(Level.WARNING, "Could not acquire the DB lock to install:" + getName()); } } catch (AdempiereSystemError e) { e.printStackTrace(); + } finally { + releaseLock(); } } else { if (logger.isLoggable(Level.INFO)) logger.info(getName() + " " + version + " was installed: " @@ -121,7 +122,7 @@ public class AdempiereActivator extends AbstractActivator { // call 2pack merge(zipfile, getPKVersion()); } catch (Throwable e) { - logger.log(Level.SEVERE, "Pack in failed.", e); + logger.log(Level.WARNING, "Pack in failed.", e); } finally{ if (zipstream != null) { diff --git a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Incremental2PackActivator.java b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Incremental2PackActivator.java index ea6197482f..a6fc44cc55 100644 --- a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Incremental2PackActivator.java +++ b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Incremental2PackActivator.java @@ -157,7 +157,7 @@ public class Incremental2PackActivator extends AbstractActivator { } } if (patch) { - System.out.println("Patch Meta Data for " + getName() + " " + entry.version + " ..."); + logger.log(Level.WARNING, "Patch Meta Data for " + getName() + " " + entry.version + " ..."); X_AD_Package_Imp pi = new X_AD_Package_Imp(Env.getCtx(), 0, trx.getTrxName()); pi.setName(getName()); @@ -175,7 +175,7 @@ public class Incremental2PackActivator extends AbstractActivator { trx.commit(true); } catch (Exception e) { trx.rollback(); - logger.log(Level.SEVERE, e.getLocalizedMessage(), e); + logger.log(Level.WARNING, e.getLocalizedMessage(), e); } finally { trx.close(); } @@ -197,12 +197,13 @@ public class Incremental2PackActivator extends AbstractActivator { } } } - releaseLock(); } else { - logger.log(Level.SEVERE, "Could not acquire the DB lock to install:" + getName()); + logger.log(Level.WARNING, "Could not acquire the DB lock to install:" + getName()); } } catch (AdempiereSystemError e) { e.printStackTrace(); + } finally { + releaseLock(); } } @@ -220,7 +221,7 @@ public class Incremental2PackActivator extends AbstractActivator { MSession.get(Env.getCtx(), true); String path = packout.getPath(); String suffix = "_"+path.substring(path.lastIndexOf("2Pack_")); - System.out.println("Installing " + getName() + " " + path + " ..."); + logger.log(Level.WARNING, "Installing " + getName() + " " + path + " ..."); FileOutputStream zipstream = null; try { // copy the resource to a temporary file to process it with 2pack @@ -236,7 +237,7 @@ public class Incremental2PackActivator extends AbstractActivator { if (!merge(zipfile, extractVersionString(packout))) return false; } catch (Throwable e) { - logger.log(Level.SEVERE, "Pack in failed.", e); + logger.log(Level.WARNING, "Pack in failed.", e); return false; } finally{ if (zipstream != null) { @@ -245,7 +246,7 @@ public class Incremental2PackActivator extends AbstractActivator { } catch (Exception e2) {} } } - System.out.println(getName() + " " + packout.getPath() + " installed"); + logger.log(Level.WARNING, getName() + " " + packout.getPath() + " installed"); } return true; } diff --git a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/PackInApplicationActivator.java b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/PackInApplicationActivator.java index 1619cf7b6d..fc7615fa5e 100644 --- a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/PackInApplicationActivator.java +++ b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/PackInApplicationActivator.java @@ -167,19 +167,19 @@ public class PackInApplicationActivator extends AbstractActivator { currentFile = zipFile; if (!packIn(zipFile)) { // stop processing further packages if one fail - addLog(Level.SEVERE, "Failed application of " + zipFile); + addLog(Level.WARNING, "Failed application of " + zipFile); break; } addLog(Level.INFO, "Successful application of " + zipFile); filesToProcess.remove(zipFile); } } else { - addLog(Level.SEVERE, "Could not acquire the DB lock to automatically install the packins"); + addLog(Level.WARNING, "Could not acquire the DB lock to automatically install the packins"); return; } } catch (AdempiereSystemError e) { e.printStackTrace(); - addLog(Level.SEVERE, e.getLocalizedMessage()); + addLog(Level.WARNING, e.getLocalizedMessage()); } finally { releaseLock(); } @@ -212,7 +212,7 @@ public class PackInApplicationActivator extends AbstractActivator { seedClientValue = clientValue.split("-")[2]; seedClientIDs = getClientIDs(seedClientValue); if (seedClientIDs.length == 0) { - logger.log(Level.SEVERE, "Seed client does not exist: " + seedClientValue); + logger.log(Level.WARNING, "Seed client does not exist: " + seedClientValue); return false; } } @@ -234,7 +234,7 @@ public class PackInApplicationActivator extends AbstractActivator { } else { clientIDs = getClientIDs(clientValue); if (clientIDs.length == 0) { - logger.log(Level.SEVERE, "Client does not exist: " + clientValue); + logger.log(Level.WARNING, "Client does not exist: " + clientValue); return false; } } @@ -258,7 +258,7 @@ public class PackInApplicationActivator extends AbstractActivator { } } } catch (Throwable e) { - logger.log(Level.SEVERE, "Pack in failed.", e); + logger.log(Level.WARNING, "Pack in failed.", e); return false; } finally { Env.setContext(Env.getCtx(), "#AD_Client_ID", 0); @@ -299,7 +299,7 @@ public class PackInApplicationActivator extends AbstractActivator { for (String filePath : filePaths) { File toProcess = new File(filePath.trim()); if (!toProcess.exists()) { - addLog(Level.SEVERE, filePath + " does not exist"); + addLog(Level.WARNING, filePath + " does not exist"); continue; } @@ -326,7 +326,7 @@ public class PackInApplicationActivator extends AbstractActivator { if (toProcess.getName().toLowerCase().endsWith(".zip")) filesToProcess.add(toProcess); else { - logger.log(Level.SEVERE, toProcess.getName() + " is not a valid .zip file"); + logger.log(Level.WARNING, toProcess.getName() + " is not a valid .zip file"); return; } } else if (toProcess.isDirectory() && toProcess.canRead()) { @@ -350,7 +350,7 @@ public class PackInApplicationActivator extends AbstractActivator { if (fileToProcess.canRead()) { filesToProcess.add(fileToProcess); } else { - addLog(Level.SEVERE, fileToProcess.getName() + " not readable"); + addLog(Level.WARNING, fileToProcess.getName() + " not readable"); } } } @@ -359,7 +359,7 @@ public class PackInApplicationActivator extends AbstractActivator { return; } } else { - addLog(Level.SEVERE, toProcess.getName() + " not a file or folder or not readable"); + addLog(Level.WARNING, toProcess.getName() + " not a file or folder or not readable"); } } diff --git a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Version2PackActivator.java b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Version2PackActivator.java index b4d0162d64..c8756cb95e 100644 --- a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Version2PackActivator.java +++ b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/Version2PackActivator.java @@ -169,12 +169,13 @@ public class Version2PackActivator extends AbstractActivator { break; } } - releaseLock(); } else { - logger.log(Level.SEVERE, "Could not acquire the DB lock to install:" + getName()); + logger.log(Level.WARNING, "Could not acquire the DB lock to install:" + getName()); } } catch (AdempiereSystemError e) { e.printStackTrace(); + } finally { + releaseLock(); } } @@ -190,7 +191,7 @@ public class Version2PackActivator extends AbstractActivator { if (packout != null && service != null) { String path = packout.getPath(); String suffix = "_"+path.substring(path.lastIndexOf("2Pack_")); - System.out.println("Installing " + getName() + " " + path + " ..."); + logger.log(Level.WARNING, "Installing " + getName() + " " + path + " ..."); FileOutputStream zipstream = null; try { // copy the resource to a temporary file to process it with 2pack @@ -206,7 +207,7 @@ public class Version2PackActivator extends AbstractActivator { if (!merge(zipfile, extractVersionString(packout))) return false; } catch (Throwable e) { - logger.log(Level.SEVERE, "Pack in failed.", e); + logger.log(Level.WARNING, "Pack in failed.", e); return false; } finally{ if (zipstream != null) { @@ -215,7 +216,7 @@ public class Version2PackActivator extends AbstractActivator { } catch (Exception e2) {} } } - System.out.println(getName() + " " + packout.getPath() + " installed"); + logger.log(Level.WARNING, getName() + " " + packout.getPath() + " installed"); } return true; } diff --git a/org.adempiere.report.jasper.library/buckminster.cspex b/org.adempiere.report.jasper.library/buckminster.cspex deleted file mode 100644 index ecfc6ce11a..0000000000 --- a/org.adempiere.report.jasper.library/buckminster.cspex +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/org.adempiere.report.jasper.library/copyjars.xml b/org.adempiere.report.jasper.library/copyjars.xml deleted file mode 100644 index aab9a9db48..0000000000 --- a/org.adempiere.report.jasper.library/copyjars.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/org.adempiere.server-feature/buckminster.cspex b/org.adempiere.server-feature/buckminster.cspex deleted file mode 100644 index 2e90efa512..0000000000 --- a/org.adempiere.server-feature/buckminster.cspex +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.adempiere.server-feature/buckminster.properties b/org.adempiere.server-feature/buckminster.properties deleted file mode 100644 index 3e54e500a0..0000000000 --- a/org.adempiere.server-feature/buckminster.properties +++ /dev/null @@ -1,19 +0,0 @@ -## buckminster.properties ## -#Where all the output should go -buckminster.output.root=${user.home}/buckminster.output -# Where the temp files should go -buckminster.temp.root=${user.home}/tmp -# How .qualifier in versions should be replaced -qualifier.replacement.*=generator:buildTimestamp -generator.buildTimestamp.format='v'yyyyMMdd-HHmm -target.os=* -target.ws=* -target.arch=* - -product.features=org.idempiere.fitnesse.feature.feature.group, org.idempiere.equinox.p2.director.feature.feature.group -product.profile=DefaultProfile -product.id=org.adempiere.server.product, org.eclipse.equinox.p2.director - -osgi.user.area=${user.home} -osgi.user.area.default=${user.home} -osgi.configuration.area.default=configuration diff --git a/org.adempiere.server-feature/buckminster_linux_gtk_x86.properties b/org.adempiere.server-feature/buckminster_linux_gtk_x86.properties deleted file mode 100644 index ba04fd770c..0000000000 --- a/org.adempiere.server-feature/buckminster_linux_gtk_x86.properties +++ /dev/null @@ -1,19 +0,0 @@ -## buckminster.properties ## -#Where all the output should go -buckminster.output.root=${user.home}/buckminster.output -# Where the temp files should go -buckminster.temp.root=${user.home}/tmp -# How .qualifier in versions should be replaced -qualifier.replacement.*=generator:buildTimestamp -generator.buildTimestamp.format='v'yyyyMMdd-HHmm -target.os=linux -target.ws=gtk -target.arch=x86 - -product.features=org.idempiere.fitnesse.feature.feature.group, org.idempiere.equinox.p2.director.feature.feature.group -product.profile=DefaultProfile -product.id=org.adempiere.server.product, org.eclipse.equinox.p2.director - -osgi.user.area=${user.home} -osgi.user.area.default=${user.home} -osgi.configuration.area.default=configuration diff --git a/org.adempiere.server-feature/buckminster_linux_gtk_x86_64.properties b/org.adempiere.server-feature/buckminster_linux_gtk_x86_64.properties deleted file mode 100644 index 851713fed8..0000000000 --- a/org.adempiere.server-feature/buckminster_linux_gtk_x86_64.properties +++ /dev/null @@ -1,20 +0,0 @@ -## buckminster.properties ## -#Where all the output should go -buckminster.output.root=${user.home}/buckminster.output -# Where the temp files should go -buckminster.temp.root=${user.home}/tmp -# How .qualifier in versions should be replaced -qualifier.replacement.*=generator:buildTimestamp -generator.buildTimestamp.format='v'yyyyMMdd-HHmm -target.os=linux -target.ws=gtk -target.arch=x86_64 - -product.features=org.idempiere.fitnesse.feature.feature.group, org.idempiere.equinox.p2.director.feature.feature.group -product.profile=DefaultProfile -product.id=org.adempiere.server.product, org.eclipse.equinox.p2.director - -osgi.user.area=${user.home} -osgi.user.area.default=${user.home} -osgi.configuration.area.default=configuration - diff --git a/org.adempiere.server-feature/buckminster_macosx_x86.properties b/org.adempiere.server-feature/buckminster_macosx_x86.properties deleted file mode 100644 index bf5677f953..0000000000 --- a/org.adempiere.server-feature/buckminster_macosx_x86.properties +++ /dev/null @@ -1,19 +0,0 @@ -## buckminster.properties ## -#Where all the output should go -buckminster.output.root=${user.home}/buckminster.output -# Where the temp files should go -buckminster.temp.root=${user.home}/tmp -# How .qualifier in versions should be replaced -qualifier.replacement.*=generator:buildTimestamp -generator.buildTimestamp.format='v'yyyyMMdd-HHmm -target.os=macosx -target.ws=cocoa -target.arch=x86 - -product.features=org.idempiere.fitnesse.feature.feature.group, org.idempiere.equinox.p2.director.feature.feature.group -product.profile=DefaultProfile -product.id=org.adempiere.server.product, org.eclipse.equinox.p2.director - -osgi.user.area=${user.home} -osgi.user.area.default=${user.home} -osgi.configuration.area.default=configuration diff --git a/org.adempiere.server-feature/buckminster_solaris_gtk_x86.properties b/org.adempiere.server-feature/buckminster_solaris_gtk_x86.properties deleted file mode 100644 index 282e867c92..0000000000 --- a/org.adempiere.server-feature/buckminster_solaris_gtk_x86.properties +++ /dev/null @@ -1,19 +0,0 @@ -## buckminster.properties ## -#Where all the output should go -buckminster.output.root=${user.home}/buckminster.output -# Where the temp files should go -buckminster.temp.root=${user.home}/tmp -# How .qualifier in versions should be replaced -qualifier.replacement.*=generator:buildTimestamp -generator.buildTimestamp.format='v'yyyyMMdd-HHmm -target.os=solaris -target.ws=gtk -target.arch=x86 - -product.features=org.idempiere.fitnesse.feature.feature.group, org.idempiere.equinox.p2.director.feature.feature.group -product.profile=DefaultProfile -product.id=org.adempiere.server.product, org.eclipse.equinox.p2.director - -osgi.user.area=${user.home} -osgi.user.area.default=${user.home} -osgi.configuration.area.default=configuration diff --git a/org.adempiere.server-feature/buckminster_win32_x86.properties b/org.adempiere.server-feature/buckminster_win32_x86.properties deleted file mode 100644 index 8a14052366..0000000000 --- a/org.adempiere.server-feature/buckminster_win32_x86.properties +++ /dev/null @@ -1,19 +0,0 @@ -## buckminster.properties ## -#Where all the output should go -buckminster.output.root=${user.home}/buckminster.output -# Where the temp files should go -buckminster.temp.root=${user.home}/tmp -# How .qualifier in versions should be replaced -qualifier.replacement.*=generator:buildTimestamp -generator.buildTimestamp.format='v'yyyyMMdd-HHmm -target.os=win32 -target.ws=win32 -target.arch=x86 - -product.features=org.idempiere.fitnesse.feature.feature.group, org.idempiere.equinox.p2.director.feature.feature.group -product.profile=DefaultProfile -product.id=org.adempiere.server.product, org.eclipse.equinox.p2.director - -osgi.user.area=${user.home} -osgi.user.area.default=${user.home} -osgi.configuration.area.default=configuration diff --git a/org.adempiere.server-feature/buckminster_win32_x86_64.properties b/org.adempiere.server-feature/buckminster_win32_x86_64.properties deleted file mode 100644 index d4236be41c..0000000000 --- a/org.adempiere.server-feature/buckminster_win32_x86_64.properties +++ /dev/null @@ -1,19 +0,0 @@ -## buckminster.properties ## -#Where all the output should go -buckminster.output.root=${user.home}/buckminster.output -# Where the temp files should go -buckminster.temp.root=${user.home}/tmp -# How .qualifier in versions should be replaced -qualifier.replacement.*=generator:buildTimestamp -generator.buildTimestamp.format='v'yyyyMMdd-HHmm -target.os=win32 -target.ws=win32 -target.arch=x86_64 - -product.features=org.idempiere.fitnesse.feature.feature.group, org.idempiere.equinox.p2.director.feature.feature.group -product.profile=DefaultProfile -product.id=org.adempiere.server.product, org.eclipse.equinox.p2.director - -osgi.user.area=${user.home} -osgi.user.area.default=${user.home} -osgi.configuration.area.default=configuration diff --git a/org.adempiere.server-feature/copyjars.xml b/org.adempiere.server-feature/copyjars.xml deleted file mode 100644 index 5d5f8f1516..0000000000 --- a/org.adempiere.server-feature/copyjars.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.adempiere.server-feature/product.ant b/org.adempiere.server-feature/product.ant deleted file mode 100644 index d6d7b83fcd..0000000000 --- a/org.adempiere.server-feature/product.ant +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.adempiere.server-feature/utils.unix/RUN_ApplyPackInFromFolder.sh b/org.adempiere.server-feature/utils.unix/RUN_ApplyPackInFromFolder.sh new file mode 100644 index 0000000000..a537dd141b --- /dev/null +++ b/org.adempiere.server-feature/utils.unix/RUN_ApplyPackInFromFolder.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +if [ $IDEMPIERE_HOME ]; then + cd $IDEMPIERE_HOME/utils +else + cd "`dirname $0`" +fi +. ./myEnvironment.sh Server + +if [ $JAVA_HOME ]; then + JAVA=$JAVA_HOME/bin/java +else + JAVA=java +fi + +# $Id: RUN_ApplyPackInFromFolder.sh +echo Apply PackIn from Folder - $IDEMPIERE_HOME \($ADEMPIERE_DB_NAME\) + +if [ $# -eq 1 ] +then + export DIRECTORY=$1 +else + echo "Usage: $0 folder" + exit 1 +fi + +cd .. + +echo This Procedure import packin files from directory $DIRECTORY + +$JAVA -Dosgi.compatibility.bootdelegation=true -Dosgi.noShutdown=false -jar plugins/org.eclipse.equinox.launcher_1.*.jar -application org.adempiere.base.PackInFolderApplication $DIRECTORY + +echo Done +echo . +echo For problems, check log file in base directory diff --git a/org.adempiere.server-feature/utils.unix/RUN_ExportReference.sh b/org.adempiere.server-feature/utils.unix/RUN_ExportReference.sh index 884d763287..d7c46619d4 100644 --- a/org.adempiere.server-feature/utils.unix/RUN_ExportReference.sh +++ b/org.adempiere.server-feature/utils.unix/RUN_ExportReference.sh @@ -1,10 +1,13 @@ #!/bin/sh -# -# $Id: RUN_ImportReference.sh,v 1.11 2005/12/13 00:17:54 jjanke Exp $ +# Author + Copyright 1999-2005 Jorg Janke +# $Id: RUN_DBExport.sh,v 1.10 2005/05/31 18:45:33 jjanke Exp $ if [ $IDEMPIERE_HOME ]; then cd $IDEMPIERE_HOME/utils fi . ./myEnvironment.sh Server -echo Export Reference - $IDEMPIERE_HOME \($ADEMPIERE_DB_NAME\) -sh $ADEMPIERE_DB_PATH/ExportReference.sh +echo Export idempiere Database - $IDEMPIERE_HOME \($ADEMPIERE_DB_NAME\) + + +# Parameter: / +sh $ADEMPIERE_DB_PATH/ExportReference.sh $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD system/$ADEMPIERE_DB_SYSTEM diff --git a/org.adempiere.server-feature/utils.unix/RUN_SyncDB.sh b/org.adempiere.server-feature/utils.unix/RUN_SyncDB.sh index 3d8d4c67fc..e4756a1a40 100644 --- a/org.adempiere.server-feature/utils.unix/RUN_SyncDB.sh +++ b/org.adempiere.server-feature/utils.unix/RUN_SyncDB.sh @@ -7,4 +7,4 @@ fi . ./myEnvironment.sh Server echo Synchronize iDempiere Database - $IDEMPIERE_HOME \($ADEMPIERE_DB_NAME\) -sh $ADEMPIERE_DB_PATH/SyncDB.sh "$ADEMPIERE_DB_USER" "$ADEMPIERE_DB_PASSWORD" "$ADEMPIERE_DB_PATH" +sh $ADEMPIERE_DB_PATH/SyncDB.sh "$ADEMPIERE_DB_USER" "$ADEMPIERE_DB_PASSWORD" "$ADEMPIERE_DB_PATH" $* diff --git a/org.adempiere.server-feature/utils.unix/oracle/ExportReference.sh b/org.adempiere.server-feature/utils.unix/oracle/ExportReference.sh index 671c3ce00a..7f8a0db600 100644 --- a/org.adempiere.server-feature/utils.unix/oracle/ExportReference.sh +++ b/org.adempiere.server-feature/utils.unix/oracle/ExportReference.sh @@ -1,21 +1,42 @@ #!/bin/sh -echo Adempiere Database Export $Revision: 1.5 $ +echo Adempiere Database Export $Revision: 1.5 $ -# $Id: DBExport.sh,v 1.5 2005/12/20 07:12:17 jjanke Exp $ +# $Id: ExportReference.sh,v 1.5 2005/12/20 07:12:17 jjanke Exp $ echo Saving reference database reference@$ADEMPIERE_DB_NAME to $IDEMPIERE_HOME/data/Adempiere.dmp if [ "$IDEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ] then echo "Please make sure that the environment variables are set correctly:" - echo " IDEMPIERE_HOME e.g. /idempiere" - echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org" + echo " IDEMPIERE_HOME e.g. /idempiere" + echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org" exit 1 fi +echo ------------------------------------- +echo Re-Create DataPump directory +echo ------------------------------------- +sqlplus $3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$IDEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateDataPumpDir.sql $IDEMPIERE_HOME/data +chgrp dba $IDEMPIERE_HOME/data +chmod 770 $IDEMPIERE_HOME/data + +sqlplus $3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME </dev/null >> $TMPFOLDER/lisFS_$$.txt - cd $IDEMPIERE_HOME/migration + cd "$DIR_SCRIPTS" done sort -o $TMPFOLDER/lisFS_$$.txt $TMPFOLDER/lisFS_$$.txt sort -o $TMPFOLDER/lisDB_$$.txt $TMPFOLDER/lisDB_$$.txt @@ -82,7 +99,7 @@ else fi if [ x$APPLIED = xY ] then - cd $IDEMPIERE_HOME/migration + cd "$DIR_POST" for FILE in processes_post_migration/$ADEMPIERE_DB_PATH/*.sql do OUTFILE=$TMPFOLDER/SyncDB_out_$$/`basename "$FILE" .sql`.out @@ -97,4 +114,6 @@ if [ -n "$MSGERROR" ] then echo "$MSGERROR" echo "\n Errors were found during the process (see message above) - please review and fix the error running manually the script - and then restart this process again" + exit 1 fi +exit 0 diff --git a/org.adempiere.server-feature/utils.unix/postgresql/DBRestore.sh b/org.adempiere.server-feature/utils.unix/postgresql/DBRestore.sh index fd3d452411..687110e8bf 100644 --- a/org.adempiere.server-feature/utils.unix/postgresql/DBRestore.sh +++ b/org.adempiere.server-feature/utils.unix/postgresql/DBRestore.sh @@ -20,6 +20,20 @@ if [ "$IDEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" -o "$ADEMPIERE_DB_SERV exit 1 fi +ISAMAZONRDS=N +if echo "$ADEMPIERE_DB_SERVER" | grep 'rds.amazonaws.com$' > /dev/null +then + ISAMAZONRDS=Y +fi + +PGPASSWORD=$4 +export PGPASSWORD +if [ "x$4" = "x^TryLocalConnection^" ] +then + LOCALPG=true # Allow to run this command with user postgres (just useful running configure as root) +else + LOCALPG=false +fi PGPASSWORD=$4 export PGPASSWORD @@ -33,7 +47,14 @@ fi echo ------------------------------------- echo Recreate user and database echo ------------------------------------- -ADEMPIERE_CREATE_ROLE_SQL="CREATE ROLE $2 SUPERUSER LOGIN PASSWORD '$3'" +if [ $ISAMAZONRDS = Y ] +then + # modified for amazon RDS - doesn't allow SUPERUSER + ROOT_ROLE="CREATEDB IN ROLE rds_superuser, adempiere" +else + ROOT_ROLE="SUPERUSER" +fi +ADEMPIERE_CREATE_ROLE_SQL="CREATE ROLE $2 $ROOT_ROLE LOGIN PASSWORD '$3'" if [ $LOCALPG = "true" ] then # Assuming that adempiere role already exists (it was created out there) @@ -41,7 +62,18 @@ then export PGPASSWORD dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U $2 $ADEMPIERE_DB_NAME else - dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $ADEMPIERE_DB_NAME + if [ "x$2" != xadempiere ] + then + psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres -c "CREATE ROLE adempiere" + fi + if [ $ISAMAZONRDS = Y ] + then + PGPASSWORD=$3 + dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U $2 $ADEMPIERE_DB_NAME + PGPASSWORD=$4 + else + dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $ADEMPIERE_DB_NAME + fi dropuser -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $2 psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres -c "$ADEMPIERE_CREATE_ROLE_SQL" fi @@ -54,7 +86,6 @@ createdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -E UNICODE -T template0 - echo ------------------------------------- echo Import Adempiere_pg.dmp echo ------------------------------------- -psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -c "drop schema sqlj cascade" ADEMPIERE_ALTER_ROLE_SQL="ALTER ROLE $2 SET search_path TO adempiere, pg_catalog" psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -c "$ADEMPIERE_ALTER_ROLE_SQL" psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -f $IDEMPIERE_HOME/data/ExpDat.dmp diff --git a/org.adempiere.server-feature/utils.unix/postgresql/ImportIdempiere.sh b/org.adempiere.server-feature/utils.unix/postgresql/ImportIdempiere.sh index 06a8f42a82..5791179f55 100644 --- a/org.adempiere.server-feature/utils.unix/postgresql/ImportIdempiere.sh +++ b/org.adempiere.server-feature/utils.unix/postgresql/ImportIdempiere.sh @@ -21,6 +21,12 @@ if [ "$IDEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" -o "$ADEMPIERE_DB_SERV exit 1 fi +ISAMAZONRDS=N +if echo "$ADEMPIERE_DB_SERVER" | grep 'rds.amazonaws.com$' > /dev/null +then + ISAMAZONRDS=Y +fi + PGPASSWORD=$4 export PGPASSWORD if [ "x$4" = "x^TryLocalConnection^" ] @@ -32,7 +38,14 @@ fi echo ------------------------------------- echo Recreate user and database echo ------------------------------------- -ADEMPIERE_CREATE_ROLE_SQL="CREATE ROLE $2 SUPERUSER LOGIN PASSWORD '$3'" +if [ $ISAMAZONRDS = Y ] +then + # modified for amazon RDS - doesn't allow SUPERUSER + ROOT_ROLE="CREATEDB IN ROLE rds_superuser, adempiere" +else + ROOT_ROLE="SUPERUSER" +fi +ADEMPIERE_CREATE_ROLE_SQL="CREATE ROLE $2 $ROOT_ROLE LOGIN PASSWORD '$3'" if [ $LOCALPG = "true" ] then # Assuming that adempiere role already exists (it was created out there) @@ -40,7 +53,18 @@ then export PGPASSWORD dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U $2 $ADEMPIERE_DB_NAME else - dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $ADEMPIERE_DB_NAME + if [ "x$2" != xadempiere ] + then + psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres -c "CREATE ROLE adempiere" + fi + if [ $ISAMAZONRDS = Y ] + then + PGPASSWORD=$3 + dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U $2 $ADEMPIERE_DB_NAME + PGPASSWORD=$4 + else + dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $ADEMPIERE_DB_NAME + fi dropuser -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $2 psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres -c "$ADEMPIERE_CREATE_ROLE_SQL" fi diff --git a/org.adempiere.server-feature/utils.unix/postgresql/SyncDB.sh b/org.adempiere.server-feature/utils.unix/postgresql/SyncDB.sh index db1da0aa8b..dd81b3214d 100644 --- a/org.adempiere.server-feature/utils.unix/postgresql/SyncDB.sh +++ b/org.adempiere.server-feature/utils.unix/postgresql/SyncDB.sh @@ -32,8 +32,25 @@ ADEMPIERE_DB_PATH=$3 CMD="psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $ADEMPIERE_DB_USER" SILENTCMD="$CMD -q -t" ERROR_STRINGS="^(ERROR:|FEHLER:|FATAL:|ERRO:)" +DIR_POST=$IDEMPIERE_HOME/migration +if [ "x$4" = "x" ] +then + DIR_SCRIPTS=$IDEMPIERE_HOME/migration +else + if [ `expr substr "$4" 1 1` = "/" ] + then + DIR_SCRIPTS="$4" + else + DIR_SCRIPTS="$IDEMPIERE_HOME/$4" + fi +fi -cd $IDEMPIERE_HOME/migration +cd "$DIR_SCRIPTS" +if [ $? -ne 0 ] +then + echo "ERROR: Cannot change to folder $DIR_SCRIPTS" + exit 1 +fi # Create list of files already applied - registered in AD_MigrationScript table echo "select name from ad_migrationscript" | $SILENTCMD | sed -e 's:^ ::' | grep -v '^$' | sort > $TMPFOLDER/lisDB_$$.txt @@ -44,7 +61,7 @@ find -type d -name $ADEMPIERE_DB_PATH | grep -v "./processes_post_migration/$ADE do cd "${FOLDER}" ls *.sql 2>/dev/null >> $TMPFOLDER/lisFS_$$.txt - cd $IDEMPIERE_HOME/migration + cd "$DIR_SCRIPTS" done sort -o $TMPFOLDER/lisFS_$$.txt $TMPFOLDER/lisFS_$$.txt sort -o $TMPFOLDER/lisDB_$$.txt $TMPFOLDER/lisDB_$$.txt @@ -79,7 +96,7 @@ else fi if [ x$APPLIED = xY ] then - cd $IDEMPIERE_HOME/migration + cd "$DIR_POST" for FILE in processes_post_migration/$ADEMPIERE_DB_PATH/*.sql do OUTFILE=$TMPFOLDER/SyncDB_out_$$/`basename "$FILE" .sql`.out @@ -90,11 +107,12 @@ then fi done fi +PGPASSWORD= +export PGPASSWORD if [ -n "$MSGERROR" ] then echo "$MSGERROR" echo "\n Errors were found during the process (see message above) - please review and fix the error running manually the script - and then restart this process again" + exit 1 fi - -PGPASSWORD= -export PGPASSWORD +exit 0 diff --git a/org.adempiere.server-feature/utils.windows/RUN_ApplyPackInFromFolder.bat b/org.adempiere.server-feature/utils.windows/RUN_ApplyPackInFromFolder.bat new file mode 100644 index 0000000000..43e23c1d7d --- /dev/null +++ b/org.adempiere.server-feature/utils.windows/RUN_ApplyPackInFromFolder.bat @@ -0,0 +1,14 @@ +@Rem $Id: RUN_ApplyPackInFromFolder.bat + +@if (%IDEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %IDEMPIERE_HOME%\utils\myEnvironment.bat Server) +@Title Import Translation - %IDEMPIERE_HOME% (%ADEMPIERE_DB_NAME%) + +@SET DIRECTORY=%1 + +@echo This Procedure import packin files from directory %DIRECTORY% +@pause + +FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c +@"%JAVA_HOME%\bin\java" -Dosgi.compatibility.bootdelegation=true -Dosgi.noShutdown=false -jar %JARFILE% -application org.adempiere.base.PackInFolderApplication %DIRECTORY% + +@pause diff --git a/org.adempiere.server/buckminster.cspex b/org.adempiere.server/buckminster.cspex deleted file mode 100644 index c6cc7e6633..0000000000 --- a/org.adempiere.server/buckminster.cspex +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/org.adempiere.server/copyjars.xml b/org.adempiere.server/copyjars.xml deleted file mode 100644 index db49e5bf2b..0000000000 --- a/org.adempiere.server/copyjars.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java index 9a94a79bfd..587e812f72 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java @@ -297,10 +297,17 @@ public abstract class AdempiereServer implements Runnable p_model.getFrequency(), p_model.getCronPattern()); m_sleepMS = m_nextWork - now; + if (m_nextWork == 0) { + m_sleepMS = 0; + } if (log.isLoggable(Level.INFO)) log.info(" Next run: " + new Timestamp(m_nextWork) + " sleep " + m_sleepMS); // p_model.setDateLastRun(lastRun); - p_model.setDateNextRun(new Timestamp(m_nextWork)); + if (m_nextWork == 0) { + p_model.setDateNextRun(null); + } else { + p_model.setDateNextRun(new Timestamp(m_nextWork)); + } p_model.saveEx(); } // run diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java index 2065ae7f6e..790f1bba56 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java @@ -577,7 +577,9 @@ public class AdempiereServerMgr implements ServiceTrackerCustomizer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.adempiere.ui.swing-feature/buckminster.properties b/org.adempiere.ui.swing-feature/buckminster.properties deleted file mode 100644 index 4b7d8f980f..0000000000 --- a/org.adempiere.ui.swing-feature/buckminster.properties +++ /dev/null @@ -1,15 +0,0 @@ -## buckminster.properties ## -#Where all the output should go -buckminster.output.root=${user.home}/buckminster.output -# Where the temp files should go -buckminster.temp.root=${user.home}/tmp -# How .qualifier in versions should be replaced -qualifier.replacement.*=generator:buildTimestamp -generator.buildTimestamp.format='v'yyyyMMdd-HHmm -target.os=* -target.ws=* -target.arch=* - -product.features=org.idempiere.eclipse.platform.feature.feature.group -product.profile=DefaultProfile -product.id=org.adempiere.ui.swing.product \ No newline at end of file diff --git a/org.adempiere.ui.swing-feature/buckminster_linux_gtk_x86.properties b/org.adempiere.ui.swing-feature/buckminster_linux_gtk_x86.properties deleted file mode 100644 index ddfca90194..0000000000 --- a/org.adempiere.ui.swing-feature/buckminster_linux_gtk_x86.properties +++ /dev/null @@ -1,15 +0,0 @@ -## buckminster.properties ## -#Where all the output should go -buckminster.output.root=${user.home}/buckminster.output -# Where the temp files should go -buckminster.temp.root=${user.home}/tmp -# How .qualifier in versions should be replaced -qualifier.replacement.*=generator:buildTimestamp -generator.buildTimestamp.format='v'yyyyMMdd-HHmm -target.os=linux -target.ws=gtk -target.arch=x86 - -product.features=org.idempiere.eclipse.platform.feature.feature.group -product.profile=DefaultProfile -product.id=org.adempiere.ui.swing.product diff --git a/org.adempiere.ui.swing-feature/buckminster_linux_gtk_x86_64.properties b/org.adempiere.ui.swing-feature/buckminster_linux_gtk_x86_64.properties deleted file mode 100644 index c73d4c1945..0000000000 --- a/org.adempiere.ui.swing-feature/buckminster_linux_gtk_x86_64.properties +++ /dev/null @@ -1,15 +0,0 @@ -## buckminster.properties ## -#Where all the output should go -buckminster.output.root=${user.home}/buckminster.output -# Where the temp files should go -buckminster.temp.root=${user.home}/tmp -# How .qualifier in versions should be replaced -qualifier.replacement.*=generator:buildTimestamp -generator.buildTimestamp.format='v'yyyyMMdd-HHmm -target.os=linux -target.ws=gtk -target.arch=x86_64 - -product.features=org.idempiere.eclipse.platform.feature.feature.group -product.profile=DefaultProfile -product.id=org.adempiere.ui.swing.product diff --git a/org.adempiere.ui.swing-feature/buckminster_macosx_x86.properties b/org.adempiere.ui.swing-feature/buckminster_macosx_x86.properties deleted file mode 100644 index c6461dd26e..0000000000 --- a/org.adempiere.ui.swing-feature/buckminster_macosx_x86.properties +++ /dev/null @@ -1,15 +0,0 @@ -## buckminster.properties ## -#Where all the output should go -buckminster.output.root=${user.home}/buckminster.output -# Where the temp files should go -buckminster.temp.root=${user.home}/tmp -# How .qualifier in versions should be replaced -qualifier.replacement.*=generator:buildTimestamp -generator.buildTimestamp.format='v'yyyyMMdd-HHmm -target.os=macosx -target.ws=cocoa -target.arch=x86 - -product.features=org.idempiere.eclipse.platform.feature.feature.group -product.profile=DefaultProfile -product.id=org.adempiere.ui.swing.product diff --git a/org.adempiere.ui.swing-feature/buckminster_solaris_gtk_x86.properties b/org.adempiere.ui.swing-feature/buckminster_solaris_gtk_x86.properties deleted file mode 100644 index b4e42cbb7d..0000000000 --- a/org.adempiere.ui.swing-feature/buckminster_solaris_gtk_x86.properties +++ /dev/null @@ -1,15 +0,0 @@ -## buckminster.properties ## -#Where all the output should go -buckminster.output.root=${user.home}/buckminster.output -# Where the temp files should go -buckminster.temp.root=${user.home}/tmp -# How .qualifier in versions should be replaced -qualifier.replacement.*=generator:buildTimestamp -generator.buildTimestamp.format='v'yyyyMMdd-HHmm -target.os=solaris -target.ws=gtk -target.arch=x86 - -product.features=org.idempiere.eclipse.platform.feature.feature.group -product.profile=DefaultProfile -product.id=org.adempiere.ui.swing.product diff --git a/org.adempiere.ui.swing-feature/buckminster_win32_x86.properties b/org.adempiere.ui.swing-feature/buckminster_win32_x86.properties deleted file mode 100644 index 0534fbf6fa..0000000000 --- a/org.adempiere.ui.swing-feature/buckminster_win32_x86.properties +++ /dev/null @@ -1,15 +0,0 @@ -## buckminster.properties ## -#Where all the output should go -buckminster.output.root=${user.home}/buckminster.output -# Where the temp files should go -buckminster.temp.root=${user.home}/tmp -# How .qualifier in versions should be replaced -qualifier.replacement.*=generator:buildTimestamp -generator.buildTimestamp.format='v'yyyyMMdd-HHmm -target.os=win32 -target.ws=win32 -target.arch=x86 - -product.features=org.idempiere.eclipse.platform.feature.feature.group -product.profile=DefaultProfile -product.id=org.adempiere.ui.swing.product diff --git a/org.adempiere.ui.swing-feature/product.ant b/org.adempiere.ui.swing-feature/product.ant deleted file mode 100644 index a4e581c000..0000000000 --- a/org.adempiere.ui.swing-feature/product.ant +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/org.adempiere.ui.swing/buckminster.cspex b/org.adempiere.ui.swing/buckminster.cspex deleted file mode 100644 index c6cc7e6633..0000000000 --- a/org.adempiere.ui.swing/buckminster.cspex +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/org.adempiere.ui.swing/copyjars.xml b/org.adempiere.ui.swing/copyjars.xml deleted file mode 100644 index f1072cf5be..0000000000 --- a/org.adempiere.ui.swing/copyjars.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index 4f8a4e9993..825fd2c89b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -369,14 +369,14 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements toolbar.enableFind(true); adTabbox.evaluate(null); + toolbar.updateToolbarAccess(adWindowId); + updateToolbar(); + if (detailQuery != null && zoomToDetailTab(detailQuery)) { return true; } - toolbar.updateToolbarAccess(adWindowId); - updateToolbar(); - SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Tab, adTabbox.getSelectedGridTab().getAD_Tab_ID()); return true; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC1DisplayFieldsPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC1DisplayFieldsPanel.java index b610c605f7..9fef2a3971 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC1DisplayFieldsPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC1DisplayFieldsPanel.java @@ -14,6 +14,7 @@ package org.adempiere.webui.panel; +import org.adempiere.webui.component.Borderlayout; import org.adempiere.webui.component.Checkbox; import org.adempiere.webui.component.Column; import org.adempiere.webui.component.Columns; @@ -30,6 +31,7 @@ import org.compiere.util.Util; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; +import org.zkoss.zul.Center; import org.zkoss.zul.Div; @@ -38,7 +40,7 @@ public class WRC1DisplayFieldsPanel extends WRCTabPanel implements EventListener /** * */ - private static final long serialVersionUID = -2097631726230470398L; + private static final long serialVersionUID = -4595966853507636969L; private static final int RENDER_IN_COLUMNS=4; private MPrintFormat m_printFormat; @@ -60,7 +62,7 @@ public class WRC1DisplayFieldsPanel extends WRCTabPanel implements EventListener } public void init() { - + m_chkboxes = new Checkbox[m_pfi.size()]; m_textBoxes = new Textbox[m_pfi.size()]; m_oldLabel = new String[m_pfi.size()]; @@ -70,6 +72,13 @@ public class WRC1DisplayFieldsPanel extends WRCTabPanel implements EventListener ZKUpdateUtil.setHeight(wind, "100%"); ZKUpdateUtil.setHflex(wind, "1"); + Borderlayout borderlayout = new Borderlayout(); + wind.appendChild(borderlayout); + ZKUpdateUtil.setHflex(borderlayout, "1"); + Center center = new Center(); + center.setAutoscroll(true); + borderlayout.appendChild(center); + Grid grid = new Grid(); //have problem moving the following out as css class ZKUpdateUtil.setHflex(grid, "1"); @@ -81,7 +90,7 @@ public class WRC1DisplayFieldsPanel extends WRCTabPanel implements EventListener Div div = new Div(); div.setStyle("width:90%;height:100%;border:none;margin:none;padding:none"); div.appendChild(grid); - wind.appendChild(div); + center.appendChild(div); this.appendChild(wind); Columns columns = new Columns(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC5SummaryFieldsPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC5SummaryFieldsPanel.java index 26a08d52d3..469fbddb99 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC5SummaryFieldsPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WRC5SummaryFieldsPanel.java @@ -15,6 +15,7 @@ package org.adempiere.webui.panel; import java.util.ArrayList; +import org.adempiere.webui.component.Borderlayout; import org.adempiere.webui.component.Checkbox; import org.adempiere.webui.component.Column; import org.adempiere.webui.component.Columns; @@ -29,6 +30,7 @@ import org.compiere.util.Msg; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; +import org.zkoss.zul.Center; import org.zkoss.zul.Div; import org.zkoss.zul.Row; @@ -36,7 +38,7 @@ public class WRC5SummaryFieldsPanel extends WRCTabPanel implements EventListener /** * */ - private static final long serialVersionUID = -2231369601903381581L; + private static final long serialVersionUID = 4660623126634851224L; private static final int RENDER_IN_COLUMNS=10; Checkbox m_chkSum[]=null; @@ -65,10 +67,17 @@ public class WRC5SummaryFieldsPanel extends WRCTabPanel implements EventListener grid.setStyle("margin:0; padding:0; position: absolute"); grid.makeNoStrip(); + Borderlayout borderlayout = new Borderlayout(); + wind.appendChild(borderlayout); + ZKUpdateUtil.setHflex(borderlayout, "1"); + Center center = new Center(); + center.setAutoscroll(true); + borderlayout.appendChild(center); + Div div = new Div(); div.setStyle("width:90%;height:100%;border:none;margin:none;padding:none"); div.appendChild(grid); - wind.appendChild(div); + center.appendChild(div); this.appendChild(wind); Columns columns = new Columns(); diff --git a/org.adempiere.ui.zk/buckminster.cspex b/org.adempiere.ui.zk/buckminster.cspex deleted file mode 100644 index c6cc7e6633..0000000000 --- a/org.adempiere.ui.zk/buckminster.cspex +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/org.adempiere.ui.zk/copyjars.xml b/org.adempiere.ui.zk/copyjars.xml deleted file mode 100644 index 07db85875b..0000000000 --- a/org.adempiere.ui.zk/copyjars.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/org.adempiere.ui/buckminster.cspex b/org.adempiere.ui/buckminster.cspex deleted file mode 100644 index c6cc7e6633..0000000000 --- a/org.adempiere.ui/buckminster.cspex +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/org.adempiere.ui/copyjars.xml b/org.adempiere.ui/copyjars.xml deleted file mode 100644 index 3e82371443..0000000000 --- a/org.adempiere.ui/copyjars.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/org.adempiere.webstore-feature/buckminster.properties b/org.adempiere.webstore-feature/buckminster.properties deleted file mode 100644 index e369e06b2b..0000000000 --- a/org.adempiere.webstore-feature/buckminster.properties +++ /dev/null @@ -1,11 +0,0 @@ -## buckminster.properties ## -#Where all the output should go -buckminster.output.root=${user.home}/buckminster.output -# Where the temp files should go -buckminster.temp.root=${user.home}/tmp -# How .qualifier in versions should be replaced -qualifier.replacement.*=generator:buildTimestamp -generator.buildTimestamp.format='v'yyyyMMdd-HHmm -target.os=* -target.ws=* -target.arch=* diff --git a/org.compiere.db.oracle.provider/buckminster.cspex b/org.compiere.db.oracle.provider/buckminster.cspex deleted file mode 100644 index c6cc7e6633..0000000000 --- a/org.compiere.db.oracle.provider/buckminster.cspex +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/org.compiere.db.oracle.provider/copyjars.xml b/org.compiere.db.oracle.provider/copyjars.xml deleted file mode 100644 index d10f9c61f7..0000000000 --- a/org.compiere.db.oracle.provider/copyjars.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/org.compiere.db.postgresql.provider/buckminster.cspex b/org.compiere.db.postgresql.provider/buckminster.cspex deleted file mode 100644 index c6cc7e6633..0000000000 --- a/org.compiere.db.postgresql.provider/buckminster.cspex +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/org.compiere.db.postgresql.provider/copyjars.xml b/org.compiere.db.postgresql.provider/copyjars.xml deleted file mode 100644 index 76a97e9cd3..0000000000 --- a/org.compiere.db.postgresql.provider/copyjars.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/org.idempiere.fitnesse.server/buckminster.cspex b/org.idempiere.fitnesse.server/buckminster.cspex deleted file mode 100644 index c6cc7e6633..0000000000 --- a/org.idempiere.fitnesse.server/buckminster.cspex +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/org.idempiere.fitnesse.server/copyjars.xml b/org.idempiere.fitnesse.server/copyjars.xml deleted file mode 100644 index 042bdc2e6b..0000000000 --- a/org.idempiere.fitnesse.server/copyjars.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - diff --git a/org.idempiere.hazelcast.service/buckminster.cspex b/org.idempiere.hazelcast.service/buckminster.cspex deleted file mode 100644 index c6cc7e6633..0000000000 --- a/org.idempiere.hazelcast.service/buckminster.cspex +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/org.idempiere.hazelcast.service/copyjars.xml b/org.idempiere.hazelcast.service/copyjars.xml deleted file mode 100644 index 7cd20febc2..0000000000 --- a/org.idempiere.hazelcast.service/copyjars.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.idempiere.webservices/buckminster.cspex b/org.idempiere.webservices/buckminster.cspex deleted file mode 100644 index c6cc7e6633..0000000000 --- a/org.idempiere.webservices/buckminster.cspex +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/org.idempiere.webservices/copyjars.xml b/org.idempiere.webservices/copyjars.xml deleted file mode 100644 index 6dbd56fda9..0000000000 --- a/org.idempiere.webservices/copyjars.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.idempiere.zk.extra/buckminster.cspex b/org.idempiere.zk.extra/buckminster.cspex deleted file mode 100644 index 6ed1ff4efe..0000000000 --- a/org.idempiere.zk.extra/buckminster.cspex +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.idempiere.zk.extra/copyjars.xml b/org.idempiere.zk.extra/copyjars.xml deleted file mode 100644 index b384f75e31..0000000000 --- a/org.idempiere.zk.extra/copyjars.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/pom.xml b/pom.xml index f6e75e522a..ca542eacf4 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,6 @@ org.adempiere.replication-feature org.adempiere.pipo-feature org.adempiere.replication.server-feature - org.adempiere.sdk-feature org.adempiere.server-feature org.adempiere.target.platform-feature org.adempiere.ui.swing-feature