svn commit: r554761 - in /ofbiz/trunk/specialpurpose/oagis: config/oagis.properties src/org/ofbiz/oagis/OagisInventoryServices.java src/org/ofbiz/oagis/OagisShipmentServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r554761 - in /ofbiz/trunk/specialpurpose/oagis: config/oagis.properties src/org/ofbiz/oagis/OagisInventoryServices.java src/org/ofbiz/oagis/OagisShipmentServices.java

apatel-2
Author: apatel
Date: Mon Jul  9 13:45:52 2007
New Revision: 554761

URL: http://svn.apache.org/viewvc?view=rev&rev=554761
Log:
Simple clean ups. Now facilityId and locationSeqId is read from properties file.

Modified:
    ofbiz/trunk/specialpurpose/oagis/config/oagis.properties
    ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
    ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java

Modified: ofbiz/trunk/specialpurpose/oagis/config/oagis.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/config/oagis.properties?view=diff&rev=554761&r1=554760&r2=554761
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/config/oagis.properties (original)
+++ ofbiz/trunk/specialpurpose/oagis/config/oagis.properties Mon Jul  9 13:45:52 2007
@@ -27,6 +27,9 @@
 Oagis.Template.ReceiveDelivery=component://oagis/widget/MessageInfoScreens.xml#ReceiveDelivery
 Oagis.Template.ProcessShipment=component://oagis/widget/MessageInfoScreens.xml#ProcessShipment
 
+Oagis.Warehouse.facilityId=WebStoreWarehouse
+Oagis.Warehouse.locationId=
+
 # Client Cert, etc settings
 #auth.client.certificate.alias=testrpckey
 #auth.basic.username=foo

Modified: ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java?view=diff&rev=554761&r1=554760&r2=554761
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java (original)
+++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java Mon Jul  9 13:45:52 2007
@@ -47,6 +47,7 @@
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilDateTime;
 import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericValue;
@@ -473,7 +474,7 @@
         
         if (userLogin == null) {
             try {
-                userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "admin"));
+                userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system"));
             } catch (GenericEntityException e) {
                 Debug.logError(e, "Error getting userLogin", module);
             }
@@ -610,10 +611,11 @@
         } else if ( invItemStatus.equals("ReceivedTONotAvailable") || invItemStatus.equals("AvailableTONotAvailable") ) {
             cipCtx.put("statusId", "INV_ON_HOLD");
         }
+
+        String facilityId = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.facilityId");
+        String locationSeqId = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.locationId");
           
         //prepare MAp for receiveInventoryProduct service
-        String facilityId = "WebStoreWarehouse";
-        String locationSeqId = "FAC_AVNET_AZ";
         cipCtx.put("facilityId", facilityId);
         cipCtx.put("locationSeqId", locationSeqId);
         cipCtx.put("productId", productId);

Modified: ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java?view=diff&rev=554761&r1=554760&r2=554761
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java (original)
+++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java Mon Jul  9 13:45:52 2007
@@ -460,9 +460,9 @@
         MapStack bodyParameters =  MapStack.create();
         if (userLogin == null) {
             try {
-                userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "admin"));
+                userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system"));
             } catch (GenericEntityException e) {
-                Debug.logError(e, "Error getting userLogin", module);
+                Debug.logError(e, "Error getting system userLogin", module);
             }
         }
         if (returnId != null) {
@@ -604,9 +604,10 @@
                 result.put("bsrRevision", "001");
                 result.put("processingStatusId", statusId);        
                 result.put("returnId", returnId);
+                
                 result.put("userLogin", userLogin);
             }
         }    
         return result;
     }
-}
+}
\ No newline at end of file