details:   /erp/devel/pi/rev/b578ad7ac8a1
changeset: 12506:b578ad7ac8a1
user:      Stefan Hühner <stefan.huehner <at> openbravo.com>
date:      Thu May 26 20:33:36 2011 +0200
summary:   Fix line endings using dos2unix applied to files having crlf style 
line-ending

diffstat:

 
modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/CloneOrderActionHandler.java
 |  238 +++---
 
modules/org.openbravo.service.json/src/org/openbravo/service/json/OBStaleObjectException.java
                            |   90 +-
 src-core/utils/rmi/src/rmi/RenderFo.java                                       
                                          |  206 ++--
 src-core/utils/rmi/src/rmi/RenderFoI.java                                      
                                          |   42 +-
 src/org/openbravo/base/exception/OBException.java                              
                                          |  126 +-
 src/org/openbravo/base/exception/OBSecurityException.java                      
                                          |   94 +-
 src/org/openbravo/base/provider/OBNotSingleton.java                            
                                          |   58 +-
 src/org/openbravo/base/provider/OBProvidable.java                              
                                          |   56 +-
 src/org/openbravo/base/provider/OBProviderConfigReader.java                    
                                          |  210 +++---
 src/org/openbravo/base/provider/OBProviderException.java                       
                                          |   96 +-
 src/org/openbravo/base/provider/OBSingleton.java                               
                                          |   58 +-
 src/org/openbravo/base/util/ArgumentException.java                             
                                          |   98 +-
 src/org/openbravo/base/util/Check.java                                         
                                          |  350 +++++-----
 src/org/openbravo/base/util/CheckException.java                                
                                          |   98 +-
 src/org/openbravo/base/validation/ValidationException.java                     
                                          |  136 +-
 src/org/openbravo/dal/xml/EntityNotFoundException.java                         
                                          |   96 +-
 src/org/openbravo/dal/xml/EntityXMLException.java                              
                                          |  100 +-
 src/org/openbravo/service/OBServiceException.java                              
                                          |   96 +-
 src/org/openbravo/service/web/InvalidContentException.java                     
                                          |   96 +-
 src/org/openbravo/service/web/InvalidRequestException.java                     
                                          |   96 +-
 src/org/openbravo/service/web/ResourceNotFoundException.java                   
                                          |   96 +-
 21 files changed, 1268 insertions(+), 1268 deletions(-)

diffs (truncated from 2622 to 300 lines):

diff -r 2fedd965199c -r b578ad7ac8a1 
modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/CloneOrderActionHandler.java
--- 
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/CloneOrderActionHandler.java
  Thu May 26 19:21:39 2011 +0200
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/CloneOrderActionHandler.java
  Thu May 26 20:33:36 2011 +0200
