details:   /erp/devel/pi/rev/d9851f0e28db
changeset: 8737:d9851f0e28db
user:      Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
date:      Mon Oct 25 13:37:15 2010 +0200
summary:   Removed insertDummyHBLog method on InstancePurpose use instead the 
same method of InstanceManagement.

diffstat:

 src/org/openbravo/erpCommon/ad_forms/InstanceManagement.java |   2 +-
 src/org/openbravo/erpCommon/ad_forms/InstancePurpose.java    |  17 +-----------
 2 files changed, 2 insertions(+), 17 deletions(-)

diffs (57 lines):

diff -r 8fc8d404f947 -r d9851f0e28db 
src/org/openbravo/erpCommon/ad_forms/InstanceManagement.java
--- a/src/org/openbravo/erpCommon/ad_forms/InstanceManagement.java      Mon Oct 
25 13:29:54 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/InstanceManagement.java      Mon Oct 
25 13:37:15 2010 +0200
@@ -510,7 +510,7 @@
 
   }
 
-  private void insertDummyHBLog() throws ServletException {
+  static void insertDummyHBLog() throws ServletException {
     HeartbeatLog hbLog = OBProvider.getInstance().get(HeartbeatLog.class);
     hbLog.setClient(OBDal.getInstance().get(Client.class, "0"));
     hbLog.setOrganization(OBDal.getInstance().get(Organization.class, "0"));
diff -r 8fc8d404f947 -r d9851f0e28db 
src/org/openbravo/erpCommon/ad_forms/InstancePurpose.java
--- a/src/org/openbravo/erpCommon/ad_forms/InstancePurpose.java Mon Oct 25 
13:29:54 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/InstancePurpose.java Mon Oct 25 
13:37:15 2010 +0200
@@ -29,19 +29,14 @@
 
 import org.openbravo.base.filter.IsIDFilter;
 import org.openbravo.base.filter.ValueListFilter;
-import org.openbravo.base.provider.OBProvider;
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.erpCommon.ad_process.HeartbeatProcess;
 import org.openbravo.erpCommon.obps.ActivationKey;
 import org.openbravo.erpCommon.utility.ComboTableData;
-import org.openbravo.erpCommon.utility.SystemInfo;
 import org.openbravo.erpCommon.utility.Utility;
-import org.openbravo.model.ad.system.Client;
-import org.openbravo.model.ad.system.HeartbeatLog;
 import org.openbravo.model.ad.system.SystemInformation;
-import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.xmlEngine.XmlDocument;
 
 public class InstancePurpose extends HttpSecureAppServlet {
@@ -141,20 +136,10 @@
     systemInfo.setInstancePurpose(strPurpose);
     OBDal.getInstance().save(systemInfo);
     if (HeartbeatProcess.isClonedInstance()) {
-      insertDummyHBLog();
+      InstanceManagement.insertDummyHBLog();
     }
   }
 
-  private void insertDummyHBLog() throws ServletException {
-    HeartbeatLog hbLog = OBProvider.getInstance().get(HeartbeatLog.class);
-    hbLog.setClient(OBDal.getInstance().get(Client.class, "0"));
-    hbLog.setOrganization(OBDal.getInstance().get(Organization.class, "0"));
-    hbLog.setSystemIdentifier(SystemInfo.getSystemIdentifier());
-    hbLog.setDatabaseIdentifier(SystemInfo.getDBIdentifier());
-    hbLog.setMacIdentifier(SystemInfo.getMacAddress());
-    OBDal.getInstance().save(hbLog);
-  }
-
   @Override
   public String getServletInfo() {
     return "InstancePurpose pop-up form servlet.";

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to