Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014208Openbravo ERPA. Platformpublic2010-08-16 20:342010-08-18 11:11
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
pi 
 
Core
No
0014208: Translation import & export code should be separated from the servlet for starting those actions
Currently the import & export translation code is contained directly in the org.openbravo.erpCommon.ad_forms.Translation servlet which displays the UI for these actions.
This should be refactored to have the UI separate from the code doing the import & export as its better practice and decreases the amount of needed compilation for the 'ant compile.apply.module' task which makes this fast slightly faster and more important more stable against code-changes in other parts of the system.
Create a new TranslationManager class and move all import & export related functions from the Translation class to this new file. Then from the Translation servlet and ApplyModule.java just call the new class instead of methods integrated in the servlet.
No tags attached.
related to feature request 0014207 closed shuehner Remove HttpSecureAppServlet dependency from Utility class 
Issue History
2010-08-16 20:34shuehnerNew Issue
2010-08-16 20:34shuehnerAssigned To => shuehner
2010-08-16 20:34shuehnerRelationship addedrelated to 0014207
2010-08-17 17:05hgbotCheckin
2010-08-17 17:05hgbotNote Added: 0030078
2010-08-17 17:05hgbotStatusnew => resolved
2010-08-17 17:05hgbotResolutionopen => fixed
2010-08-17 17:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fbd378943dad6cb2352e920367f9db762603ede2 [^]
2010-08-17 17:57hgbotCheckin
2010-08-17 17:57hgbotNote Added: 0030082
2010-08-17 17:57hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/fbd378943dad6cb2352e920367f9db762603ede2 [^] => http://code.openbravo.com/erp/devel/pi/rev/e87917805d6890f01c2dca07b3f5fed562bc3828 [^]
2010-08-17 18:19marvintmNote Added: 0030085
2010-08-17 18:19marvintmStatusresolved => closed
2010-08-18 00:00anonymoussf_bug_id0 => 3047311
2010-08-18 11:11hudsonbotCheckin
2010-08-18 11:11hudsonbotNote Added: 0030108
2010-08-18 11:11hudsonbotCheckin
2010-08-18 11:11hudsonbotNote Added: 0030109

Notes
(0030078)
hgbot   
2010-08-17 17:05   
Repository: erp/devel/pi
Changeset: fbd378943dad6cb2352e920367f9db762603ede2
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Tue Aug 17 16:17:22 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/fbd378943dad6cb2352e920367f9db762603ede2 [^]

Fixed 14208: Extract import/export translation out of servlet into a new file
- separate servlet Translation.java from logic to do the import & export of
  translation from/to xml files which is now in a new class TranslationManager
- Update References in TranslationHandler to use new classname
- Keep public api of the Translation class intact by forwarding calls to new
  class (but see behavior change below)
- Changes done to new TranslationManager: use constant logger, explicit passing
  of a ConnectionProvider instance in the methods instead of relying on a
  setter for this on class level
- Call this new class from the servlet & the apply.module ant task (which does
  import translation for installed translation modules)
- Behavior change: Don't use caller provider log4j instance anymore (ignored
  now) but instead a constant logger in the class itself as rest of the code
- These changes together reduce the set of classes needed to be compiled in the
  compile.apply.module task and further allows trimming the manually maintained
  list of xsql-files for this task

---
M src/build.xml
M src/org/openbravo/erpCommon/ad_forms/Translation.java
M src/org/openbravo/erpCommon/ad_forms/TranslationHandler.java
M src/org/openbravo/erpCommon/modules/ApplyModule.java
A src/org/openbravo/erpCommon/ad_forms/TranslationManager.java
---
(0030082)
hgbot   
2010-08-17 17:57   
Repository: erp/devel/pi
Changeset: e87917805d6890f01c2dca07b3f5fed562bc3828
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Tue Aug 17 17:56:23 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e87917805d6890f01c2dca07b3f5fed562bc3828 [^]

Fixed 14208: Mark two old methods as deprected
- Mark setLog4j and setConnectionProvicer as deprecated in the Translation class
- don't call/use those methods anymore from the servlet

---
M src/org/openbravo/erpCommon/ad_forms/Translation.java
---
(0030085)
marvintm   
2010-08-17 18:19   
Code-reviewed the diff (looks fine) and verified that Applymodules (language import), and Translation Export and Import work correctly.
(0030108)
hudsonbot   
2010-08-18 11:11   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/fbd378943dad [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/52a5fdcc29a4 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18180.obx [^]
(0030109)
hudsonbot   
2010-08-18 11:11   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/e87917805d68 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/52a5fdcc29a4 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18180.obx [^]