@@ -1,119 +1,119 @@
-package org.openbravo.client.application.businesslogic;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.ServletException;
-
-import org.codehaus.jettison.json.JSONObject;
-import org.openbravo.base.exception.OBException;
-import org.openbravo.client.kernel.BaseActionHandler;
-import org.openbravo.dal.core.DalUtil;
-import org.openbravo.dal.service.OBDal;
-import org.openbravo.dal.service.OBQuery;
-import org.openbravo.model.common.order.Order;
-import org.openbravo.model.common.order.OrderLine;
-import org.openbravo.model.pricing.pricelist.PriceListVersion;
-import org.openbravo.service.db.CallStoredProcedure;
-import org.openbravo.service.json.DataResolvingMode;
-import org.openbravo.service.json.DataToJsonConverter;
-
-/**
- * When user on the Sales Order window and have a Sales Order displayed / 
selected, you then click a
- * button on the toolbar (where the 'new' order button is, among other 
buttons) called 'Clone
- * Order'. The process would then create a new order, and copy the information 
from the old order to
- * the new one.
- * 
- * @author Mallikarjun M
- * 
- */
-public class CloneOrderActionHandler extends BaseActionHandler {
-
-  protected JSONObject execute(Map<String, Object> parameters, String data) {
-    final DataToJsonConverter jsonConverter = new DataToJsonConverter();
-    JSONObject json = null;
-    try {
-      String orderId = (String) parameters.get("orderId");
-      Order objOrder = OBDal.getInstance().get(Order.class, orderId);
-      Order objCloneOrder = (Order) DalUtil.copy(objOrder, false);
-      objCloneOrder.setSummedLineAmount(new BigDecimal("0"));
-      objCloneOrder.setGrandTotalAmount(new BigDecimal("0"));
-      objCloneOrder.setDocumentAction("CO");
-      objCloneOrder.setDocumentStatus("DR");
-      objCloneOrder.setPosted("N");
-      objCloneOrder.setProcessed(false);
-      objCloneOrder.setSalesTransaction(true);
-      objCloneOrder.setDocumentNo(null);
-      // save the cloned order object
-      OBDal.getInstance().save(objCloneOrder);
-      // get the lines associated with the order and clone them to the new
-      // order line.
-      List<OrderLine> lsOrderLines = getOrderLines(objOrder);
-
-      for (OrderLine ordLine : lsOrderLines) {
-        String strPriceVersionId = 
getPriceListVersion(objOrder.getPriceList().getId(), objOrder
-            .getClient().getId());
-        BigDecimal bdPriceList = getPriceList(ordLine.getProduct().getId(), 
strPriceVersionId);
-        OrderLine objCloneOrdLine = (OrderLine) DalUtil.copy(ordLine, false);
-        objCloneOrdLine.setReservedQuantity(new BigDecimal("0"));//
-        objCloneOrdLine.setDeliveredQuantity(new BigDecimal("0"));//
-        objCloneOrdLine.setInvoicedQuantity(new BigDecimal("0"));//
-        objCloneOrdLine.setListPrice(bdPriceList);//
-        objCloneOrder.getOrderLineList().add(objCloneOrdLine);
-        objCloneOrdLine.setSalesOrder(objCloneOrder);
-      }
-      OBDal.getInstance().save(objCloneOrder);
-      OBDal.getInstance().flush();
-      json = jsonConverter.toJsonObject(objCloneOrder, DataResolvingMode.FULL);
-      OBDal.getInstance().commitAndClose();
-      return json;
-    } catch (Exception e) {
-      throw new OBException(e);
-    }
-  }
-
-  private List<OrderLine> getOrderLines(Order objOrder) throws 
ServletException {
-    String whereClause = "salesOrder = :objOrder";
-    OBQuery<OrderLine> qOrderLines = 
OBDal.getInstance().createQuery(OrderLine.class, whereClause);
-    qOrderLines.setNamedParameter("objOrder", objOrder);
-    return qOrderLines.list();
-  }
-
-  private String getPriceListVersion(String priceList, String clientId) {
-    try {
-      String whereClause = " as plv , PricingPriceList pl where pl.id=plv.id 
and plv.active='Y' and "
-          + " pl.id = :priceList and plv.client.id = :clientId order by 
plv.validFromDate desc";
-
-      OBQuery<PriceListVersion> ppriceListVersion = 
OBDal.getInstance().createQuery(
-          PriceListVersion.class, whereClause);
-      ppriceListVersion.setNamedParameter("priceList", priceList);
-      ppriceListVersion.setNamedParameter("clientId", clientId);
-
-      if (!ppriceListVersion.list().isEmpty()) {
-        return ppriceListVersion.list().get(0).getId();
-      } else {
-        return "0";
-      }
-    } catch (Exception e) {
-      throw new OBException(e);
-    }
-  }
-
-  private BigDecimal getPriceList(String strProductID, String 
strPriceVersionId) {
-    BigDecimal bdPriceList = null;
-    try {
-      final List<Object> parameters = new ArrayList<Object>();
-      parameters.add(strProductID);
-      parameters.add(strPriceVersionId);
-      final String procedureName = "M_BOM_PriceList";
-      bdPriceList = (BigDecimal) 
CallStoredProcedure.getInstance().call(procedureName, parameters,
-          null);
-    } catch (Exception e) {
-      throw new OBException(e);
-    }
-
-    return (bdPriceList);
-  }
-}
+package org.openbravo.client.application.businesslogic;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.base.exception.OBException;
+import org.openbravo.client.kernel.BaseActionHandler;
+import org.openbravo.dal.core.DalUtil;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.dal.service.OBQuery;
+import org.openbravo.model.common.order.Order;
+import org.openbravo.model.common.order.OrderLine;
+import org.openbravo.model.pricing.pricelist.PriceListVersion;
+import org.openbravo.service.db.CallStoredProcedure;
+import org.openbravo.service.json.DataResolvingMode;
+import org.openbravo.service.json.DataToJsonConverter;
+
+/**
+ * When user on the Sales Order window and have a Sales Order displayed / 
selected, you then click a
+ * button on the toolbar (where the 'new' order button is, among other 
buttons) called 'Clone
+ * Order'. The process would then create a new order, and copy the information 
from the old order to
+ * the new one.
+ * 
+ * @author Mallikarjun M
+ * 
+ */
+public class CloneOrderActionHandler extends BaseActionHandler {
+
+  protected JSONObject execute(Map<String, Object> parameters, String data) {
+    final DataToJsonConverter jsonConverter = new DataToJsonConverter();
+    JSONObject json = null;
+    try {
+      String orderId = (String) parameters.get("orderId");
+      Order objOrder = OBDal.getInstance().get(Order.class, orderId);
+      Order objCloneOrder = (Order) DalUtil.copy(objOrder, false);
+      objCloneOrder.setSummedLineAmount(new BigDecimal("0"));
+      objCloneOrder.setGrandTotalAmount(new BigDecimal("0"));
+      objCloneOrder.setDocumentAction("CO");
+      objCloneOrder.setDocumentStatus("DR");
+      objCloneOrder.setPosted("N");
+      objCloneOrder.setProcessed(false);
+      objCloneOrder.setSalesTransaction(true);
+      objCloneOrder.setDocumentNo(null);
+      // save the cloned order object
+      OBDal.getInstance().save(objCloneOrder);
+      // get the lines associated with the order and clone them to the new
+      // order line.
+      List<OrderLine> lsOrderLines = getOrderLines(objOrder);
+
+      for (OrderLine ordLine : lsOrderLines) {
+        String strPriceVersionId = 
getPriceListVersion(objOrder.getPriceList().getId(), objOrder
+            .getClient().getId());
+        BigDecimal bdPriceList = getPriceList(ordLine.getProduct().getId(), 
strPriceVersionId);
+        OrderLine objCloneOrdLine = (OrderLine) DalUtil.copy(ordLine, false);
+        objCloneOrdLine.setReservedQuantity(new BigDecimal("0"));//
+        objCloneOrdLine.setDeliveredQuantity(new BigDecimal("0"));//
+        objCloneOrdLine.setInvoicedQuantity(new BigDecimal("0"));//
+        objCloneOrdLine.setListPrice(bdPriceList);//
+        objCloneOrder.getOrderLineList().add(objCloneOrdLine);
+        objCloneOrdLine.setSalesOrder(objCloneOrder);
+      }
+      OBDal.getInstance().save(objCloneOrder);
+      OBDal.getInstance().flush();
+      json = jsonConverter.toJsonObject(objCloneOrder, DataResolvingMode.FULL);
+      OBDal.getInstance().commitAndClose();
+      return json;
+    } catch (Exception e) {
+      throw new OBException(e);
+    }
+  }
+
+  private List<OrderLine> getOrderLines(Order objOrder) throws 
ServletException {
+    String whereClause = "salesOrder = :objOrder";
+    OBQuery<OrderLine> qOrderLines = 
OBDal.getInstance().createQuery(OrderLine.class, whereClause);
+    qOrderLines.setNamedParameter("objOrder", objOrder);
+    return qOrderLines.list();
+  }
+
+  private String getPriceListVersion(String priceList, String clientId) {
+    try {
+      String whereClause = " as plv , PricingPriceList pl where pl.id=plv.id 
and plv.active='Y' and "
+          + " pl.id = :priceList and plv.client.id = :clientId order by 
plv.validFromDate desc";
+
+      OBQuery<PriceListVersion> ppriceListVersion = 
OBDal.getInstance().createQuery(
+          PriceListVersion.class, whereClause);
+      ppriceListVersion.setNamedParameter("priceList", priceList);
+      ppriceListVersion.setNamedParameter("clientId", clientId);
+
+      if (!ppriceListVersion.list().isEmpty()) {
+        return ppriceListVersion.list().get(0).getId();
+      } else {
+        return "0";
+      }
+    } catch (Exception e) {
+      throw new OBException(e);
+    }
+  }
+
+  private BigDecimal getPriceList(String strProductID, String 
strPriceVersionId) {
+    BigDecimal bdPriceList = null;
+    try {
+      final List<Object> parameters = new ArrayList<Object>();
+      parameters.add(strProductID);
+      parameters.add(strPriceVersionId);
+      final String procedureName = "M_BOM_PriceList";
+      bdPriceList = (BigDecimal) 
CallStoredProcedure.getInstance().call(procedureName, parameters,
+          null);
+    } catch (Exception e) {
+      throw new OBException(e);
+    }
+
+    return (bdPriceList);
+  }
+}
diff -r 2fedd965199c -r b578ad7ac8a1 
modules/org.openbravo.service.json/src/org/openbravo/service/json/OBStaleObjectException.java
--- 
a/modules/org.openbravo.service.json/src/org/openbravo/service/json/OBStaleObjectException.java
     Thu May 26 19:21:39 2011 +0200
+++ 
b/modules/org.openbravo.service.json/src/org/openbravo/service/json/OBStaleObjectException.java
     Thu May 26 20:33:36 2011 +0200
@@ -1,45 +1,45 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2011 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.service.json;
-
-import org.openbravo.base.exception.OBException;
-
-/**
- * Is thrown when the json converter tries to update a BaseOBObject and the 
json value for the
- * updated column is different from the value in the BaseOBObject.
- * 
- * @author mtaal
- */
-public class OBStaleObjectException extends OBException {
-
-  private static final long serialVersionUID = 1L;
-
-  public OBStaleObjectException() {
-    super();
-  }
-
-  public OBStaleObjectException(String message, Throwable cause) {
-    super(message, cause);
-  }
-
-  public OBStaleObjectException(String message) {
-    super(message);
-  }
-}
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to