diff --git a/migration/i1.0c-release/oracle/20130724102515_IDEMPIERE-1187.sql b/migration/i1.0c-release/oracle/20130724102515_IDEMPIERE-1187.sql new file mode 100644 index 0000000000..b07f6644de --- /dev/null +++ b/migration/i1.0c-release/oracle/20130724102515_IDEMPIERE-1187.sql @@ -0,0 +1,32 @@ +-- Jul 24, 2013 10:16:11 AM COT +-- IDEMPIERE-1187 in make menu window, when select "Summary Level", field "Window" still display +UPDATE AD_Field SET DisplayLogic='@Action@=W & @IsSummary@=N',Updated=TO_DATE('2013-07-24 10:16:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206 +; + +-- Jul 24, 2013 10:16:35 AM COT +-- IDEMPIERE-1187 in make menu window, when select "Summary Level", field "Window" still display +UPDATE AD_Field SET DisplayLogic='@Action@=X & @IsSummary@=N',Updated=TO_DATE('2013-07-24 10:16:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3612 +; + +-- Jul 24, 2013 10:16:48 AM COT +-- IDEMPIERE-1187 in make menu window, when select "Summary Level", field "Window" still display +UPDATE AD_Field SET DisplayLogic='@Action@=I & @IsSummary@=N',Updated=TO_DATE('2013-07-24 10:16:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201638 +; + +-- Jul 24, 2013 10:17:27 AM COT +-- IDEMPIERE-1187 in make menu window, when select "Summary Level", field "Window" still display +UPDATE AD_Field SET DisplayLogic='@Action@=P | @Action@=R & @IsSummary@=N',Updated=TO_DATE('2013-07-24 10:17:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2576 +; + +-- Jul 24, 2013 10:17:53 AM COT +-- IDEMPIERE-1187 in make menu window, when select "Summary Level", field "Window" still display +UPDATE AD_Field SET DisplayLogic='@Action@=T & @IsSummary@=N',Updated=TO_DATE('2013-07-24 10:17:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=208 +; + +-- Jul 24, 2013 10:18:05 AM COT +-- IDEMPIERE-1187 in make menu window, when select "Summary Level", field "Window" still display +UPDATE AD_Field SET DisplayLogic='@Action@=F & @IsSummary@=N',Updated=TO_DATE('2013-07-24 10:18:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207 +; + +SELECT register_migration_script('20130724102515_IDEMPIERE-1187.sql') FROM dual +; diff --git a/migration/i1.0c-release/oracle/201307301144_IDEMPIERE-840.sql b/migration/i1.0c-release/oracle/201307301144_IDEMPIERE-840.sql new file mode 100644 index 0000000000..2032a4f8a4 --- /dev/null +++ b/migration/i1.0c-release/oracle/201307301144_IDEMPIERE-840.sql @@ -0,0 +1,7 @@ +-- Jul 30, 2013 11:49:17 AM SGT +-- IDEMPIERE-840 Improvement to Request model class +UPDATE AD_ModelValidator SET IsActive='N',Updated=TO_DATE('2013-07-30 11:49:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ModelValidator_ID=200003 +; + +SELECT register_migration_script('201307301144_IDEMPIERE-840.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i1.0c-release/oracle/201307301502_IDEMPIERE-1162.sql b/migration/i1.0c-release/oracle/201307301502_IDEMPIERE-1162.sql new file mode 100644 index 0000000000..dbf3ad9488 --- /dev/null +++ b/migration/i1.0c-release/oracle/201307301502_IDEMPIERE-1162.sql @@ -0,0 +1,25 @@ +-- Jul 30, 2013 3:02:24 PM COT +-- IDEMPIERE-1162 +UPDATE R_MailText SET MailText='Dear @Name@, + +You are receiving this email because you (or somebody pretending to be you) said you have lost your iDempiere password. + +To access your iDempiere, use the temporary password from @AD_Client_ID@ below: +@#NewPassword@ + +Once you login, you will be directed to change password screen. Please change your password to something you can remember. + +Sincerely, +The iDempiere Accounts Team + +Note: This email address cannot accept replies.',Updated=TO_DATE('2013-07-30 15:02:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE R_MailText_ID=200000 +; + +-- Jul 30, 2013 3:02:24 PM COT +-- IDEMPIERE-1162 +UPDATE R_MailText_Trl SET IsTranslated='N' WHERE R_MailText_ID=200000 +; + +SELECT register_migration_script('201307301502_IDEMPIERE-1162.sql') FROM dual +; + diff --git a/migration/i1.0c-release/oracle/201307302339_IDEMPIERE-840.sql b/migration/i1.0c-release/oracle/201307302339_IDEMPIERE-840.sql new file mode 100644 index 0000000000..a5424fd7a7 --- /dev/null +++ b/migration/i1.0c-release/oracle/201307302339_IDEMPIERE-840.sql @@ -0,0 +1,7 @@ +-- Jul 30, 2013 11:33:11 PM SGT +-- IDEMPIERE-840 Improvement to Request model class +DELETE FROM AD_ModelValidator WHERE AD_ModelValidator_ID=200003 +; + +SELECT register_migration_script('201307302339_IDEMPIERE-840.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i1.0c-release/oracle/201307310904_IDEMPIERE-840.sql b/migration/i1.0c-release/oracle/201307310904_IDEMPIERE-840.sql new file mode 100644 index 0000000000..fc67f94a15 --- /dev/null +++ b/migration/i1.0c-release/oracle/201307310904_IDEMPIERE-840.sql @@ -0,0 +1,13 @@ +-- Jul 31, 2013 9:00:38 AM COT +-- IDEMPIERE-840 Improvement to Request model class +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','Sent by iDempiereMail',200218,'D','e1049e33-cbdc-4fc4-94fa-9e99f6bb07cc','RequestSentBy','Y',TO_DATE('2013-07-31 09:00:30','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_DATE('2013-07-31 09:00:30','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Jul 31, 2013 9:00:38 AM COT +-- IDEMPIERE-840 Improvement to Request model class +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200218 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +SELECT register_migration_script('201307310904_IDEMPIERE-840.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/20130724102515_IDEMPIERE-1187.sql b/migration/i1.0c-release/postgresql/20130724102515_IDEMPIERE-1187.sql new file mode 100644 index 0000000000..9ed5ce99fe --- /dev/null +++ b/migration/i1.0c-release/postgresql/20130724102515_IDEMPIERE-1187.sql @@ -0,0 +1,32 @@ +-- Jul 24, 2013 10:16:11 AM COT +-- IDEMPIERE-1187 in make menu window, when select "Summary Level", field "Window" still display +UPDATE AD_Field SET DisplayLogic='@Action@=W & @IsSummary@=N',Updated=TO_TIMESTAMP('2013-07-24 10:16:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206 +; + +-- Jul 24, 2013 10:16:35 AM COT +-- IDEMPIERE-1187 in make menu window, when select "Summary Level", field "Window" still display +UPDATE AD_Field SET DisplayLogic='@Action@=X & @IsSummary@=N',Updated=TO_TIMESTAMP('2013-07-24 10:16:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3612 +; + +-- Jul 24, 2013 10:16:48 AM COT +-- IDEMPIERE-1187 in make menu window, when select "Summary Level", field "Window" still display +UPDATE AD_Field SET DisplayLogic='@Action@=I & @IsSummary@=N',Updated=TO_TIMESTAMP('2013-07-24 10:16:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201638 +; + +-- Jul 24, 2013 10:17:27 AM COT +-- IDEMPIERE-1187 in make menu window, when select "Summary Level", field "Window" still display +UPDATE AD_Field SET DisplayLogic='@Action@=P | @Action@=R & @IsSummary@=N',Updated=TO_TIMESTAMP('2013-07-24 10:17:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2576 +; + +-- Jul 24, 2013 10:17:53 AM COT +-- IDEMPIERE-1187 in make menu window, when select "Summary Level", field "Window" still display +UPDATE AD_Field SET DisplayLogic='@Action@=T & @IsSummary@=N',Updated=TO_TIMESTAMP('2013-07-24 10:17:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=208 +; + +-- Jul 24, 2013 10:18:05 AM COT +-- IDEMPIERE-1187 in make menu window, when select "Summary Level", field "Window" still display +UPDATE AD_Field SET DisplayLogic='@Action@=F & @IsSummary@=N',Updated=TO_TIMESTAMP('2013-07-24 10:18:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=207 +; + +SELECT register_migration_script('20130724102515_IDEMPIERE-1187.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i1.0c-release/postgresql/201307301144_IDEMPIERE-840.sql b/migration/i1.0c-release/postgresql/201307301144_IDEMPIERE-840.sql new file mode 100644 index 0000000000..c61018980b --- /dev/null +++ b/migration/i1.0c-release/postgresql/201307301144_IDEMPIERE-840.sql @@ -0,0 +1,7 @@ +-- Jul 30, 2013 11:49:17 AM SGT +-- IDEMPIERE-840 Improvement to Request model class +UPDATE AD_ModelValidator SET IsActive='N',Updated=TO_TIMESTAMP('2013-07-30 11:49:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ModelValidator_ID=200003 +; + +SELECT register_migration_script('201307301144_IDEMPIERE-840.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i1.0c-release/postgresql/201307301502_IDEMPIERE-1162.sql b/migration/i1.0c-release/postgresql/201307301502_IDEMPIERE-1162.sql new file mode 100644 index 0000000000..82d04e05cc --- /dev/null +++ b/migration/i1.0c-release/postgresql/201307301502_IDEMPIERE-1162.sql @@ -0,0 +1,25 @@ +-- Jul 30, 2013 3:02:24 PM COT +-- IDEMPIERE-1162 +UPDATE R_MailText SET MailText='Dear @Name@, + +You are receiving this email because you (or somebody pretending to be you) said you have lost your iDempiere password. + +To access your iDempiere, use the temporary password from @AD_Client_ID@ below: +@#NewPassword@ + +Once you login, you will be directed to change password screen. Please change your password to something you can remember. + +Sincerely, +The iDempiere Accounts Team + +Note: This email address cannot accept replies.',Updated=TO_TIMESTAMP('2013-07-30 15:02:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE R_MailText_ID=200000 +; + +-- Jul 30, 2013 3:02:24 PM COT +-- IDEMPIERE-1162 +UPDATE R_MailText_Trl SET IsTranslated='N' WHERE R_MailText_ID=200000 +; + +SELECT register_migration_script('201307301502_IDEMPIERE-1162.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201307302339_IDEMPIERE-840.sql b/migration/i1.0c-release/postgresql/201307302339_IDEMPIERE-840.sql new file mode 100644 index 0000000000..a5424fd7a7 --- /dev/null +++ b/migration/i1.0c-release/postgresql/201307302339_IDEMPIERE-840.sql @@ -0,0 +1,7 @@ +-- Jul 30, 2013 11:33:11 PM SGT +-- IDEMPIERE-840 Improvement to Request model class +DELETE FROM AD_ModelValidator WHERE AD_ModelValidator_ID=200003 +; + +SELECT register_migration_script('201307302339_IDEMPIERE-840.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i1.0c-release/postgresql/201307310904_IDEMPIERE-840.sql b/migration/i1.0c-release/postgresql/201307310904_IDEMPIERE-840.sql new file mode 100644 index 0000000000..4e383774bb --- /dev/null +++ b/migration/i1.0c-release/postgresql/201307310904_IDEMPIERE-840.sql @@ -0,0 +1,13 @@ +-- Jul 31, 2013 9:00:38 AM COT +-- IDEMPIERE-840 Improvement to Request model class +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','Sent by iDempiereMail',200218,'D','e1049e33-cbdc-4fc4-94fa-9e99f6bb07cc','RequestSentBy','Y',TO_TIMESTAMP('2013-07-31 09:00:30','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_TIMESTAMP('2013-07-31 09:00:30','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Jul 31, 2013 9:00:38 AM COT +-- IDEMPIERE-840 Improvement to Request model class +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200218 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +SELECT register_migration_script('201307310904_IDEMPIERE-840.sql') FROM dual +; + diff --git a/org.adempiere.base/META-INF/MANIFEST.MF b/org.adempiere.base/META-INF/MANIFEST.MF index 7da5699e0e..2b0853b931 100644 --- a/org.adempiere.base/META-INF/MANIFEST.MF +++ b/org.adempiere.base/META-INF/MANIFEST.MF @@ -274,6 +274,7 @@ Import-Package: com.sun.mail.auth;version="1.4.5", org.apache.commons.net.ftp, org.apache.ecs, org.apache.ecs.xhtml, + org.apache.felix.scr;version="1.6.0", org.apache.poi.hssf.usermodel, org.apache.poi.ss.usermodel, org.apache.tools.ant, @@ -282,6 +283,7 @@ Import-Package: com.sun.mail.auth;version="1.4.5", org.eclipse.osgi.framework.console;version="1.1.0", org.eclipse.osgi.service.datalocation, org.osgi.framework, + org.osgi.service.cm;version="1.3.0", org.osgi.service.component;version="1.1.0", org.osgi.service.event;version="1.2.0", org.osgi.util.tracker;version="1.5.0", diff --git a/org.adempiere.base/OSGI-INF/archivedb.xml b/org.adempiere.base/OSGI-INF/archivedb.xml index 6f526e94a3..589bbcd8e1 100644 --- a/org.adempiere.base/OSGI-INF/archivedb.xml +++ b/org.adempiere.base/OSGI-INF/archivedb.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/archivefile.xml b/org.adempiere.base/OSGI-INF/archivefile.xml index 8db2274033..de71448ee3 100644 --- a/org.adempiere.base/OSGI-INF/archivefile.xml +++ b/org.adempiere.base/OSGI-INF/archivefile.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/attachmentdb.xml b/org.adempiere.base/OSGI-INF/attachmentdb.xml index 9a8be1e7b0..8675d48cf3 100644 --- a/org.adempiere.base/OSGI-INF/attachmentdb.xml +++ b/org.adempiere.base/OSGI-INF/attachmentdb.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/attachmentfile.xml b/org.adempiere.base/OSGI-INF/attachmentfile.xml index f04bf80d2f..3e4ec76687 100644 --- a/org.adempiere.base/OSGI-INF/attachmentfile.xml +++ b/org.adempiere.base/OSGI-INF/attachmentfile.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/broadcastutil.xml b/org.adempiere.base/OSGI-INF/broadcastutil.xml index e45b0789e2..1aaa64030e 100644 --- a/org.adempiere.base/OSGI-INF/broadcastutil.xml +++ b/org.adempiere.base/OSGI-INF/broadcastutil.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/defaultcolumncalloutfactory.xml b/org.adempiere.base/OSGI-INF/defaultcolumncalloutfactory.xml index 3ed6c19f65..1be3c871b8 100644 --- a/org.adempiere.base/OSGI-INF/defaultcolumncalloutfactory.xml +++ b/org.adempiere.base/OSGI-INF/defaultcolumncalloutfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/defaultdocfactory.xml b/org.adempiere.base/OSGI-INF/defaultdocfactory.xml index 806804c562..097416eec9 100644 --- a/org.adempiere.base/OSGI-INF/defaultdocfactory.xml +++ b/org.adempiere.base/OSGI-INF/defaultdocfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/defaultlookupfactory.xml b/org.adempiere.base/OSGI-INF/defaultlookupfactory.xml index 08c074aa56..c179b0e4fd 100644 --- a/org.adempiere.base/OSGI-INF/defaultlookupfactory.xml +++ b/org.adempiere.base/OSGI-INF/defaultlookupfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/defaultmodelfactory.xml b/org.adempiere.base/OSGI-INF/defaultmodelfactory.xml index b9c2d6c074..a30e945dbc 100644 --- a/org.adempiere.base/OSGI-INF/defaultmodelfactory.xml +++ b/org.adempiere.base/OSGI-INF/defaultmodelfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/defaultmodelvalidatorfactory.xml b/org.adempiere.base/OSGI-INF/defaultmodelvalidatorfactory.xml index f41c401212..0eb49cb1fc 100644 --- a/org.adempiere.base/OSGI-INF/defaultmodelvalidatorfactory.xml +++ b/org.adempiere.base/OSGI-INF/defaultmodelvalidatorfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/defaultpaymentprocessorfactory.xml b/org.adempiere.base/OSGI-INF/defaultpaymentprocessorfactory.xml index a45ade46f8..7cfe6ce078 100644 --- a/org.adempiere.base/OSGI-INF/defaultpaymentprocessorfactory.xml +++ b/org.adempiere.base/OSGI-INF/defaultpaymentprocessorfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/defaultprocessfactory.xml b/org.adempiere.base/OSGI-INF/defaultprocessfactory.xml index 9d9028fd00..cb9a088553 100644 --- a/org.adempiere.base/OSGI-INF/defaultprocessfactory.xml +++ b/org.adempiere.base/OSGI-INF/defaultprocessfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/defaultshipmentprocessorfactory.xml b/org.adempiere.base/OSGI-INF/defaultshipmentprocessorfactory.xml index 6605feb4a3..e9cf0e5299 100644 --- a/org.adempiere.base/OSGI-INF/defaultshipmentprocessorfactory.xml +++ b/org.adempiere.base/OSGI-INF/defaultshipmentprocessorfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/dslocator.xml b/org.adempiere.base/OSGI-INF/dslocator.xml index c318b703fb..b51caf07cf 100644 --- a/org.adempiere.base/OSGI-INF/dslocator.xml +++ b/org.adempiere.base/OSGI-INF/dslocator.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/eventmanager.xml b/org.adempiere.base/OSGI-INF/eventmanager.xml index a36b0ccff3..4c5ab7a980 100644 --- a/org.adempiere.base/OSGI-INF/eventmanager.xml +++ b/org.adempiere.base/OSGI-INF/eventmanager.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/keystore.xml b/org.adempiere.base/OSGI-INF/keystore.xml index eb288e633e..98bab605b6 100644 --- a/org.adempiere.base/OSGI-INF/keystore.xml +++ b/org.adempiere.base/OSGI-INF/keystore.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/metatype/metatype.xml b/org.adempiere.base/OSGI-INF/metatype/metatype.xml new file mode 100644 index 0000000000..3fa5b331c1 --- /dev/null +++ b/org.adempiere.base/OSGI-INF/metatype/metatype.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/org.adempiere.base/OSGI-INF/requesteventhandler.xml b/org.adempiere.base/OSGI-INF/requesteventhandler.xml new file mode 100644 index 0000000000..db7e6d403f --- /dev/null +++ b/org.adempiere.base/OSGI-INF/requesteventhandler.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/org.adempiere.base/OSGI-INF/requestpropertyservice.xml b/org.adempiere.base/OSGI-INF/requestpropertyservice.xml new file mode 100644 index 0000000000..88a264db5d --- /dev/null +++ b/org.adempiere.base/OSGI-INF/requestpropertyservice.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/org.adempiere.base/OSGI-INF/serverbean.xml b/org.adempiere.base/OSGI-INF/serverbean.xml index 201af98d9b..75ba3fcc4e 100644 --- a/org.adempiere.base/OSGI-INF/serverbean.xml +++ b/org.adempiere.base/OSGI-INF/serverbean.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/OSGI-INF/statusbean.xml b/org.adempiere.base/OSGI-INF/statusbean.xml index 5528079e58..1e63f707f1 100644 --- a/org.adempiere.base/OSGI-INF/statusbean.xml +++ b/org.adempiere.base/OSGI-INF/statusbean.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.base/build.properties b/org.adempiere.base/build.properties index e8a0395fc2..ba576364dc 100644 --- a/org.adempiere.base/build.properties +++ b/org.adempiere.base/build.properties @@ -28,6 +28,8 @@ bin.includes = META-INF/,\ OSGI-INF/defaultshipmentprocessorfactory.xml,\ OSGI-INF/defaultpaymentprocessorfactory.xml,\ OSGI-INF/broadcastutil.xml,\ + OSGI-INF/requesteventhandler.xml,\ + OSGI-INF/requestpropertyservice.xml,\ schema/ output.base.jar = build/ src.includes = schema/ diff --git a/org.adempiere.base/src/org/adempiere/base/BaseActivator.java b/org.adempiere.base/src/org/adempiere/base/BaseActivator.java index 0096e386f9..0b721650fc 100644 --- a/org.adempiere.base/src/org/adempiere/base/BaseActivator.java +++ b/org.adempiere.base/src/org/adempiere/base/BaseActivator.java @@ -42,6 +42,7 @@ import org.osgi.util.tracker.ServiceTracker; public class BaseActivator implements BundleActivator { private static BundleContext bundleContext = null; + private ComponentBlackListService blacklistService; /** * default constructor @@ -58,6 +59,8 @@ public class BaseActivator implements BundleActivator { loadInitProperties(Adempiere.getAdempiereHome()); bundleContext = context; context.registerService(CommandProvider.class.getName(), new StackTraceCommand(), null); + + blacklistService = new ComponentBlackListService(context); } /* @@ -114,6 +117,10 @@ public class BaseActivator implements BundleActivator { } } trackerCache.clear(); + if (blacklistService != null) { + blacklistService.stop(context); + blacklistService = null; + } Adempiere.stop(); } diff --git a/org.adempiere.base/src/org/adempiere/base/ComponentBlackListService.java b/org.adempiere.base/src/org/adempiere/base/ComponentBlackListService.java new file mode 100644 index 0000000000..ddefa16f38 --- /dev/null +++ b/org.adempiere.base/src/org/adempiere/base/ComponentBlackListService.java @@ -0,0 +1,129 @@ +/****************************************************************************** + * Copyright (C) 2012 Heng Sin Low * + * Copyright (C) 2012 Trek Global * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ +package org.adempiere.base; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.felix.scr.Component; +import org.apache.felix.scr.ScrService; +import org.compiere.util.Ini; +import org.compiere.util.Util; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceEvent; +import org.osgi.framework.ServiceListener; +import org.osgi.framework.ServiceReference; +import org.osgi.service.component.ComponentConstants; + +/** + * @author hengsin + * + */ +public class ComponentBlackListService implements ServiceListener { + + private ScrService scrService = null; + private List blackListComponentNames = null; + + protected ComponentBlackListService(BundleContext context) { + ServiceReference ref = context.getServiceReference(ScrService.class); + scrService = context.getService(ref); + blackListComponentNames = new ArrayList(); + retrieveBlacklistCandidates(); + if (!blackListComponentNames.isEmpty()) { + disableComponents(); + } + context.addServiceListener(this); + } + + public void stop(BundleContext context) { + scrService = null; + blackListComponentNames = null; + context.removeServiceListener(this); + } + + private void retrieveBlacklistCandidates() { + String path = Ini.getAdempiereHome(); + File file = new File(path, "components.blacklist"); + if (file.exists()) { + BufferedReader br = null; + try { + FileReader reader = new FileReader(file); + br = new BufferedReader(reader); + String s = null; + do { + s = br.readLine(); + if (!Util.isEmpty(s)) { + blackListComponentNames.add(s.trim()); + } + } while (s != null); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (br != null) { + try { + br.close(); + } catch (IOException e) {} + } + } + } + + } + + private void disableComponents() + { + Component[] comps = scrService.getComponents(); + for (Component comp : comps) { + if (blackListComponentNames.contains(comp.getName())) { + comp.disable(); + } + } + } + + private void disableComponent(String componentName) + { + Component[] comps = scrService.getComponents(); + for (Component comp : comps) { + if (comp.getName().equals(componentName)) { + comp.disable(); + break; + } + } + } + + /* (non-Javadoc) + * @see org.osgi.framework.ServiceListener#serviceChanged(org.osgi.framework.ServiceEvent) + */ + @Override + public void serviceChanged(ServiceEvent event) { + if (event.getType() == ServiceEvent.REGISTERED) { + if (scrService != null && !blackListComponentNames.isEmpty()) { + ServiceReference ref = event.getServiceReference(); + String name = (String) ref.getProperty(ComponentConstants.COMPONENT_NAME); + if (!Util.isEmpty(name)) { + if (blackListComponentNames.contains(name)) { + disableComponent(name); + } + } + } + } + } + +} diff --git a/org.adempiere.base/src/org/adempiere/base/event/IEventTopics.java b/org.adempiere.base/src/org/adempiere/base/event/IEventTopics.java index cd372aaf2b..990590cead 100644 --- a/org.adempiere.base/src/org/adempiere/base/event/IEventTopics.java +++ b/org.adempiere.base/src/org/adempiere/base/event/IEventTopics.java @@ -92,5 +92,7 @@ public interface IEventTopics { public static final String PREF_AFTER_LOAD = "adempiere/pref/afterLoad"; public static final String BROADCAST_MESSAGE = "idempiere/broadcastMsg"; + + public static final String REQUEST_SEND_EMAIL = "idempiere/requestSendEMail"; } diff --git a/org.adempiere.base/src/org/compiere/model/RequestValidator.java b/org.adempiere.base/src/org/adempiere/base/event/RequestEventHandler.java similarity index 76% rename from org.adempiere.base/src/org/compiere/model/RequestValidator.java rename to org.adempiere.base/src/org/adempiere/base/event/RequestEventHandler.java index 260283b2f4..4348922954 100644 --- a/org.adempiere.base/src/org/compiere/model/RequestValidator.java +++ b/org.adempiere.base/src/org/adempiere/base/event/RequestEventHandler.java @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2013 Elaine Tan * + * Copyright (C) 2013 Nur Yasmin * * Copyright (C) 2013 Trek Global * This program is free software; you can redistribute it and/or modify it * * under the terms version 2 of the GNU General Public License as published * @@ -11,8 +11,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * *****************************************************************************/ - -package org.compiere.model; +package org.adempiere.base.event; import static org.compiere.model.SystemIDs.MESSAGE_REQUESTUPDATE; @@ -21,75 +20,87 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; +import java.util.Dictionary; +import java.util.StringTokenizer; import java.util.logging.Level; -import org.adempiere.base.event.EventManager; -import org.adempiere.base.event.RequestSendEMailEventData; import org.adempiere.exceptions.DBException; +import org.compiere.model.I_R_Request; +import org.compiere.model.MClient; +import org.compiere.model.MNote; +import org.compiere.model.MRequest; +import org.compiere.model.MRequestAction; +import org.compiere.model.MRequestType; +import org.compiere.model.MRequestUpdate; +import org.compiere.model.MUser; +import org.compiere.model.PO; +import org.compiere.model.X_AD_User; +import org.compiere.model.X_R_Request; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.Msg; +import org.compiere.util.Util; +import org.osgi.service.cm.ConfigurationException; +import org.osgi.service.cm.ManagedService; import org.osgi.service.event.Event; -import org.osgi.service.event.EventHandler; /** - * - * @author Elaine + * Request event handler + * @author Nur Yasmin * */ -public class RequestValidator implements ModelValidator, EventHandler +public class RequestEventHandler extends AbstractEventHandler implements ManagedService { - public static final String ON_REQUEST_SEND_EMAIL_TOPIC = "onRequestSendEMail"; - - private static CLogger s_log = CLogger.getCLogger (RequestValidator.class); - - private int m_AD_Client_ID; + private static CLogger s_log = CLogger.getCLogger (RequestEventHandler.class); @Override - public void initialize(ModelValidationEngine engine, MClient client) + protected void doHandleEvent(Event event) { - if (client != null) - m_AD_Client_ID = client.getAD_Client_ID(); - engine.addModelChange(I_R_Request.Table_Name, this); - - if (EventManager.getInstance() != null) - EventManager.getInstance().register(ON_REQUEST_SEND_EMAIL_TOPIC, this); - } - - @Override - public int getAD_Client_ID() - { - return m_AD_Client_ID; - } - - @Override - public String login(int AD_Org_ID, int AD_Role_ID, int AD_User_ID) - { - return null; - } - - @Override - public String modelChange(PO po, int type) throws Exception - { - if (po instanceof MRequest ) + String topic = event.getTopic(); + if (topic.equals(IEventTopics.REQUEST_SEND_EMAIL)) { - MRequest r = (MRequest) po; - if (type == TYPE_BEFORE_NEW || type == TYPE_BEFORE_CHANGE) - beforeSaveRequest(r, type == TYPE_BEFORE_NEW); - else if (type == TYPE_AFTER_NEW || type == TYPE_AFTER_CHANGE) - afterSaveRequest(r, type == TYPE_AFTER_NEW); + RequestSendEMailEventData eventData = (RequestSendEMailEventData) event.getProperty(EventManager.EVENT_DATA); + if (!eventData.getClient().sendEMail(eventData.getFrom(), eventData.getTo(), eventData.getSubject(), eventData.getMessage(), eventData.getAttachment())) + { + int AD_Message_ID = MESSAGE_REQUESTUPDATE; + MNote note = new MNote(Env.getCtx(), AD_Message_ID, eventData.getTo().getAD_User_ID(), + X_R_Request.Table_ID, eventData.getRequestID(), + eventData.getSubject(), eventData.getMessage(), null); + note.save(); + } + } + else if (topic.equals(IEventTopics.PO_BEFORE_NEW) || topic.equals(IEventTopics.PO_BEFORE_CHANGE) + || topic.equals(IEventTopics.PO_AFTER_NEW) || topic.equals(IEventTopics.PO_AFTER_CHANGE)) + { + PO po = getPO(event); + if (po.get_TableName().equals(I_R_Request.Table_Name)) + { + MRequest r = (MRequest) po; + + MRequestType rt = r.getRequestType(); + if (ignoreRequestTypes.contains(rt.getName())) + return; + + if (topic.equals(IEventTopics.PO_BEFORE_NEW) || topic.equals(IEventTopics.PO_BEFORE_CHANGE)) + beforeSaveRequest(r, topic.equals(IEventTopics.PO_BEFORE_NEW)); + else if (topic.equals(IEventTopics.PO_AFTER_NEW) || topic.equals(IEventTopics.PO_AFTER_CHANGE)) + afterSaveRequest(r, topic.equals(IEventTopics.PO_AFTER_NEW)); + } } - return null; } @Override - public String docValidate(PO po, int timing) + protected void initialize() { - return null; + registerEvent(IEventTopics.REQUEST_SEND_EMAIL); + registerTableEvent(IEventTopics.PO_BEFORE_NEW, I_R_Request.Table_Name); + registerTableEvent(IEventTopics.PO_BEFORE_CHANGE, I_R_Request.Table_Name); + registerTableEvent(IEventTopics.PO_AFTER_NEW, I_R_Request.Table_Name); + registerTableEvent(IEventTopics.PO_AFTER_CHANGE, I_R_Request.Table_Name); } - public static String beforeSaveRequest(MRequest r, boolean newRecord) + private String beforeSaveRequest(MRequest r, boolean newRecord) { // New if (newRecord) @@ -208,7 +219,7 @@ public class RequestValidator implements ModelValidator, EventHandler return null; } - public static String afterSaveRequest(MRequest r, boolean newRecord) + private String afterSaveRequest(MRequest r, boolean newRecord) { // Initial Mail if (newRecord) @@ -223,7 +234,7 @@ public class RequestValidator implements ModelValidator, EventHandler * @param columnName column * @return true if changes */ - public static boolean checkChange (MRequest r, MRequestAction ra, String columnName) + public boolean checkChange (MRequest r, MRequestAction ra, String columnName) { if (r.is_ValueChanged(columnName)) { @@ -237,12 +248,12 @@ public class RequestValidator implements ModelValidator, EventHandler } return false; } // checkChange - + /** * Send Update EMail/Notices * @param list list of changes */ - public static void sendNotices(MRequest r, ArrayList list) + private void sendNotices(MRequest r, ArrayList list) { // Subject String subject = Msg.translate(r.getCtx(), "R_Request_ID") @@ -362,7 +373,7 @@ public class RequestValidator implements ModelValidator, EventHandler || X_AD_User.NOTIFICATIONTYPE_EMailPlusNotice.equals(NotificationType)) { RequestSendEMailEventData eventData = new RequestSendEMailEventData(client, from, to, subject, message.toString(), pdf, r.getR_Request_ID()); - Event event = EventManager.newEvent(ON_REQUEST_SEND_EMAIL_TOPIC, eventData); + Event event = EventManager.newEvent(IEventTopics.REQUEST_SEND_EMAIL, eventData); EventManager.getInstance().postEvent(event); } // Send Note @@ -393,30 +404,33 @@ public class RequestValidator implements ModelValidator, EventHandler * @param serverAddress server address * @return Mail Trailer */ - public static String getMailTrailer(MRequest r, String serverAddress) + private String getMailTrailer(MRequest r, String serverAddress) { StringBuffer sb = new StringBuffer("\n").append(MRequest.SEPARATOR) .append(Msg.translate(r.getCtx(), "R_Request_ID")) .append(": ").append(r.getDocumentNo()) .append(" ").append(r.getMailTag()) - .append("\nSent by AdempiereMail"); + .append("\n") + .append(Msg.getMsg(r.getCtx(), "RequestSentBy")); if (serverAddress != null) sb.append(" from ").append(serverAddress); return sb.toString(); } // getMailTrailer + public static final String IGNORE_REQUEST_TYPES = "ignoreRequestTypes"; + private static ArrayList ignoreRequestTypes = new ArrayList(); + + @SuppressWarnings("rawtypes") @Override - public void handleEvent(Event event) { - if (event.getTopic() == ON_REQUEST_SEND_EMAIL_TOPIC) - { - RequestSendEMailEventData eventData = (RequestSendEMailEventData) event.getProperty(EventManager.EVENT_DATA); - if (!eventData.getClient().sendEMail(eventData.getFrom(), eventData.getTo(), eventData.getSubject(), eventData.getMessage(), eventData.getAttachment())) - { - int AD_Message_ID = MESSAGE_REQUESTUPDATE; - MNote note = new MNote(Env.getCtx(), AD_Message_ID, eventData.getTo().getAD_User_ID(), - X_R_Request.Table_ID, eventData.getRequestID(), - eventData.getSubject(), eventData.getMessage(), null); - note.save(); + public void updated(Dictionary properties) throws ConfigurationException { + if (properties != null) { + String p = (String) properties.get(IGNORE_REQUEST_TYPES); + if (!Util.isEmpty(p)) { + ignoreRequestTypes.clear(); + + StringTokenizer st = new StringTokenizer(p, ";"); + while (st.hasMoreTokens()) + ignoreRequestTypes.add(st.nextToken().trim()); } } } diff --git a/org.adempiere.base/src/org/adempiere/base/event/RequestPropertyService.java b/org.adempiere.base/src/org/adempiere/base/event/RequestPropertyService.java new file mode 100644 index 0000000000..77a83920d0 --- /dev/null +++ b/org.adempiere.base/src/org/adempiere/base/event/RequestPropertyService.java @@ -0,0 +1,95 @@ +/****************************************************************************** + * Copyright (C) 2013 Elaine * + * Copyright (C) 2013 Trek Global + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ + +package org.adempiere.base.event; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Dictionary; +import java.util.Hashtable; +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.util.CLogger; +import org.compiere.util.Ini; +import org.compiere.util.Util; +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; +import org.osgi.service.cm.Configuration; +import org.osgi.service.cm.ConfigurationAdmin; + +/** + * Request property service + * @author Elaine + * + */ +public class RequestPropertyService { + + private static final String REQUESTEVENTHANDLER_PROPERTIES = "requesteventhandler.properties"; + + private static final CLogger logger = CLogger.getCLogger(RequestPropertyService.class); + + public RequestPropertyService() { + } + + public void bindConfigurationAdmin(ConfigurationAdmin configurationAdmin) { + readProperties(configurationAdmin); + } + + public void unbindConfigurationAdmin(ConfigurationAdmin configurationAdmin) { + + } + + private void readProperties(ConfigurationAdmin service) { + File file = new File(Ini.getAdempiereHome(), REQUESTEVENTHANDLER_PROPERTIES); + if (file.exists()) { + Properties p = new Properties(); + FileInputStream is = null; + try { + is = new FileInputStream(file); + p.load(is); + String ignoreRequesTypes = p.getProperty(RequestEventHandler.IGNORE_REQUEST_TYPES); + + if (!Util.isEmpty(ignoreRequesTypes)) { + Configuration configuration = service.getConfiguration(RequestEventHandler.class.getName()); + if (configuration.getProperties() == null) { + Dictionary map = new Hashtable(); + map.put(RequestEventHandler.IGNORE_REQUEST_TYPES, ignoreRequesTypes); + configuration.update(map); + } else { + Bundle bundle = FrameworkUtil.getBundle(RequestEventHandler.class); + String bundleLocation = bundle.getLocation(); + String configLocation = configuration.getBundleLocation(); + if (!bundleLocation.equals(configLocation)) { + configuration.setBundleLocation(bundleLocation); + configuration.update(); + } + } + } + } catch (FileNotFoundException e) { + logger.log(Level.WARNING, REQUESTEVENTHANDLER_PROPERTIES + " not found.", e); + } catch (IOException e) { + logger.log(Level.SEVERE, "Error reading " + REQUESTEVENTHANDLER_PROPERTIES, e); + } finally { + if (is != null) { + try { + is.close(); + } catch (Exception ex) {} + } + } + } + } +} diff --git a/org.adempiere.pipo/OSGI-INF/dictionaryservice.xml b/org.adempiere.pipo/OSGI-INF/dictionaryservice.xml index 5ae14e2897..c6d3f25d68 100644 --- a/org.adempiere.pipo/OSGI-INF/dictionaryservice.xml +++ b/org.adempiere.pipo/OSGI-INF/dictionaryservice.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.replication.server/OSGI-INF/serverfactory.xml b/org.adempiere.replication.server/OSGI-INF/serverfactory.xml index 51272f5252..5a87004a14 100644 --- a/org.adempiere.replication.server/OSGI-INF/serverfactory.xml +++ b/org.adempiere.replication.server/OSGI-INF/serverfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.report.jasper.swing/OSGI-INF/jrviewerprovider.xml b/org.adempiere.report.jasper.swing/OSGI-INF/jrviewerprovider.xml index 413fa59b41..d15ca6e471 100644 --- a/org.adempiere.report.jasper.swing/OSGI-INF/jrviewerprovider.xml +++ b/org.adempiere.report.jasper.swing/OSGI-INF/jrviewerprovider.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.server/OSGI-INF/acctprocessorfactory.xml b/org.adempiere.server/OSGI-INF/acctprocessorfactory.xml index ab965f7a41..13bb8bd797 100644 --- a/org.adempiere.server/OSGI-INF/acctprocessorfactory.xml +++ b/org.adempiere.server/OSGI-INF/acctprocessorfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.server/OSGI-INF/alertprocessorfactory.xml b/org.adempiere.server/OSGI-INF/alertprocessorfactory.xml index ef40ea2b28..8f59273fd2 100644 --- a/org.adempiere.server/OSGI-INF/alertprocessorfactory.xml +++ b/org.adempiere.server/OSGI-INF/alertprocessorfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.server/OSGI-INF/ldapprocessorfactory.xml b/org.adempiere.server/OSGI-INF/ldapprocessorfactory.xml index 7373533582..f53e45eccd 100644 --- a/org.adempiere.server/OSGI-INF/ldapprocessorfactory.xml +++ b/org.adempiere.server/OSGI-INF/ldapprocessorfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.server/OSGI-INF/requestprocessorfactory.xml b/org.adempiere.server/OSGI-INF/requestprocessorfactory.xml index edd62584bb..b629fcf88d 100644 --- a/org.adempiere.server/OSGI-INF/requestprocessorfactory.xml +++ b/org.adempiere.server/OSGI-INF/requestprocessorfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.server/OSGI-INF/schedulerfactory.xml b/org.adempiere.server/OSGI-INF/schedulerfactory.xml index 4947ceef93..369c1bd34f 100644 --- a/org.adempiere.server/OSGI-INF/schedulerfactory.xml +++ b/org.adempiere.server/OSGI-INF/schedulerfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.server/OSGI-INF/workflowprocessorfactory.xml b/org.adempiere.server/OSGI-INF/workflowprocessorfactory.xml index e1c53aa8f1..1cac2215eb 100644 --- a/org.adempiere.server/OSGI-INF/workflowprocessorfactory.xml +++ b/org.adempiere.server/OSGI-INF/workflowprocessorfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.swing/OSGI-INF/defaultcreatefromfactory.xml b/org.adempiere.ui.swing/OSGI-INF/defaultcreatefromfactory.xml index d8241452e3..a8e8a3eab7 100644 --- a/org.adempiere.ui.swing/OSGI-INF/defaultcreatefromfactory.xml +++ b/org.adempiere.ui.swing/OSGI-INF/defaultcreatefromfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.swing/OSGI-INF/defaulteditorfactory.xml b/org.adempiere.ui.swing/OSGI-INF/defaulteditorfactory.xml index 056127c492..b5b667baba 100644 --- a/org.adempiere.ui.swing/OSGI-INF/defaulteditorfactory.xml +++ b/org.adempiere.ui.swing/OSGI-INF/defaulteditorfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.swing/OSGI-INF/defaultformfactory.xml b/org.adempiere.ui.swing/OSGI-INF/defaultformfactory.xml index fda641665f..ecfac158fa 100644 --- a/org.adempiere.ui.swing/OSGI-INF/defaultformfactory.xml +++ b/org.adempiere.ui.swing/OSGI-INF/defaultformfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.swing/OSGI-INF/defaultinfofactory.xml b/org.adempiere.ui.swing/OSGI-INF/defaultinfofactory.xml index 996086f617..4b7475506b 100644 --- a/org.adempiere.ui.swing/OSGI-INF/defaultinfofactory.xml +++ b/org.adempiere.ui.swing/OSGI-INF/defaultinfofactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.swing/OSGI-INF/defaultpaymentformfactory.xml b/org.adempiere.ui.swing/OSGI-INF/defaultpaymentformfactory.xml index 6d0322ebdc..e987a82e55 100644 --- a/org.adempiere.ui.swing/OSGI-INF/defaultpaymentformfactory.xml +++ b/org.adempiere.ui.swing/OSGI-INF/defaultpaymentformfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.swing/OSGI-INF/defaultprintshippinglabel.xml b/org.adempiere.ui.swing/OSGI-INF/defaultprintshippinglabel.xml index ca778e4fd2..2b14a97e99 100644 --- a/org.adempiere.ui.swing/OSGI-INF/defaultprintshippinglabel.xml +++ b/org.adempiere.ui.swing/OSGI-INF/defaultprintshippinglabel.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.swing/OSGI-INF/reportviewerprovider.xml b/org.adempiere.ui.swing/OSGI-INF/reportviewerprovider.xml index 2ccca5a51e..ff537236c1 100644 --- a/org.adempiere.ui.swing/OSGI-INF/reportviewerprovider.xml +++ b/org.adempiere.ui.swing/OSGI-INF/reportviewerprovider.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.swing/OSGI-INF/resourcefinder.xml b/org.adempiere.ui.swing/OSGI-INF/resourcefinder.xml index 1c6d4d1522..52e76f4703 100644 --- a/org.adempiere.ui.swing/OSGI-INF/resourcefinder.xml +++ b/org.adempiere.ui.swing/OSGI-INF/resourcefinder.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.swing/OSGI-INF/serverinterface.xml b/org.adempiere.ui.swing/OSGI-INF/serverinterface.xml index 7fdd25a815..6b37644416 100644 --- a/org.adempiere.ui.swing/OSGI-INF/serverinterface.xml +++ b/org.adempiere.ui.swing/OSGI-INF/serverinterface.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.swing/OSGI-INF/statusinterface.xml b/org.adempiere.ui.swing/OSGI-INF/statusinterface.xml index 59ac0ed555..e69803a13c 100644 --- a/org.adempiere.ui.swing/OSGI-INF/statusinterface.xml +++ b/org.adempiere.ui.swing/OSGI-INF/statusinterface.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.zk/OSGI-INF/defaultcreatefromfactory.xml b/org.adempiere.ui.zk/OSGI-INF/defaultcreatefromfactory.xml index 11e052760b..61d94a4f84 100644 --- a/org.adempiere.ui.zk/OSGI-INF/defaultcreatefromfactory.xml +++ b/org.adempiere.ui.zk/OSGI-INF/defaultcreatefromfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.zk/OSGI-INF/defaulteditorfactory.xml b/org.adempiere.ui.zk/OSGI-INF/defaulteditorfactory.xml index d786feeb2c..1b6c3ec9e8 100644 --- a/org.adempiere.ui.zk/OSGI-INF/defaulteditorfactory.xml +++ b/org.adempiere.ui.zk/OSGI-INF/defaulteditorfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.zk/OSGI-INF/defaultformfactory.xml b/org.adempiere.ui.zk/OSGI-INF/defaultformfactory.xml index 1ce0229c2e..e281eef03d 100644 --- a/org.adempiere.ui.zk/OSGI-INF/defaultformfactory.xml +++ b/org.adempiere.ui.zk/OSGI-INF/defaultformfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.zk/OSGI-INF/defaultinfofactory.xml b/org.adempiere.ui.zk/OSGI-INF/defaultinfofactory.xml index bfcf4aa335..a5ed5f8f73 100644 --- a/org.adempiere.ui.zk/OSGI-INF/defaultinfofactory.xml +++ b/org.adempiere.ui.zk/OSGI-INF/defaultinfofactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.zk/OSGI-INF/defaultpaymentformfactory.xml b/org.adempiere.ui.zk/OSGI-INF/defaultpaymentformfactory.xml index 46febc59c2..91d13e16ac 100644 --- a/org.adempiere.ui.zk/OSGI-INF/defaultpaymentformfactory.xml +++ b/org.adempiere.ui.zk/OSGI-INF/defaultpaymentformfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.zk/OSGI-INF/defaultprintshippinglabel.xml b/org.adempiere.ui.zk/OSGI-INF/defaultprintshippinglabel.xml index 2f14bad4d9..7907584285 100644 --- a/org.adempiere.ui.zk/OSGI-INF/defaultprintshippinglabel.xml +++ b/org.adempiere.ui.zk/OSGI-INF/defaultprintshippinglabel.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.zk/OSGI-INF/feedbackservice.xml b/org.adempiere.ui.zk/OSGI-INF/feedbackservice.xml index 64c69dd91f..6fcf476799 100644 --- a/org.adempiere.ui.zk/OSGI-INF/feedbackservice.xml +++ b/org.adempiere.ui.zk/OSGI-INF/feedbackservice.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.zk/OSGI-INF/jrviewerprovider.xml b/org.adempiere.ui.zk/OSGI-INF/jrviewerprovider.xml index ed544e330f..33b21de28e 100644 --- a/org.adempiere.ui.zk/OSGI-INF/jrviewerprovider.xml +++ b/org.adempiere.ui.zk/OSGI-INF/jrviewerprovider.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.zk/OSGI-INF/processfactory.xml b/org.adempiere.ui.zk/OSGI-INF/processfactory.xml index 04cbf3c7da..6d9924ebe1 100644 --- a/org.adempiere.ui.zk/OSGI-INF/processfactory.xml +++ b/org.adempiere.ui.zk/OSGI-INF/processfactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.zk/OSGI-INF/reportviewerprovider.xml b/org.adempiere.ui.zk/OSGI-INF/reportviewerprovider.xml index ccfc5b04bf..0a7f0eeff1 100644 --- a/org.adempiere.ui.zk/OSGI-INF/reportviewerprovider.xml +++ b/org.adempiere.ui.zk/OSGI-INF/reportviewerprovider.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.zk/OSGI-INF/resourcefinder.xml b/org.adempiere.ui.zk/OSGI-INF/resourcefinder.xml index 788cb7d615..bccaa1a058 100644 --- a/org.adempiere.ui.zk/OSGI-INF/resourcefinder.xml +++ b/org.adempiere.ui.zk/OSGI-INF/resourcefinder.xml @@ -1,5 +1,5 @@ - + diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ResetPasswordPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ResetPasswordPanel.java index 2e505968de..af42ab737f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ResetPasswordPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ResetPasswordPanel.java @@ -509,7 +509,9 @@ public class ResetPasswordPanel extends Window implements EventListener to.set_ValueOfColumn("Password", newPassword); // will be hashed and validate on saveEx mailText.setUser(to); String message = mailText.getMailText(true); + Env.setContext(m_ctx, "#NewPassword", newPassword); message = Env.parseVariable(message, to, to.get_TrxName(), true); + Env.setContext(m_ctx, "#NewPassword", ""); EMail email = client.createEMail(to.getEMail(), mailText.getMailHeader(), message, mailText.isHtml()); if (mailText.isHtml()) email.setMessageHTML(mailText.getMailHeader(), message); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java index d2e6574e34..2f8728b8dc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java @@ -276,7 +276,7 @@ public class TreeSearchPanel extends Panel implements EventListener, Tree protected boolean isFolder(Treeitem treeItem) { List list = treeItem.getChildren(); for (Component c : list) { - if (c instanceof Treechildren && ((Treechildren)c).getChildren().size() > 1) { + if (c instanceof Treechildren && ((Treechildren)c).getChildren().size() > 0) { return true; } } diff --git a/org.compiere.db.oracle.provider/OSGI-INF/oracleprovider.xml b/org.compiere.db.oracle.provider/OSGI-INF/oracleprovider.xml index a0cf86b2c3..68ea4d6a50 100644 --- a/org.compiere.db.oracle.provider/OSGI-INF/oracleprovider.xml +++ b/org.compiere.db.oracle.provider/OSGI-INF/oracleprovider.xml @@ -1,5 +1,5 @@ - + diff --git a/org.compiere.db.postgresql.provider/OSGI-INF/pgprovider.xml b/org.compiere.db.postgresql.provider/OSGI-INF/pgprovider.xml index 43984b4889..5783951866 100644 --- a/org.compiere.db.postgresql.provider/OSGI-INF/pgprovider.xml +++ b/org.compiere.db.postgresql.provider/OSGI-INF/pgprovider.xml @@ -1,5 +1,5 @@ - + diff --git a/org.idempiere.fitnesse.fixture/OSGI-INF/fitfixturefactory.xml b/org.idempiere.fitnesse.fixture/OSGI-INF/fitfixturefactory.xml index fdfb4037fd..4a8acc2856 100644 --- a/org.idempiere.fitnesse.fixture/OSGI-INF/fitfixturefactory.xml +++ b/org.idempiere.fitnesse.fixture/OSGI-INF/fitfixturefactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.idempiere.fitnesse.fixture/OSGI-INF/slimfixturefactory.xml b/org.idempiere.fitnesse.fixture/OSGI-INF/slimfixturefactory.xml index 58b38ae24b..eea582a877 100644 --- a/org.idempiere.fitnesse.fixture/OSGI-INF/slimfixturefactory.xml +++ b/org.idempiere.fitnesse.fixture/OSGI-INF/slimfixturefactory.xml @@ -1,5 +1,5 @@ - + diff --git a/org.idempiere.hazelcast.service/OSGI-INF/cacheservice.xml b/org.idempiere.hazelcast.service/OSGI-INF/cacheservice.xml index 5b1e36ec51..6d5ab88e98 100644 --- a/org.idempiere.hazelcast.service/OSGI-INF/cacheservice.xml +++ b/org.idempiere.hazelcast.service/OSGI-INF/cacheservice.xml @@ -1,5 +1,5 @@ - + diff --git a/org.idempiere.hazelcast.service/OSGI-INF/clusterservice.xml b/org.idempiere.hazelcast.service/OSGI-INF/clusterservice.xml index 80236ee452..1ab0378e81 100644 --- a/org.idempiere.hazelcast.service/OSGI-INF/clusterservice.xml +++ b/org.idempiere.hazelcast.service/OSGI-INF/clusterservice.xml @@ -1,5 +1,5 @@ - + diff --git a/org.idempiere.hazelcast.service/OSGI-INF/messageservice.xml b/org.idempiere.hazelcast.service/OSGI-INF/messageservice.xml index 47af916129..a2a68454c3 100644 --- a/org.idempiere.hazelcast.service/OSGI-INF/messageservice.xml +++ b/org.idempiere.hazelcast.service/OSGI-INF/messageservice.xml @@ -1,5 +1,5 @@ - + diff --git a/org.idempiere.hazelcast.service/src/org/idempiere/hazelcast/service/Activator.java b/org.idempiere.hazelcast.service/src/org/idempiere/hazelcast/service/Activator.java index ad748f021e..d3e0f222e3 100644 --- a/org.idempiere.hazelcast.service/src/org/idempiere/hazelcast/service/Activator.java +++ b/org.idempiere.hazelcast.service/src/org/idempiere/hazelcast/service/Activator.java @@ -15,7 +15,6 @@ package org.idempiere.hazelcast.service; import java.io.File; import java.io.FileNotFoundException; -import java.net.MalformedURLException; import java.net.URL; import java.text.DateFormat; import java.util.Date; @@ -75,20 +74,45 @@ public class Activator implements BundleActivator { future = executor.submit(new Runnable() { @Override public void run() { - String dataArea = System.getProperty("osgi.install.area"); + File file = null; + //try idempiere home + String dataArea = System.getProperty("IDEMPIERE_HOME"); if (dataArea != null && dataArea.trim().length() > 0) { try { - URL url = new URL(dataArea); - File file = new File(url.getPath(), "hazelcast.xml"); - if (file.exists()) { - try { - Config config = new FileSystemXmlConfig(file); - hazelcastInstance = Hazelcast.newHazelcastInstance(config); - return; - } catch (FileNotFoundException e) {} - } - } catch (MalformedURLException e1) { + file = new File(dataArea, "hazelcast.xml"); + if (!file.exists()) + file = null; + } catch (Exception e) {} + } + //try working directory + if (file == null) { + dataArea = System.getProperty("user.dir"); + if (dataArea != null && dataArea.trim().length() > 0) { + try { + file = new File(dataArea, "hazelcast.xml"); + if (!file.exists()) + file = null; + } catch (Exception e) {} } + } + //try osgi install area + if (file == null) { + dataArea = System.getProperty("osgi.install.area"); + if (dataArea != null && dataArea.trim().length() > 0) { + try { + URL url = new URL(dataArea); + file = new File(url.getPath(), "hazelcast.xml"); + if (!file.exists()) + file = null; + } catch (Exception e) {} + } + } + if (file != null && file.exists()) { + try { + Config config = new FileSystemXmlConfig(file); + hazelcastInstance = Hazelcast.newHazelcastInstance(config); + return; + } catch (FileNotFoundException e) {} } hazelcastInstance = Hazelcast.newHazelcastInstance(null); } diff --git a/org.idempiere.ui.zk.selenium/OSGI-INF/fitfixturefactory.xml b/org.idempiere.ui.zk.selenium/OSGI-INF/fitfixturefactory.xml index 1a3d2201c8..a916384ef3 100644 --- a/org.idempiere.ui.zk.selenium/OSGI-INF/fitfixturefactory.xml +++ b/org.idempiere.ui.zk.selenium/OSGI-INF/fitfixturefactory.xml @@ -1,5 +1,5 @@ - +