details: http://code.openbravo.com/erp/devel/cr2/rev/f75fd0483bc3 changeset: 4628:f75fd0483bc3 user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Fri Aug 14 14:06:13 2009 +0200 summary: reverted changes in ad_process_request
details: http://code.openbravo.com/erp/devel/cr2/rev/ce003cf95934 changeset: 4629:ce003cf95934 user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Fri Aug 14 14:08:49 2009 +0200 summary: fixed ad_treenode details: http://code.openbravo.com/erp/devel/cr2/rev/9e0e5f1d9b5f changeset: 4630:9e0e5f1d9b5f user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Fri Aug 14 14:09:14 2009 +0200 summary: merge with pi details: http://code.openbravo.com/erp/devel/cr2/rev/c500ac259fe6 changeset: 4631:c500ac259fe6 user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Fri Aug 14 16:46:15 2009 +0200 summary: fixed after merge diffstat: src-db/database/sourcedata/AD_MESSAGE.xml | 33 + src-db/database/sourcedata/AD_PROCESS_REQUEST.xml | 61 +- src/build.xml | 4 +- src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java | 1 - src/org/openbravo/erpCommon/modules/ImportModule.java | 158 +- src/org/openbravo/erpCommon/modules/ModuleUtiltiy.java | 97 + src/org/openbravo/erpCommon/ops/ActivationKey.java | 378 +++++ src/org/openbravo/erpCommon/ops/ActiveInstanceProcess.java | 106 + src/org/openbravo/erpCommon/utility/HttpsUtils.java | 49 +- src/org/openbravo/erpCommon/utility/Utility.java | 36 +- src/org/openbravo/services/webservice/ModuleDependency.java | 36 - src/org/openbravo/services/webservice/WebServiceImpl.java | 23 +- src/org/openbravo/services/webservice/WebServiceImplServiceLocator.java | 7 +- src/org/openbravo/services/webservice/WebServiceSoapBindingImpl.java | 50 +- src/org/openbravo/services/webservice/WebServiceSoapBindingStub.java | 668 +-------- src/org/openbravo/services/webservice/deploy.wsdd | 195 +-- 16 files changed, 978 insertions(+), 924 deletions(-) diffs (truncated from 2626 to 300 lines): diff -r f2471003be24 -r c500ac259fe6 src-db/database/sourcedata/AD_MESSAGE.xml --- a/src-db/database/sourcedata/AD_MESSAGE.xml Fri Aug 14 13:29:01 2009 +0200 +++ b/src-db/database/sourcedata/AD_MESSAGE.xml Fri Aug 14 16:46:15 2009 +0200 @@ -63281,6 +63281,17 @@ <!--0EABAB89726A4A3C800199142CF8E17F--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> <!--0EABAB89726A4A3C800199142CF8E17F--></AD_MESSAGE> +<!--10E779E8F227496B86B3136A09EB6043--><AD_MESSAGE> +<!--10E779E8F227496B86B3136A09EB6043--> <AD_MESSAGE_ID><![CDATA[10E779E8F227496B86B3136A09EB6043]]></AD_MESSAGE_ID> +<!--10E779E8F227496B86B3136A09EB6043--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--10E779E8F227496B86B3136A09EB6043--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--10E779E8F227496B86B3136A09EB6043--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--10E779E8F227496B86B3136A09EB6043--> <VALUE><![CDATA[CR_OBXGetNotAuthorized]]></VALUE> +<!--10E779E8F227496B86B3136A09EB6043--> <MSGTEXT><![CDATA[This instance has not a license for this commercial module.]]></MSGTEXT> +<!--10E779E8F227496B86B3136A09EB6043--> <MSGTYPE><![CDATA[I]]></MSGTYPE> +<!--10E779E8F227496B86B3136A09EB6043--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--10E779E8F227496B86B3136A09EB6043--></AD_MESSAGE> + <!--11314163807C4401B2964F93256597EA--><AD_MESSAGE> <!--11314163807C4401B2964F93256597EA--> <AD_MESSAGE_ID><![CDATA[11314163807C4401B2964F93256597EA]]></AD_MESSAGE_ID> <!--11314163807C4401B2964F93256597EA--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -63525,6 +63536,17 @@ <!--2E175A7785AD4313B24D3E9034B05BAD--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> <!--2E175A7785AD4313B24D3E9034B05BAD--></AD_MESSAGE> +<!--2E658610941946F58CA77F17F6095E89--><AD_MESSAGE> +<!--2E658610941946F58CA77F17F6095E89--> <AD_MESSAGE_ID><![CDATA[2E658610941946F58CA77F17F6095E89]]></AD_MESSAGE_ID> +<!--2E658610941946F58CA77F17F6095E89--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--2E658610941946F58CA77F17F6095E89--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--2E658610941946F58CA77F17F6095E89--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--2E658610941946F58CA77F17F6095E89--> <VALUE><![CDATA[ErrorDownloadingOBX]]></VALUE> +<!--2E658610941946F58CA77F17F6095E89--> <MSGTEXT><![CDATA[An error occurred when downloading the OBX file.]]></MSGTEXT> +<!--2E658610941946F58CA77F17F6095E89--> <MSGTYPE><![CDATA[E]]></MSGTYPE> +<!--2E658610941946F58CA77F17F6095E89--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--2E658610941946F58CA77F17F6095E89--></AD_MESSAGE> + <!--2EB6F2EE079E41C3A9E416768353105F--><AD_MESSAGE> <!--2EB6F2EE079E41C3A9E416768353105F--> <AD_MESSAGE_ID><![CDATA[2EB6F2EE079E41C3A9E416768353105F]]></AD_MESSAGE_ID> <!--2EB6F2EE079E41C3A9E416768353105F--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -64532,6 +64554,17 @@ <!--BDBAEDC585EA4D06BACC9E2469003E4F--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> <!--BDBAEDC585EA4D06BACC9E2469003E4F--></AD_MESSAGE> +<!--BF73CD95240B43239E7C8F7BD83E03D5--><AD_MESSAGE> +<!--BF73CD95240B43239E7C8F7BD83E03D5--> <AD_MESSAGE_ID><![CDATA[BF73CD95240B43239E7C8F7BD83E03D5]]></AD_MESSAGE_ID> +<!--BF73CD95240B43239E7C8F7BD83E03D5--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--BF73CD95240B43239E7C8F7BD83E03D5--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--BF73CD95240B43239E7C8F7BD83E03D5--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--BF73CD95240B43239E7C8F7BD83E03D5--> <VALUE><![CDATA[NotCommercialModulesAllowed]]></VALUE> +<!--BF73CD95240B43239E7C8F7BD83E03D5--> <MSGTEXT><![CDATA[Commercial modules installation is not allowed in a Community Edition Instance.]]></MSGTEXT> +<!--BF73CD95240B43239E7C8F7BD83E03D5--> <MSGTYPE><![CDATA[E]]></MSGTYPE> +<!--BF73CD95240B43239E7C8F7BD83E03D5--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--BF73CD95240B43239E7C8F7BD83E03D5--></AD_MESSAGE> + <!--BFB1B3D4C3994CD78DA498EF0DC1E00C--><AD_MESSAGE> <!--BFB1B3D4C3994CD78DA498EF0DC1E00C--> <AD_MESSAGE_ID><![CDATA[BFB1B3D4C3994CD78DA498EF0DC1E00C]]></AD_MESSAGE_ID> <!--BFB1B3D4C3994CD78DA498EF0DC1E00C--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> diff -r f2471003be24 -r c500ac259fe6 src-db/database/sourcedata/AD_PROCESS_REQUEST.xml --- a/src-db/database/sourcedata/AD_PROCESS_REQUEST.xml Fri Aug 14 13:29:01 2009 +0200 +++ b/src-db/database/sourcedata/AD_PROCESS_REQUEST.xml Fri Aug 14 16:46:15 2009 +0200 @@ -26,32 +26,6 @@ <!--212D8CA4F6C840D3A4750F2967D905D7--> <CHANNEL><![CDATA[Direct]]></CHANNEL> <!--212D8CA4F6C840D3A4750F2967D905D7--></AD_PROCESS_REQUEST> -<!--4FAAF1DA36BC413C9E122A062D47611B--><AD_PROCESS_REQUEST> -<!--4FAAF1DA36BC413C9E122A062D47611B--> <AD_PROCESS_REQUEST_ID><![CDATA[4FAAF1DA36BC413C9E122A062D47611B]]></AD_PROCESS_REQUEST_ID> -<!--4FAAF1DA36BC413C9E122A062D47611B--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> -<!--4FAAF1DA36BC413C9E122A062D47611B--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> -<!--4FAAF1DA36BC413C9E122A062D47611B--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> -<!--4FAAF1DA36BC413C9E122A062D47611B--> <AD_PROCESS_ID><![CDATA[172]]></AD_PROCESS_ID> -<!--4FAAF1DA36BC413C9E122A062D47611B--> <AD_USER_ID><![CDATA[100]]></AD_USER_ID> -<!--4FAAF1DA36BC413C9E122A062D47611B--> <ISROLESECURITY><![CDATA[Y]]></ISROLESECURITY> -<!--4FAAF1DA36BC413C9E122A062D47611B--> <OB_CONTEXT><![CDATA[{"org.openbravo.scheduling.ProcessContext":{"user":100,"role":0,"language":"en_US","theme":"ltr\/Default","client":0,"organization":0,"warehouse":"","command":"SAVE_BUTTONActionButton172","userClient":"'0'","userOrganization":"'0'","dbSessionID":"C831B26967E342029AC2A4E53C64179F","javaDateFormat":"dd-MM-yyyy","javaDateTimeFormat":"dd-MM-yyyy HH:mm:ss","jsDateFormat":"%d-%m-%Y","sqlDateFormat":"DD-MM-YYYY","accessLevel":4,"roleSecurity":true}}]]></OB_CONTEXT> -<!--4FAAF1DA36BC413C9E122A062D47611B--> <STATUS><![CDATA[COM]]></STATUS> -<!--4FAAF1DA36BC413C9E122A062D47611B--> <CHANNEL><![CDATA[Direct]]></CHANNEL> -<!--4FAAF1DA36BC413C9E122A062D47611B--></AD_PROCESS_REQUEST> - -<!--639BC11F0DC541A8AAB5CDB7457067C8--><AD_PROCESS_REQUEST> -<!--639BC11F0DC541A8AAB5CDB7457067C8--> <AD_PROCESS_REQUEST_ID><![CDATA[639BC11F0DC541A8AAB5CDB7457067C8]]></AD_PROCESS_REQUEST_ID> -<!--639BC11F0DC541A8AAB5CDB7457067C8--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> -<!--639BC11F0DC541A8AAB5CDB7457067C8--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> -<!--639BC11F0DC541A8AAB5CDB7457067C8--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> -<!--639BC11F0DC541A8AAB5CDB7457067C8--> <AD_PROCESS_ID><![CDATA[174]]></AD_PROCESS_ID> -<!--639BC11F0DC541A8AAB5CDB7457067C8--> <AD_USER_ID><![CDATA[100]]></AD_USER_ID> -<!--639BC11F0DC541A8AAB5CDB7457067C8--> <ISROLESECURITY><![CDATA[Y]]></ISROLESECURITY> -<!--639BC11F0DC541A8AAB5CDB7457067C8--> <OB_CONTEXT><![CDATA[{"org.openbravo.scheduling.ProcessContext":{"user":100,"role":0,"language":"en_US","theme":"ltr\/Default","client":0,"organization":0,"warehouse":"","command":"SAVE_BUTTONImportFields174","userClient":"'0'","userOrganization":"'0'","dbSessionID":"968036BFA4CE430F874D497CC806E3B3","javaDateFormat":"dd-MM-yyyy","javaDateTimeFormat":"dd-MM-yyyy HH:mm:ss","jsDateFormat":"%d-%m-%Y","sqlDateFormat":"DD-MM-YYYY","accessLevel":4,"roleSecurity":true}}]]></OB_CONTEXT> -<!--639BC11F0DC541A8AAB5CDB7457067C8--> <STATUS><![CDATA[COM]]></STATUS> -<!--639BC11F0DC541A8AAB5CDB7457067C8--> <CHANNEL><![CDATA[Direct]]></CHANNEL> -<!--639BC11F0DC541A8AAB5CDB7457067C8--></AD_PROCESS_REQUEST> - <!--81436AE6D9694392A2069D91BF348F26--><AD_PROCESS_REQUEST> <!--81436AE6D9694392A2069D91BF348F26--> <AD_PROCESS_REQUEST_ID><![CDATA[81436AE6D9694392A2069D91BF348F26]]></AD_PROCESS_REQUEST_ID> <!--81436AE6D9694392A2069D91BF348F26--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -65,37 +39,6 @@ <!--81436AE6D9694392A2069D91BF348F26--> <CHANNEL><![CDATA[Direct]]></CHANNEL> <!--81436AE6D9694392A2069D91BF348F26--></AD_PROCESS_REQUEST> -<!--92E3015AB17C448889C524297F02A297--><AD_PROCESS_REQUEST> -<!--92E3015AB17C448889C524297F02A297--> <AD_PROCESS_REQUEST_ID><![CDATA[92E3015AB17C448889C524297F02A297]]></AD_PROCESS_REQUEST_ID> -<!--92E3015AB17C448889C524297F02A297--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> -<!--92E3015AB17C448889C524297F02A297--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> -<!--92E3015AB17C448889C524297F02A297--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> -<!--92E3015AB17C448889C524297F02A297--> <AD_PROCESS_ID><![CDATA[A822D4A68D1E4BB29E00D8B4D8D64FE6]]></AD_PROCESS_ID> -<!--92E3015AB17C448889C524297F02A297--> <AD_USER_ID><![CDATA[100]]></AD_USER_ID> -<!--92E3015AB17C448889C524297F02A297--> <ISROLESECURITY><![CDATA[Y]]></ISROLESECURITY> -<!--92E3015AB17C448889C524297F02A297--> <OB_CONTEXT><![CDATA[{"org.openbravo.scheduling.ProcessContext":{"user":100,"role":0,"language":"en_US","theme":"ltr\/Default","client":0,"organization":0,"warehouse":"","command":"DEFAULT","userClient":"","userOrganization":"","dbSessionID":"","javaDateFormat":"","jsDateFormat":"","sqlDateFormat":"","accessLevel":"","roleSecurity":true}}]]></OB_CONTEXT> -<!--92E3015AB17C448889C524297F02A297--> <STATUS><![CDATA[SCH]]></STATUS> -<!--92E3015AB17C448889C524297F02A297--> <NEXT_FIRE_TIME><![CDATA[2009-08-15 13:10:43.0]]></NEXT_FIRE_TIME> -<!--92E3015AB17C448889C524297F02A297--> <PREVIOUS_FIRE_TIME><![CDATA[2009-08-14 13:10:43.0]]></PREVIOUS_FIRE_TIME> -<!--92E3015AB17C448889C524297F02A297--> <CHANNEL><![CDATA[Process Scheduler]]></CHANNEL> -<!--92E3015AB17C448889C524297F02A297--> <TIMING_OPTION><![CDATA[S]]></TIMING_OPTION> -<!--92E3015AB17C448889C524297F02A297--> <FREQUENCY><![CDATA[4]]></FREQUENCY> -<!--92E3015AB17C448889C524297F02A297--> <DAILY_INTERVAL><![CDATA[1]]></DAILY_INTERVAL> -<!--92E3015AB17C448889C524297F02A297--> <DAY_MON><![CDATA[N]]></DAY_MON> -<!--92E3015AB17C448889C524297F02A297--> <DAY_TUE><![CDATA[N]]></DAY_TUE> -<!--92E3015AB17C448889C524297F02A297--> <DAY_WED><![CDATA[N]]></DAY_WED> -<!--92E3015AB17C448889C524297F02A297--> <DAY_THU><![CDATA[N]]></DAY_THU> -<!--92E3015AB17C448889C524297F02A297--> <DAY_FRI><![CDATA[N]]></DAY_FRI> -<!--92E3015AB17C448889C524297F02A297--> <DAY_SAT><![CDATA[N]]></DAY_SAT> -<!--92E3015AB17C448889C524297F02A297--> <DAY_SUN><![CDATA[N]]></DAY_SUN> -<!--92E3015AB17C448889C524297F02A297--> <MONTHLY_OPTION><![CDATA[S]]></MONTHLY_OPTION> -<!--92E3015AB17C448889C524297F02A297--> <FINISHES><![CDATA[N]]></FINISHES> -<!--92E3015AB17C448889C524297F02A297--> <DAILY_OPTION><![CDATA[N]]></DAILY_OPTION> -<!--92E3015AB17C448889C524297F02A297--> <SCHEDULE><![CDATA[N]]></SCHEDULE> -<!--92E3015AB17C448889C524297F02A297--> <RESCHEDULE><![CDATA[N]]></RESCHEDULE> -<!--92E3015AB17C448889C524297F02A297--> <UNSCHEDULE><![CDATA[N]]></UNSCHEDULE> -<!--92E3015AB17C448889C524297F02A297--></AD_PROCESS_REQUEST> - <!--9B2B32C0BAF146F783A50C6F69251BC4--><AD_PROCESS_REQUEST> <!--9B2B32C0BAF146F783A50C6F69251BC4--> <AD_PROCESS_REQUEST_ID><![CDATA[9B2B32C0BAF146F783A50C6F69251BC4]]></AD_PROCESS_REQUEST_ID> <!--9B2B32C0BAF146F783A50C6F69251BC4--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -106,8 +49,8 @@ <!--9B2B32C0BAF146F783A50C6F69251BC4--> <ISROLESECURITY><![CDATA[Y]]></ISROLESECURITY> <!--9B2B32C0BAF146F783A50C6F69251BC4--> <OB_CONTEXT><![CDATA[{"org.openbravo.scheduling.ProcessContext":{"user":100,"role":0,"language":"en_US","theme":"ltr\/Default","client":0,"organization":0,"warehouse":"","command":"DEFAULT","userClient":"","userOrganization":"","dbSessionID":"","javaDateFormat":"","jsDateFormat":"","sqlDateFormat":"","accessLevel":"","roleSecurity":true}}]]></OB_CONTEXT> <!--9B2B32C0BAF146F783A50C6F69251BC4--> <STATUS><![CDATA[SCH]]></STATUS> -<!--9B2B32C0BAF146F783A50C6F69251BC4--> <NEXT_FIRE_TIME><![CDATA[2009-08-14 13:18:43.0]]></NEXT_FIRE_TIME> -<!--9B2B32C0BAF146F783A50C6F69251BC4--> <PREVIOUS_FIRE_TIME><![CDATA[2009-08-14 13:17:43.0]]></PREVIOUS_FIRE_TIME> +<!--9B2B32C0BAF146F783A50C6F69251BC4--> <NEXT_FIRE_TIME><![CDATA[2009-07-11 14:20:06.0]]></NEXT_FIRE_TIME> +<!--9B2B32C0BAF146F783A50C6F69251BC4--> <PREVIOUS_FIRE_TIME><![CDATA[2009-07-11 14:19:06.0]]></PREVIOUS_FIRE_TIME> <!--9B2B32C0BAF146F783A50C6F69251BC4--> <CHANNEL><![CDATA[Process Scheduler]]></CHANNEL> <!--9B2B32C0BAF146F783A50C6F69251BC4--> <TIMING_OPTION><![CDATA[S]]></TIMING_OPTION> <!--9B2B32C0BAF146F783A50C6F69251BC4--> <FREQUENCY><![CDATA[2]]></FREQUENCY> diff -r f2471003be24 -r c500ac259fe6 src/build.xml --- a/src/build.xml Fri Aug 14 13:29:01 2009 +0200 +++ b/src/build.xml Fri Aug 14 16:46:15 2009 +0200 @@ -746,8 +746,8 @@ </delete> <mkdir dir="${build}" /> - <axis-wsdl2java output="${base.src}" verbose="false" url="http://centralrepository.openbravo.com/openbravo/services/WebService?wsdl" serverside="true" debug="false"> - <mapping namespace="http://centralrepository.openbravo.com/openbravo/services/WebService" package="org.openbravo.services.webservice" /> + <axis-wsdl2java output="${base.src}" verbose="false" url="http://124.124.55.214/openbravo/services/WebService?wsdl" serverside="true" debug="false"> + <mapping namespace="http://124.124.55.214/openbravo/services/WebService" package="org.openbravo.services.webservice" /> <mapping namespace="/services/WebService" package="org.openbravo.services.webservice" /> </axis-wsdl2java> </target> diff -r f2471003be24 -r c500ac259fe6 src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java --- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java Fri Aug 14 13:29:01 2009 +0200 +++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java Fri Aug 14 16:46:15 2009 +0200 @@ -787,7 +787,6 @@ OBError message; if (im.getIsLocal()) im.execute(((FileItem) vars.getSessionObject("ModuleManagementInstall|File")) - .getInputStream(), ((FileItem) vars.getSessionObject("ModuleManagementInstall|File")) .getInputStream()); else im.execute(); diff -r f2471003be24 -r c500ac259fe6 src/org/openbravo/erpCommon/modules/ImportModule.java --- a/src/org/openbravo/erpCommon/modules/ImportModule.java Fri Aug 14 13:29:01 2009 +0200 +++ b/src/org/openbravo/erpCommon/modules/ImportModule.java Fri Aug 14 16:46:15 2009 +0200 @@ -80,7 +80,7 @@ * */ public class ImportModule { - private static ConnectionProvider pool; + static ConnectionProvider pool; static Logger log4j = Logger.getLogger(ImportModule.class); private String obDir; private Database db; @@ -92,7 +92,7 @@ private Module[] modulesToUpdate = null; private StringBuffer log = new StringBuffer(); private int logLevel = 0; - private VariablesSecureApp vars; + VariablesSecureApp vars; public static final int MSG_SUCCESS = 0; public static final int MSG_WARN = 1; @@ -244,6 +244,7 @@ modulesToInstall = mid.getModulesToInstall(); modulesToUpdate = mid.getModulesToUpdate(); checked = mid.isValidConfiguration(); + return checked; } @@ -258,7 +259,18 @@ final File file = new File(fileName); if (!file.exists()) throw new Exception("File " + fileName + " do not exist!"); - execute(new FileInputStream(fileName), new FileInputStream(fileName)); + execute(new FileInputStream(fileName)); + } + + /** + * Deprecated, use instead ImportModule.execute(InputStream file) + * + * @param file + * @param file2 + */ + @Deprecated + public void execute(InputStream file, InputStream file2) { + execute(file); } /** @@ -268,7 +280,7 @@ * This method receives a InputStream of the obx file * */ - public void execute(InputStream file, InputStream file2) { + public void execute(InputStream file) { try { if (checked || force) { if (installLocally) { @@ -278,7 +290,11 @@ .getModuleID() : modulesToUpdate[0].getModuleID(); - installModule(file, moduleToInstallID); + final Vector<DynaBean> dynMod = new Vector<DynaBean>(); + final Vector<DynaBean> dynDep = new Vector<DynaBean>(); + final Vector<DynaBean> dynDbPrefix = new Vector<DynaBean>(); + + installModule(file, moduleToInstallID, dynMod, dynDep, dynDbPrefix); if (moduleToInstallID.equals("0")) Utility.mergeOpenbravoProperties(obDir + "/config/Openbravo.properties", obDir @@ -347,16 +363,19 @@ if (modulesToInstall != null) { for (int i = 0; i < modulesToInstall.length; i++) { try { - final byte[] getMod = ws.getModule(modulesToInstall[i].getModuleVersionID()); - ByteArrayInputStream obx = new ByteArrayInputStream(getMod); + // get remote module obx + InputStream obx = ModuleUtiltiy.getRemoteModule(this, modulesToInstall[i] + .getModuleVersionID()); + if (obx == null) { + return; + } - installModule(obx, modulesToInstall[i].getModuleID()); - // Add entries in .classpath for eclipse users final Vector<DynaBean> dynMod = new Vector<DynaBean>(); final Vector<DynaBean> dynDep = new Vector<DynaBean>(); final Vector<DynaBean> dynDbPrefix = new Vector<DynaBean>(); - obx = new ByteArrayInputStream(getMod); - getModulesFromObx(dynMod, dynDep, dynDbPrefix, obx); + installModule(obx, modulesToInstall[i].getModuleID(), dynMod, dynDep, dynDbPrefix); + + // Add entries in .classpath for eclipse users insertDynaModulesInDB(dynMod, dynDep, dynDbPrefix); addDynaClasspathEntries(dynMod); } catch (final Exception e) { @@ -380,14 +399,18 @@ if (modulesToUpdate != null) { for (int i = 0; i < modulesToUpdate.length; i++) { try { - final byte[] getMod = ws.getModule(modulesToUpdate[i].getModuleVersionID()); - installModule(new ByteArrayInputStream(getMod), modulesToUpdate[i].getModuleID()); + // get remote module obx + InputStream obx = ModuleUtiltiy.getRemoteModule(this, modulesToUpdate[i] + .getModuleVersionID()); + if (obx == null) { + return; + } final Vector<DynaBean> dynMod = new Vector<DynaBean>(); final Vector<DynaBean> dynDep = new Vector<DynaBean>(); final Vector<DynaBean> dynDBPrefix = new Vector<DynaBean>(); + installModule(obx, modulesToUpdate[i].getModuleID(), dynMod, dynDep, dynDBPrefix); - getModulesFromObx(dynMod, dynDep, dynDBPrefix, new ByteArrayInputStream(getMod)); insertDynaModulesInDB(dynMod, dynDep, dynDBPrefix); if (modulesToUpdate[i].getModuleID().equals("0")) @@ -440,6 +463,7 @@ } catch (final Exception e) { e.printStackTrace(); } + log4j.info("deleting files..."); Utility.deleteDir(core); } else { // updating a module different than core @@ -457,6 +481,7 @@ Zip.zip(obDir + "/modules/" + moduleInDB.javapackage, obDir + "/backup_install/" + moduleInDB.javapackage + "-" + moduleInDB.version + ".zip"); // Delete directory to be updated + log4j.info("deleting files..."); Utility.deleteDir(new File(obDir + "/modules/" + moduleInDB.javapackage)); ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits