You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2009/08/17 10:20:42 UTC

svn commit: r804895 [2/7] - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/agreement/ applications/accounting/src/org/ofbiz/accounting/invoice/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/src/org...

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java Mon Aug 17 08:20:38 2009
@@ -119,11 +119,11 @@
 
             TransactionUtil.begin();
             List contentPurposeList = ContentWorker.prepContentPurposeList(passedParams);
-            passedParams.put("contentPurposeList", contentPurposeList );
+            passedParams.put("contentPurposeList", contentPurposeList);
             String entityOperation = (String)passedParams.get("entityOperation");
             String passedContentId = (String)passedParams.get("ftlContentId");
             List targetOperationList = ContentWorker.prepTargetOperationList(passedParams, entityOperation);
-            passedParams.put("targetOperationList", targetOperationList );
+            passedParams.put("targetOperationList", targetOperationList);
             // Create or update FTL template
             Map ftlContext = FastMap.newInstance();
             ftlContext.put("userLogin", userLogin);
@@ -155,13 +155,13 @@
                 return "error";
             }
             String ftlContentId = (String)ftlResults.get("contentId");
-            if (UtilValidate.isNotEmpty(contentIdTo) ) {
+            if (UtilValidate.isNotEmpty(contentIdTo)) {
                 Map map = FastMap.newInstance();
                     map.put("fromDate", UtilDateTime.nowTimestamp());
                     map.put("contentId", ftlContentId);
                     map.put("contentIdTo", contentIdTo);
                     map.put("userLogin", userLogin);
-                if (UtilValidate.isEmpty(contentAssocTypeId) && UtilValidate.isEmpty(passedContentId) && UtilValidate.isNotEmpty(contentIdTo) ) {
+                if (UtilValidate.isEmpty(contentAssocTypeId) && UtilValidate.isEmpty(passedContentId) && UtilValidate.isNotEmpty(contentIdTo)) {
                     // switch the association order because we are really not linking to the forum
                     // but showing that this content is released to that forum.
                     map.put("contentIdTo", ftlContentId);
@@ -170,7 +170,7 @@
                 } else if (contentAssocTypeId.equals("PUBLISH_LINK")) {
                     map.put("contentAssocTypeId", "PUBLISH_LINK");
                     String publishOperation = (String)passedParams.get("publishOperation");
-                    if (UtilValidate.isEmpty(publishOperation) ) {
+                    if (UtilValidate.isEmpty(publishOperation)) {
                         publishOperation = "CONTENT_PUBLISH";
                     }
                     map.put("targetOperationList", StringUtil.split(publishOperation, "|"));
@@ -197,7 +197,7 @@
             if (Debug.infoOn()) Debug.logInfo("[UploadContentAndImage]ftlContentId:" + ftlContentId, module);
             //if (Debug.infoOn()) Debug.logInfo("[UploadContentAndImage]ftlDataResourceId:" + ftlDataResourceId, module);
             // Create or update summary text subContent
-            if ( passedParams.containsKey("summaryData") ) {
+            if (passedParams.containsKey("summaryData")) {
                 Map sumContext = FastMap.newInstance();
                 sumContext.put("userLogin", userLogin);
                 sumContext.put("contentId", passedParams.get("sumContentId"));
@@ -227,7 +227,7 @@
             }
 
             // Create or update electronic text subContent
-            if ( passedParams.containsKey("textData") ) {
+            if (passedParams.containsKey("textData")) {
                 Map txtContext = FastMap.newInstance();
                 txtContext.put("userLogin", userLogin);
                 txtContext.put("contentId", passedParams.get("txtContentId"));
@@ -324,7 +324,7 @@
             request.setAttribute("passedParams", passedParams);
             //if (Debug.infoOn()) Debug.logInfo("[UploadContentAndImage]newTrail: " + newTrail, module);
             TransactionUtil.commit();
-        } catch ( Exception e) {
+        } catch (Exception e) {
             Debug.logError(e, "[UploadContentAndImage] " , module);
             request.setAttribute("_ERROR_MESSAGE_", e.getMessage());
             try {
@@ -410,7 +410,7 @@
                 }
             }
             TransactionUtil.commit();
-        } catch ( Exception e) {
+        } catch (Exception e) {
             Debug.logError(e, "[UploadContentAndImage] " , module);
             request.setAttribute("_ERROR_MESSAGE_", e.getMessage());
             try {
@@ -448,7 +448,7 @@
 
             ftlContext.put("userLogin", userLogin);
             Object objSequenceNum = passedParams.get("caSequenceNum");
-            if (objSequenceNum != null ) {
+            if (objSequenceNum != null) {
                 if (objSequenceNum instanceof String) {
                     Long sequenceNum = null;
                     try {

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataEvents.java Mon Aug 17 08:20:38 2009
@@ -353,13 +353,13 @@
         //ContentManagementWorker.mruAdd(session, pk);
 
         String returnStr = "success";
-        if (mode.equals("CREATE") ) {
+        if (mode.equals("CREATE")) {
             // Set up return message to guide selection of follow on view
-            request.setAttribute("dataResourceId", result.get("dataResourceId") );
+            request.setAttribute("dataResourceId", result.get("dataResourceId"));
             String dataResourceTypeId = (String)serviceInMap.get("dataResourceTypeId");
             if (dataResourceTypeId != null) {
                  if (dataResourceTypeId.equals("ELECTRONIC_TEXT")
-                     || dataResourceTypeId.equals("IMAGE_OBJECT") ) {
+                     || dataResourceTypeId.equals("IMAGE_OBJECT")) {
                     returnStr = dataResourceTypeId;
                  }
             }

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataServices.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataServices.java Mon Aug 17 08:20:38 2009
@@ -101,7 +101,7 @@
             String dataTemplateTypeId = (String) context.get("dataTemplateTypeId");
             if (UtilValidate.isEmpty(dataTemplateTypeId)) {
                 dataTemplateTypeId = "NONE";
-                context.put("dataTemplateTypeId", dataTemplateTypeId );
+                context.put("dataTemplateTypeId", dataTemplateTypeId);
             }
 
             // If textData exists, then create DataResource and return dataResourceId

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java Mon Aug 17 08:20:38 2009
@@ -165,7 +165,7 @@
         } catch (GenericEntityException e3) {
             request.setAttribute("_ERROR_MESSAGE_", e3.getMessage());
             return "error";
-        } catch ( GenericServiceException e) {
+        } catch (GenericServiceException e) {
             request.setAttribute("_ERROR_MESSAGE_", e.getMessage());
             return "error";
         }
@@ -269,7 +269,7 @@
                     GenericValue dataResourceContentView  = (GenericValue)lst.get(0);
                     contentId = (String)dataResourceContentView.get("coContentId");
                 }
-            } catch ( GenericEntityException e) {
+            } catch (GenericEntityException e) {
                 request.setAttribute("_ERROR_MESSAGE_", e.getMessage());
                 return "error";
             }
@@ -300,7 +300,7 @@
 
                 //Debug.logVerbose("in replaceSubContent, context2:" + context2, module);
                 Map result2 = dispatcher.runSync("deactivateAssocs", context2);
-            } catch ( GenericServiceException e) {
+            } catch (GenericServiceException e) {
                 request.setAttribute("_ERROR_MESSAGE_", e.getMessage());
                 return "error";
             }
@@ -523,7 +523,7 @@
 
             //Debug.logVerbose("in replaceSubContent, context2:" + context2, module);
             Map result2 = dispatcher.runSync("deactivateAssocs", context2);
-        } catch ( GenericServiceException e) {
+        } catch (GenericServiceException e) {
             request.setAttribute("_ERROR_MESSAGE_", e.getMessage());
             return "error";
         }
@@ -595,7 +595,7 @@
             //Debug.logVerbose("in replaceSubContent, context2:" + context2, module);
             Map result2 = dispatcher.runSync("deactivateAssocs", context2);
             */
-        } catch ( GenericServiceException e) {
+        } catch (GenericServiceException e) {
             request.setAttribute("_ERROR_MESSAGE_", e.getMessage());
             return "error";
         }
@@ -608,7 +608,7 @@
         String entityName = (String)paramMap.get("entityName");
         Locale locale = UtilHttp.getLocale(request);
 
-        if (UtilValidate.isEmpty(entityName) ) {
+        if (UtilValidate.isEmpty(entityName)) {
             String errMsg = UtilProperties.getMessage(LayoutEvents.err_resource, "layoutEvents.entityname_empty", locale);
             request.setAttribute("_ERROR_MESSAGE_", errMsg);
             return "error";

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java Mon Aug 17 08:20:38 2009
@@ -92,7 +92,7 @@
             }
         }
 
-        if (imageFi == null ) {
+        if (imageFi == null) {
             Map messageMap = UtilMisc.toMap("imageFi", imageFi);
             String errMsg = UtilProperties.getMessage(LayoutWorker.err_resource, "layoutEvents.image_null", messageMap, locale);
             request.setAttribute("_ERROR_MESSAGE_", errMsg);

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeByteArrayInputStream.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeByteArrayInputStream.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeByteArrayInputStream.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeByteArrayInputStream.java Mon Aug 17 08:20:38 2009
@@ -60,9 +60,9 @@
 
         try {
             close();
-        } catch ( IOException e) {
+        } catch (IOException e) {
             String errMsg = e.getMessage();
-            throw new com.sun.star.io.IOException( errMsg, this );
+            throw new com.sun.star.io.IOException(errMsg, this);
         }
 
     }
@@ -73,9 +73,9 @@
         byte [] buf2 = new byte[pos2];
         try {
             bytesRead = super.read(buf2);
-        } catch ( IOException e) {
+        } catch (IOException e) {
             String errMsg = e.getMessage();
-            throw new com.sun.star.io.IOException( errMsg, this );
+            throw new com.sun.star.io.IOException(errMsg, this);
         }
 
         if (bytesRead > 0) {

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeByteArrayOutputStream.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeByteArrayOutputStream.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeByteArrayOutputStream.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeByteArrayOutputStream.java Mon Aug 17 08:20:38 2009
@@ -49,7 +49,7 @@
       {
           try {
               write(buf);
-          } catch ( java.io.IOException e ) {
+          } catch (java.io.IOException e) {
               throw(new com.sun.star.io.IOException(e.getMessage()));
           }
       }
@@ -59,7 +59,7 @@
           try {
               super.flush();
               close();
-          } catch ( java.io.IOException e ) {
+          } catch (java.io.IOException e) {
               throw(new com.sun.star.io.IOException(e.getMessage()));
           }
       }
@@ -68,7 +68,7 @@
       {
           try {
               super.flush();
-          } catch ( java.io.IOException e ) {
+          } catch (java.io.IOException e) {
           }
       }
 

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeWorker.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/openoffice/OpenOfficeWorker.java Mon Aug 17 08:20:38 2009
@@ -345,7 +345,7 @@
         return extension;
 
     }
-    public static String convertToUrl(String filePath, XComponentContext xComponentContext ) throws MalformedURLException {
+    public static String convertToUrl(String filePath, XComponentContext xComponentContext) throws MalformedURLException {
 
         String returnUrl = null;
         File f = new File(filePath);

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchWorker.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchWorker.java Mon Aug 17 08:20:38 2009
@@ -222,7 +222,7 @@
 
     public static void indexDataResource(GenericDelegator delegator, Map context, String id) throws Exception {
         String path = null;
-        indexDataResource(delegator, context, id, path );
+        indexDataResource(delegator, context, id, path);
     }
 
     public static void indexDataResource(GenericDelegator delegator, Map context, String id, String path) throws Exception {

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java Mon Aug 17 08:20:38 2009
@@ -282,7 +282,7 @@
                 String value = fs.getField(fieldName);
 
                 List questions = delegator.findByAnd("SurveyQuestionAndAppl", UtilMisc.toMap("surveyId", surveyId, "externalFieldRef", fieldName));
-                if (questions.size() == 0 ) {
+                if (questions.size() == 0) {
                     Debug.logInfo("No question found for surveyId:" + surveyId + " and externalFieldRef:" + fieldName, module);
                     continue;
                 }

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/InjectNodeTrailCsvTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/InjectNodeTrailCsvTransform.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/InjectNodeTrailCsvTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/InjectNodeTrailCsvTransform.java Mon Aug 17 08:20:38 2009
@@ -99,7 +99,7 @@
                 if (Debug.infoOn()) Debug.logInfo("in InjectNodeTrailCsv(0), trail:"+trail,module);
                 // This will build a nodeTrail if none exists
                 // Maybe only contentId or subContentId are passed in
-                //GenericValue currentValue = getCurrentContent( delegator, trail,  userLogin, templateCtx, nullThruDatesOnly, contentAssocPredicateId);
+                //GenericValue currentValue = getCurrentContent(delegator, trail,  userLogin, templateCtx, nullThruDatesOnly, contentAssocPredicateId);
                 String redo = (String)templateCtx.get("redo");
 
                 if (trail == null || trail.size() == 0 || (redo != null && redo.equalsIgnoreCase("true"))) {
@@ -146,7 +146,7 @@
                                 String firstTrailContentId = (String)nd.get("contentId");
                                 if (UtilValidate.isNotEmpty(firstTrailContentId)
                                     && UtilValidate.isNotEmpty(lastPassedContentId)
-                                    && firstTrailContentId.equals(lastPassedContentId) ) {
+                                    && firstTrailContentId.equals(lastPassedContentId)) {
                                     csvTrail += "," + ContentWorker.nodeTrailToCsv(trail.subList(1, trail.size()));
                                 } else {
                                     csvTrail += "," + ContentWorker.nodeTrailToCsv(trail);

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java Mon Aug 17 08:20:38 2009
@@ -101,7 +101,7 @@
                     String txt = null;
 
                     String mapKey = (String)templateRoot.get("mapKey");
-                    if ( UtilValidate.isEmpty(mapKey)) {
+                    if (UtilValidate.isEmpty(mapKey)) {
                         txt = ContentWorker.renderContentAsText(dispatcher, delegator, thisContentId, templateRoot, locale, mimeTypeId, true);
                     } else {
                         txt = ContentWorker.renderSubContentAsText(dispatcher, delegator, thisContentId, mapKey, templateRoot, locale, mimeTypeId, true);

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java Mon Aug 17 08:20:38 2009
@@ -214,25 +214,25 @@
                 //if (Debug.infoOn()) Debug.logInfo("in Render(0), view ." + view , module);
                 if (view != null) {
                     ModelEntity modelEntity = view.getModelEntity();
-                    if (UtilValidate.isEmpty(contentId) && modelEntity.getField("caContentId") != null )
+                    if (UtilValidate.isEmpty(contentId) && modelEntity.getField("caContentId") != null)
                         contentId = view.getString("caContentId");
-                    if (UtilValidate.isEmpty(contentId) && modelEntity.getField("contentId") != null )
+                    if (UtilValidate.isEmpty(contentId) && modelEntity.getField("contentId") != null)
                         contentId = view.getString("contentId");
-                    if (UtilValidate.isEmpty(contentIdTo) && modelEntity.getField("caContentIdTo") != null )
+                    if (UtilValidate.isEmpty(contentIdTo) && modelEntity.getField("caContentIdTo") != null)
                         contentIdTo = view.getString("caContentIdTo");
-                    if (UtilValidate.isEmpty(contentIdTo) && modelEntity.getField("contentIdTo") != null )
+                    if (UtilValidate.isEmpty(contentIdTo) && modelEntity.getField("contentIdTo") != null)
                         contentIdTo = view.getString("contentIdTo");
-                    if (UtilValidate.isEmpty(contentAssocTypeId) && modelEntity.getField("caContentAssocTypeId") != null )
+                    if (UtilValidate.isEmpty(contentAssocTypeId) && modelEntity.getField("caContentAssocTypeId") != null)
                         contentAssocTypeId = view.getString("caContentAssocTypeId");
-                    if (UtilValidate.isEmpty(contentAssocTypeId) && modelEntity.getField("contentAssocTypeId") != null )
+                    if (UtilValidate.isEmpty(contentAssocTypeId) && modelEntity.getField("contentAssocTypeId") != null)
                         contentAssocTypeId = view.getString("contentAssocTypeId");
-                    if (UtilValidate.isEmpty(mapKey) && modelEntity.getField("caMapKey") != null )
+                    if (UtilValidate.isEmpty(mapKey) && modelEntity.getField("caMapKey") != null)
                         mapKey = view.getString("caMapKey");
-                    if (UtilValidate.isEmpty(mapKey) && modelEntity.getField("mapKey") != null )
+                    if (UtilValidate.isEmpty(mapKey) && modelEntity.getField("mapKey") != null)
                         mapKey = view.getString("mapKey");
-                    if (UtilValidate.isEmpty(fromDate) && modelEntity.getField("caFromDate") != null )
+                    if (UtilValidate.isEmpty(fromDate) && modelEntity.getField("caFromDate") != null)
                         fromDate = view.getString("caFromDate");
-                    if (UtilValidate.isEmpty(fromDate) && modelEntity.getField("fromDate") != null )
+                    if (UtilValidate.isEmpty(fromDate) && modelEntity.getField("fromDate") != null)
                         fromDate = view.getString("fromDate");
                 }
                 if (Debug.infoOn()) Debug.logInfo("in Render(0), contentIdTo ." + contentIdTo , module);

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java Mon Aug 17 08:20:38 2009
@@ -68,17 +68,17 @@
         final HttpServletRequest request = (HttpServletRequest) FreeMarkerWorker.getWrappedObject("request", env);
         final HttpServletResponse response = (HttpServletResponse) FreeMarkerWorker.getWrappedObject("response", env);
         final Map templateRoot = FreeMarkerWorker.createEnvironmentMap(env);
-        //if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, contentId(0):" + templateRoot.get( "contentId"), module);
+        //if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, contentId(0):" + templateRoot.get("contentId"), module);
         FreeMarkerWorker.getSiteParameters(request, templateRoot);
         final Map savedValuesUp = FastMap.newInstance();
         FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp);
         FreeMarkerWorker.overrideWithArgs(templateRoot, args);
-        //if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, contentId(2):" + templateRoot.get( "contentId"), module);
+        //if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, contentId(2):" + templateRoot.get("contentId"), module);
         final GenericValue userLogin = (GenericValue) FreeMarkerWorker.getWrappedObject("userLogin", env);
-        List trail = (List)templateRoot.get( "globalNodeTrail");
+        List trail = (List)templateRoot.get("globalNodeTrail");
         //if (Debug.infoOn()) Debug.logInfo("in Render(0), globalNodeTrail ." + trail , module);
-        String contentAssocPredicateId = (String)templateRoot.get( "contentAssocPredicateId");
-        String strNullThruDatesOnly = (String)templateRoot.get( "nullThruDatesOnly");
+        String contentAssocPredicateId = (String)templateRoot.get("contentAssocPredicateId");
+        String strNullThruDatesOnly = (String)templateRoot.get("nullThruDatesOnly");
         Boolean nullThruDatesOnly = (strNullThruDatesOnly != null && strNullThruDatesOnly.equalsIgnoreCase("true")) ? Boolean.TRUE :Boolean.FALSE;
         String thisSubContentId =  (String)templateRoot.get("subContentId");
         //if (Debug.infoOn()) Debug.logInfo("in Render(0), thisSubContentId ." + thisSubContentId , module);
@@ -103,7 +103,7 @@
             subContentIdSub = (String) view.get("contentId");
         }
         // This order is taken so that the dataResourceType can be overridden in the transform arguments.
-        String subDataResourceTypeId = (String)templateRoot.get( "subDataResourceTypeId");
+        String subDataResourceTypeId = (String)templateRoot.get("subDataResourceTypeId");
         if (UtilValidate.isEmpty(subDataResourceTypeId)) {
             try {
                 subDataResourceTypeId = (String) view.get("drDataResourceTypeId");
@@ -115,11 +115,11 @@
             // being passed.
         }
         String mimeTypeId = ContentWorker.getMimeTypeId(delegator, view, templateRoot);
-        templateRoot.put( "drDataResourceId", dataResourceId);
-        templateRoot.put( "mimeTypeId", mimeTypeId);
-        templateRoot.put( "dataResourceId", dataResourceId);
-        templateRoot.put( "subContentId", subContentIdSub);
-        templateRoot.put( "subDataResourceTypeId", subDataResourceTypeId);
+        templateRoot.put("drDataResourceId", dataResourceId);
+        templateRoot.put("mimeTypeId", mimeTypeId);
+        templateRoot.put("dataResourceId", dataResourceId);
+        templateRoot.put("subContentId", subContentIdSub);
+        templateRoot.put("subDataResourceTypeId", subDataResourceTypeId);
 
         //final Map savedValues = FastMap.newInstance();
         //FreeMarkerWorker.saveContextValues(templateCtx, saveKeyNames, savedValues);
@@ -164,8 +164,8 @@
                     if (map != null)
                         thisView = (GenericValue)map.get("value");
                 }
-                //if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, subContentId:" + templateRoot.get( "subContentId"), module);
-                //if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, contentId:" + templateRoot.get( "contentId"), module);
+                //if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, subContentId:" + templateRoot.get("subContentId"), module);
+                //if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, contentId:" + templateRoot.get("contentId"), module);
 
                 String mimeTypeId = (String) templateRoot.get("mimeTypeId");
                 Locale locale = (Locale) templateRoot.get("locale");
@@ -202,7 +202,7 @@
             }
 
             public void closeEditWrap(Writer out, String editRequestName) throws IOException {
-                //if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, contentId(1):" + templateRoot.get( "contentId"), module);
+                //if (Debug.infoOn()) Debug.logInfo("in RenderSubContent, contentId(1):" + templateRoot.get("contentId"), module);
                 //if (Debug.infoOn()) Debug.logInfo("in Render(0), templateRoot ." + templateRoot , module);
                 StringBuilder sb = new StringBuilder();
                 String fullRequest = editRequestName;
@@ -220,25 +220,25 @@
                     if (Debug.infoOn()) Debug.logInfo("in Render(0), view ." + view , module);
                     if (view != null) {
                         ModelEntity modelEntity = view.getModelEntity();
-                        if (UtilValidate.isEmpty(contentId) && modelEntity.getField("caContentId") != null )
+                        if (UtilValidate.isEmpty(contentId) && modelEntity.getField("caContentId") != null)
                             contentId = view.getString("caContentId");
-                        if (UtilValidate.isEmpty(contentId) && modelEntity.getField("contentId") != null )
+                        if (UtilValidate.isEmpty(contentId) && modelEntity.getField("contentId") != null)
                             contentId = view.getString("contentId");
-                        if (UtilValidate.isEmpty(contentIdTo) && modelEntity.getField("caContentIdTo") != null )
+                        if (UtilValidate.isEmpty(contentIdTo) && modelEntity.getField("caContentIdTo") != null)
                             contentIdTo = view.getString("caContentIdTo");
-                        if (UtilValidate.isEmpty(contentIdTo) && modelEntity.getField("contentIdTo") != null )
+                        if (UtilValidate.isEmpty(contentIdTo) && modelEntity.getField("contentIdTo") != null)
                             contentIdTo = view.getString("contentIdTo");
-                        if (UtilValidate.isEmpty(contentAssocTypeId) && modelEntity.getField("caContentAssocTypeId") != null )
+                        if (UtilValidate.isEmpty(contentAssocTypeId) && modelEntity.getField("caContentAssocTypeId") != null)
                             contentAssocTypeId = view.getString("caContentAssocTypeId");
-                        if (UtilValidate.isEmpty(contentAssocTypeId) && modelEntity.getField("contentAssocTypeId") != null )
+                        if (UtilValidate.isEmpty(contentAssocTypeId) && modelEntity.getField("contentAssocTypeId") != null)
                             contentAssocTypeId = view.getString("contentAssocTypeId");
-                        if (UtilValidate.isEmpty(mapKey) && modelEntity.getField("caMapKey") != null )
+                        if (UtilValidate.isEmpty(mapKey) && modelEntity.getField("caMapKey") != null)
                             mapKey = view.getString("caMapKey");
-                        if (UtilValidate.isEmpty(mapKey) && modelEntity.getField("mapKey") != null )
+                        if (UtilValidate.isEmpty(mapKey) && modelEntity.getField("mapKey") != null)
                             mapKey = view.getString("mapKey");
-                        if (UtilValidate.isEmpty(fromDate) && modelEntity.getField("caFromDate") != null )
+                        if (UtilValidate.isEmpty(fromDate) && modelEntity.getField("caFromDate") != null)
                             fromDate = view.getString("caFromDate");
-                        if (UtilValidate.isEmpty(fromDate) && modelEntity.getField("fromDate") != null )
+                        if (UtilValidate.isEmpty(fromDate) && modelEntity.getField("fromDate") != null)
                             fromDate = view.getString("fromDate");
                     }
                 } else {

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java Mon Aug 17 08:20:38 2009
@@ -78,7 +78,7 @@
         FreeMarkerWorker.saveContextValues(templateRoot, upSaveKeyNames, savedValuesUp);
         final Map savedValues = FastMap.newInstance();
         FreeMarkerWorker.overrideWithArgs(templateRoot, args);
-        String startContentAssocTypeId = (String)templateRoot.get( "contentAssocTypeId");
+        String startContentAssocTypeId = (String)templateRoot.get("contentAssocTypeId");
             //if (Debug.infoOn()) Debug.logInfo("in TraverseSubContentCache, startContentAssocTypeId:" + startContentAssocTypeId, module);
         final GenericDelegator delegator = (GenericDelegator) FreeMarkerWorker.getWrappedObject("delegator", env);
         final HttpServletRequest request = (HttpServletRequest) FreeMarkerWorker.getWrappedObject("request", env);
@@ -107,14 +107,14 @@
         final Map traverseContext = FastMap.newInstance();
         traverseContext.put("delegator", delegator);
         Map whenMap = FastMap.newInstance();
-        whenMap.put("followWhen", (String)templateRoot.get( "followWhen"));
-        whenMap.put("pickWhen", (String)templateRoot.get( "pickWhen"));
-        whenMap.put("returnBeforePickWhen", (String)templateRoot.get( "returnBeforePickWhen"));
-        whenMap.put("returnAfterPickWhen", (String)templateRoot.get( "returnAfterPickWhen"));
+        whenMap.put("followWhen", (String)templateRoot.get("followWhen"));
+        whenMap.put("pickWhen", (String)templateRoot.get("pickWhen"));
+        whenMap.put("returnBeforePickWhen", (String)templateRoot.get("returnBeforePickWhen"));
+        whenMap.put("returnAfterPickWhen", (String)templateRoot.get("returnAfterPickWhen"));
         traverseContext.put("whenMap", whenMap);
         env.setVariable("whenMap", FreeMarkerWorker.autoWrap(whenMap, env));
-        String fromDateStr = (String)templateRoot.get( "fromDateStr");
-        String thruDateStr = (String)templateRoot.get( "thruDateStr");
+        String fromDateStr = (String)templateRoot.get("fromDateStr");
+        String thruDateStr = (String)templateRoot.get("thruDateStr");
         Timestamp fromDate = null;
         if (fromDateStr != null && fromDateStr.length() > 0) {
             fromDate = UtilDateTime.toTimestamp(fromDateStr);
@@ -129,7 +129,7 @@
             //throw new RuntimeException("contentAssocTypeId is empty.");
         //}
         traverseContext.put("contentAssocTypeId", startContentAssocTypeId);
-        String direction = (String)templateRoot.get( "direction");
+        String direction = (String)templateRoot.get("direction");
         if (UtilValidate.isEmpty(direction)) {
             direction = "From";
         }

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java Mon Aug 17 08:20:38 2009
@@ -126,13 +126,13 @@
         final Map traverseContext = FastMap.newInstance();
         traverseContext.put("delegator", delegator);
         Map whenMap = FastMap.newInstance();
-        whenMap.put("followWhen", (String)templateCtx.get( "followWhen"));
-        whenMap.put("pickWhen", (String)templateCtx.get( "pickWhen"));
-        whenMap.put("returnBeforePickWhen", (String)templateCtx.get( "returnBeforePickWhen"));
-        whenMap.put("returnAfterPickWhen", (String)templateCtx.get( "returnAfterPickWhen"));
+        whenMap.put("followWhen", (String)templateCtx.get("followWhen"));
+        whenMap.put("pickWhen", (String)templateCtx.get("pickWhen"));
+        whenMap.put("returnBeforePickWhen", (String)templateCtx.get("returnBeforePickWhen"));
+        whenMap.put("returnAfterPickWhen", (String)templateCtx.get("returnAfterPickWhen"));
         traverseContext.put("whenMap", whenMap);
-        String fromDateStr = (String)templateCtx.get( "fromDateStr");
-        String thruDateStr = (String)templateCtx.get( "thruDateStr");
+        String fromDateStr = (String)templateCtx.get("fromDateStr");
+        String thruDateStr = (String)templateCtx.get("thruDateStr");
         Timestamp fromDate = null;
         if (fromDateStr != null && fromDateStr.length() > 0) {
             fromDate = UtilDateTime.toTimestamp(fromDateStr);
@@ -143,11 +143,11 @@
             thruDate = UtilDateTime.toTimestamp(thruDateStr);
         }
         traverseContext.put("thruDate", thruDate);
-        String startContentAssocTypeId = (String)templateCtx.get( "contentAssocTypeId");
+        String startContentAssocTypeId = (String)templateCtx.get("contentAssocTypeId");
         if (startContentAssocTypeId != null)
             startContentAssocTypeId = "SUB_CONTENT";
         traverseContext.put("contentAssocTypeId", startContentAssocTypeId);
-        String direction = (String)templateCtx.get( "direction");
+        String direction = (String)templateCtx.get("direction");
         if (UtilValidate.isEmpty(direction))
             direction = "From";
         traverseContext.put("direction", direction);
@@ -288,7 +288,7 @@
                 if (UtilValidate.isEmpty(contentAssocTypeId))
                     contentAssocTypeId = "";
                 assocContext.put("contentAssocTypeId", contentAssocTypeId);
-                //assocContext.put("contentTypeId", assocValue.get("contentTypeId") );
+                //assocContext.put("contentTypeId", assocValue.get("contentTypeId"));
                 String assocRelation = null;
                 String thisDirection = (String)templateCtx.get("direction");
                 String thisContentId = (String)templateCtx.get("thisContentId");

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java Mon Aug 17 08:20:38 2009
@@ -729,7 +729,7 @@
                         } catch (GenericServiceException e) {
                             return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingPackageConfiguratorError", locale));
                         }
-                        totalWidth = totalWidth.add( qty.multiply(productDepth) );
+                        totalWidth = totalWidth.add(qty.multiply(productDepth));
                         if (qty.compareTo(maxQuantity) == 0) shipmentPackageSeqId = null;
                         remQuantity = remQuantity.subtract(qty);
                     }

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java Mon Aug 17 08:20:38 2009
@@ -55,7 +55,7 @@
         //        Timestamp now = UtilDateTime.nowTimestamp();
 
         try {
-            if (productionRunId != null ) {
+            if (productionRunId != null) {
                 GenericValue productionRun = delegator.findByPrimaryKey("WorkEffort", UtilMisc.toMap("workEffortId", productionRunId));
                 if (productionRun != null) {
                     List productionRunProducts = productionRun.getRelated("WorkEffortGoodStandard", UtilMisc.toMap("workEffortGoodStdTypeId", "PRUN_PROD_DELIV"),null);

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Mon Aug 17 08:20:38 2009
@@ -374,7 +374,7 @@
                                 "fromDate",  workEffortPartyAssignment.getTimestamp("fromDate"),
                                 "statusId",  workEffortPartyAssignment.getString("statusId"),
                                 "userLogin", userLogin
-                        );
+                       );
                         try {
                             resultService = dispatcher.runSync("assignPartyToWorkEffort", partyToWorkEffort);
                         } catch (GenericServiceException e) {
@@ -1133,7 +1133,7 @@
                         if (! priority.equals(routingTask.get("priority"))) {
                             routingTask.set("priority", priority);
                             // update the routingTask List and re-read it to be able to have it sorted with the new value
-                            if ( ! productionRun.store()) {
+                            if (! productionRun.store()) {
                                 Debug.logError("productionRun.store(), in routingTask.priority update, fail for productionRunId ="+productionRunId,module);
                                 return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunNotUpdated", locale));
                             }
@@ -1426,7 +1426,7 @@
                         "fromDate",  workEffortPartyAssignment.getTimestamp("fromDate"),
                         "statusId",  workEffortPartyAssignment.getString("statusId"),
                         "userLogin", userLogin
-                );
+               );
                 try {
                     resultService = dispatcher.runSync("assignPartyToWorkEffort", partyToWorkEffort);
                 } catch (GenericServiceException e) {
@@ -2230,7 +2230,7 @@
                 	return ServiceUtil.returnError("try to get BOM list from productAssoc");
                 }
                 // if so create a mandatory predecessor to this production run
-                if(UtilValidate.isNotEmpty(bomList)) {
+                if (UtilValidate.isNotEmpty(bomList)) {
                 	serviceContext.clear();
                 	serviceContext.put("productId", componentProductId);
                 	serviceContext.put("quantity", componentQuantity);

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java Mon Aug 17 08:20:38 2009
@@ -122,11 +122,11 @@
             Iterator  i = listRoutingTaskAssoc.iterator();
             while (i.hasNext()) {
                 GenericValue routingTaskAssoc = (GenericValue) i.next();
-                if ( ! workEffortIdFrom.equals(routingTaskAssoc.getString("workEffortIdFrom")) ||
+                if (! workEffortIdFrom.equals(routingTaskAssoc.getString("workEffortIdFrom")) ||
                 ! workEffortIdTo.equals(routingTaskAssoc.getString("workEffortIdTo")) ||
                 ! workEffortAssocTypeId.equals(routingTaskAssoc.getString("workEffortAssocTypeId")) ||
                 ! sequenceNum.equals(routingTaskAssoc.getLong("sequenceNum"))
-                ) {
+               ) {
                     if (routingTaskAssoc.getTimestamp("thruDate") == null && routingTaskAssoc.getTimestamp("fromDate") == null) sequenceNumNotOk = "Y";
                     else if (routingTaskAssoc.getTimestamp("thruDate") == null) {
                         if (thruDate == null) sequenceNumNotOk = "Y";
@@ -136,14 +136,14 @@
                         if (fromDate == null) sequenceNumNotOk = "Y";
                         else if (fromDate.before(routingTaskAssoc.getTimestamp("thruDate"))) sequenceNumNotOk = "Y";
                     }
-                    else if ( fromDate == null && thruDate == null) sequenceNumNotOk = "Y";
+                    else if (fromDate == null && thruDate == null) sequenceNumNotOk = "Y";
                     else if (thruDate == null) {
                         if (fromDate.before(routingTaskAssoc.getTimestamp("thruDate"))) sequenceNumNotOk = "Y";
                     }
                     else if (fromDate == null) {
                         if (thruDate.after(routingTaskAssoc.getTimestamp("fromDate"))) sequenceNumNotOk = "Y";
                     }
-                    else if ( routingTaskAssoc.getTimestamp("fromDate").before(thruDate) && fromDate.before(routingTaskAssoc.getTimestamp("thruDate")) ) sequenceNumNotOk = "Y";
+                    else if (routingTaskAssoc.getTimestamp("fromDate").before(thruDate) && fromDate.before(routingTaskAssoc.getTimestamp("thruDate"))) sequenceNumNotOk = "Y";
                 } else if (createProcess) sequenceNumNotOk = "Y";
             }
         }
@@ -207,7 +207,7 @@
         Double capacity = null;
         Time startTime = null;
         while (capacity == null || capacity.doubleValue()==0) {
-            switch ( dayStart) {
+            switch (dayStart) {
                 case Calendar.MONDAY:
                     capacity =  techDataCalendarWeek.getDouble("mondayCapacity");
                     startTime =  techDataCalendarWeek.getTime("mondayStartTime");
@@ -273,7 +273,7 @@
         Time startTime = (Time) position.get("startTime");
         Double capacity = (Double) position.get("capacity");
         Timestamp startAvailablePeriod = new Timestamp(UtilDateTime.getDayStart(dateFrom).getTime() + startTime.getTime() + cDateTrav.get(Calendar.ZONE_OFFSET) + cDateTrav.get(Calendar.DST_OFFSET));
-        if (dateFrom.before(startAvailablePeriod) ) return 0;
+        if (dateFrom.before(startAvailablePeriod)) return 0;
         Timestamp endAvailablePeriod = new Timestamp(startAvailablePeriod.getTime()+capacity.longValue());
         if (dateFrom.after(endAvailablePeriod)) return 0;
         return  endAvailablePeriod.getTime() - dateFrom.getTime();
@@ -304,7 +304,7 @@
         int moveDay = ((Integer) position.get("moveDay")).intValue();
         dateTo = (moveDay == 0) ? dateFrom : UtilDateTime.getDayStart(dateFrom,moveDay);
         Timestamp startAvailablePeriod = new Timestamp(UtilDateTime.getDayStart(dateTo).getTime() + startTime.getTime() + cDateTrav.get(Calendar.ZONE_OFFSET) + cDateTrav.get(Calendar.DST_OFFSET));
-        if (dateTo.before(startAvailablePeriod) ) {
+        if (dateTo.before(startAvailablePeriod)) {
             dateTo = startAvailablePeriod;
         }
         else {
@@ -362,7 +362,7 @@
         Double capacity = null;
         Time startTime = null;
         while (capacity == null || capacity.doubleValue() == 0) {
-            switch ( dayEnd) {
+            switch (dayEnd) {
                 case Calendar.MONDAY:
                     capacity =  techDataCalendarWeek.getDouble("mondayCapacity");
                     startTime =  techDataCalendarWeek.getTime("mondayStartTime");
@@ -427,7 +427,7 @@
         Time startTime = (Time) position.get("startTime");
         Double capacity = (Double) position.get("capacity");
         Timestamp startAvailablePeriod = new Timestamp(UtilDateTime.getDayStart(dateFrom).getTime() + startTime.getTime() + cDateTrav.get(Calendar.ZONE_OFFSET) + cDateTrav.get(Calendar.DST_OFFSET));
-        if (dateFrom.before(startAvailablePeriod) ) return 0;
+        if (dateFrom.before(startAvailablePeriod)) return 0;
         Timestamp endAvailablePeriod = new Timestamp(startAvailablePeriod.getTime()+capacity.longValue());
         if (dateFrom.after(endAvailablePeriod)) return 0;
         return  dateFrom.getTime() - startAvailablePeriod.getTime();
@@ -459,7 +459,7 @@
         Double capacity = (Double) position.get("capacity");
         dateTo = (moveDay == 0) ? dateFrom : UtilDateTime.getDayEnd(dateFrom, Long.valueOf(moveDay));
         Timestamp endAvailablePeriod = new Timestamp(UtilDateTime.getDayStart(dateTo).getTime() + startTime.getTime() + capacity.longValue() + cDateTrav.get(Calendar.ZONE_OFFSET) + cDateTrav.get(Calendar.DST_OFFSET));
-        if (dateTo.after(endAvailablePeriod) ) {
+        if (dateTo.after(endAvailablePeriod)) {
             dateTo = endAvailablePeriod;
         }
         else {

Modified: ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java (original)
+++ ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java Mon Aug 17 08:20:38 2009
@@ -260,7 +260,7 @@
                 }
             }
 
-            if ( visitorSiteId == null || (visitorSiteId != null && !visitorSiteId.equals(siteId)) ) {
+            if (visitorSiteId == null || (visitorSiteId != null && !visitorSiteId.equals(siteId))) {
                 // if trackingCode.siteId is  not null  write a trackable cookie with name in the form: Ofbiz.TKCSiteId and timeout will be 60 * 60 * 24 * 365
                 Cookie siteIdCookie = new Cookie("Ofbiz.TKCD.SiteId" ,siteId);
                 siteIdCookie.setMaxAge(siteIdCookieAge);
@@ -499,7 +499,7 @@
             GenericValue trackingCodeOrder = delegator.makeValue("TrackingCodeOrder",
                     UtilMisc.toMap("trackingCodeTypeId", trackingCode.get("trackingCodeTypeId"),
                     "trackingCodeId", trackingCodeId, "isBillable", isBillable, "siteId", siteId,
-                    "hasExported", "N", "affiliateReferredTimeStamp",affiliateReferredTimeStamp ));
+                    "hasExported", "N", "affiliateReferredTimeStamp",affiliateReferredTimeStamp));
 
             Debug.logInfo(" trackingCodeOrder is " + trackingCodeOrder, module);
             trackingCodeOrders.add(trackingCodeOrder);

Modified: ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java (original)
+++ ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java Mon Aug 17 08:20:38 2009
@@ -138,7 +138,7 @@
                             break;
                         }
                     }
-                    if(UtilValidate.isNotEmpty(email)) {
+                    if (UtilValidate.isNotEmpty(email)) {
                         serviceCtx.put("emailAddress", email);
                     }
                     for (Iterator iter = communications.getPhoneNumbers(); iter.hasNext();) {

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderEvents.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderEvents.java Mon Aug 17 08:20:38 2009
@@ -124,7 +124,7 @@
                         try {
                             resultMap = dispatcher.runSync("cancelOrderItem", contextMap);
                             
-                            if(ServiceUtil.isError(resultMap)) {
+                            if (ServiceUtil.isError(resultMap)) {
                                 String errorMessage = (String) resultMap.get("errorMessage");
                                 Debug.logError(errorMessage, module);
                                 request.setAttribute("_ERROR_MESSAGE_", errorMessage);
@@ -137,7 +137,7 @@
                             return "error";
                         }
                     }
-                } catch (GenericEntityException e ) {
+                } catch (GenericEntityException e) {
                     Debug.logError(e, module);
                     return "error";
                 }

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java Mon Aug 17 08:20:38 2009
@@ -151,7 +151,7 @@
     }
 
     private void changeOrderListStates(HttpServletRequest request) {
-        for (Iterator iter = parameterToOrderStatusId.keySet().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = parameterToOrderStatusId.keySet().iterator(); iter.hasNext();) {
             String param = (String) iter.next();
             String value = request.getParameter(param);
             if ("Y".equals(value)) {
@@ -160,7 +160,7 @@
                 orderStatusState.put(param, "N");
             }
         }
-        for (Iterator iter = parameterToOrderTypeId.keySet().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = parameterToOrderTypeId.keySet().iterator(); iter.hasNext();) {
             String param = (String) iter.next();
             String value = request.getParameter(param);
             if ("Y".equals(value)) {
@@ -169,7 +169,7 @@
                 orderTypeState.put(param, "N");
             }
         }
-        for (Iterator iter = parameterToFilterId.keySet().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = parameterToFilterId.keySet().iterator(); iter.hasNext();) {
             String param = (String) iter.next();
             String value = request.getParameter(param);
             if ("Y".equals(value)) {
@@ -194,7 +194,7 @@
     public boolean hasFilter(String param) { return ("Y".equals(orderFilterState.get(param))); }
 
     public boolean hasAllStatus() {
-        for (Iterator iter = orderStatusState.values().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = orderStatusState.values().iterator(); iter.hasNext();) {
             if (!"Y".equals(iter.next())) return false;
         }
         return true;
@@ -225,16 +225,16 @@
         }
 
         List statusConditions = new ArrayList();
-        for (Iterator iter = orderStatusState.keySet().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = orderStatusState.keySet().iterator(); iter.hasNext();) {
             String status = (String) iter.next();
             if (!hasStatus(status)) continue;
-            statusConditions.add( EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, parameterToOrderStatusId.get(status)) );
+            statusConditions.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, parameterToOrderStatusId.get(status)));
         }
         List typeConditions = new ArrayList();
-        for (Iterator iter = orderTypeState.keySet().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = orderTypeState.keySet().iterator(); iter.hasNext();) {
             String type = (String) iter.next();
             if (!hasType(type)) continue;
-            typeConditions.add( EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, parameterToOrderTypeId.get(type)) );
+            typeConditions.add(EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, parameterToOrderTypeId.get(type)));
         }
 
         EntityCondition statusConditionsList = EntityCondition.makeCondition(statusConditions,  EntityOperator.OR);

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java Mon Aug 17 08:20:38 2009
@@ -276,7 +276,7 @@
             dve.addAlias("OISG", "carrierPartyId");
             dve.addViewLink("OH", "OISG", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("orderId", "orderId")));
 
-            if (UtilValidate.isNotEmpty(carrierPartyId )) {
+            if (UtilValidate.isNotEmpty(carrierPartyId)) {
                 paramList.add("carrierPartyId=" + carrierPartyId);
                 conditions.add(makeExpr("carrierPartyId", carrierPartyId));
             }

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Mon Aug 17 08:20:38 2009
@@ -996,7 +996,7 @@
             Iterator i = validItems.iterator();
             while (i.hasNext()) {
                 GenericValue item = (GenericValue) i.next();
-                shippableWeight = shippableWeight.add(this.getItemWeight(item).multiply( getOrderItemQuantity(item))).setScale(scale, rounding);
+                shippableWeight = shippableWeight.add(this.getItemWeight(item).multiply(getOrderItemQuantity(item))).setScale(scale, rounding);
             }
         }
 
@@ -1062,7 +1062,7 @@
      */
     public BigDecimal getOrderPaymentPreferenceTotalByType(String paymentMethodTypeId) {
         BigDecimal total = ZERO;
-        for (Iterator iter = getPaymentPreferences().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = getPaymentPreferences().iterator(); iter.hasNext();) {
             GenericValue preference = (GenericValue) iter.next();
             if (preference.get("maxAmount") == null) continue;
             if (paymentMethodTypeId == null || paymentMethodTypeId.equals(preference.get("paymentMethodTypeId"))) {
@@ -1096,7 +1096,7 @@
             // get a set of invoice IDs that belong to the order
             List orderItemBillings = orderHeader.getRelatedCache("OrderItemBilling");
             Set invoiceIds = new HashSet();
-            for (Iterator iter = orderItemBillings.iterator(); iter.hasNext(); ) {
+            for (Iterator iter = orderItemBillings.iterator(); iter.hasNext();) {
                 GenericValue orderItemBilling = (GenericValue) iter.next();
                 invoiceIds.add(orderItemBilling.get("invoiceId"));
             }
@@ -1105,14 +1105,14 @@
             List conditions = UtilMisc.toList(
                     EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_RECEIVED"),
                     EntityCondition.makeCondition("invoiceId", EntityOperator.IN, invoiceIds)
-                    );
+                   );
             if (paymentMethodTypeId != null) {
                 conditions.add(EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, paymentMethodTypeId));
             }
             EntityConditionList ecl = EntityCondition.makeCondition(conditions, EntityOperator.AND);
             List payments = orderHeader.getDelegator().findList("PaymentAndApplication", ecl, null, null, null, true);
 
-            for (Iterator iter = payments.iterator(); iter.hasNext(); ) {
+            for (Iterator iter = payments.iterator(); iter.hasNext();) {
                 GenericValue payment = (GenericValue) iter.next();
                 if (payment.get("amountApplied") == null) continue;
                 total = total.add(payment.getBigDecimal("amountApplied")).setScale(scale, rounding);
@@ -1288,13 +1288,13 @@
         List prefs = getPaymentPreferences();
 
         // add up the covered amount, but skip preferences which are declined or cancelled
-        for (Iterator iter = prefs.iterator(); iter.hasNext(); ) {
+        for (Iterator iter = prefs.iterator(); iter.hasNext();) {
             GenericValue pref = (GenericValue) iter.next();
             if ("PAYMENT_CANCELLED".equals(pref.get("statusId")) || "PAYMENT_DECLINED".equals(pref.get("statusId"))) {
                 continue;
             } else if ("PAYMENT_SETTLED".equals(pref.get("statusId"))) {
                 List responses = pref.getRelatedByAnd("PaymentGatewayResponse", UtilMisc.toMap("transCodeEnumId", "PGT_CAPTURE"));
-                for (Iterator respIter = responses.iterator(); respIter.hasNext(); ) {
+                for (Iterator respIter = responses.iterator(); respIter.hasNext();) {
                     GenericValue response = (GenericValue) respIter.next();
                     BigDecimal amount = response.getBigDecimal("amount");
                     if (amount != null) {
@@ -1302,7 +1302,7 @@
                     }
                 }
                 responses = pref.getRelatedByAnd("PaymentGatewayResponse", UtilMisc.toMap("transCodeEnumId", "PGT_REFUND"));
-                for (Iterator respIter = responses.iterator(); respIter.hasNext(); ) {
+                for (Iterator respIter = responses.iterator(); respIter.hasNext();) {
                     GenericValue response = (GenericValue) respIter.next();
                     BigDecimal amount = response.getBigDecimal("amount");
                     if (amount != null) {
@@ -1692,7 +1692,7 @@
     /** Get a set of productIds in the order. */
     public Collection getOrderProductIds() {
         Set productIds = new HashSet();
-        for (Iterator iter = getOrderItems().iterator(); iter.hasNext(); ) {
+        for (Iterator iter = getOrderItems().iterator(); iter.hasNext();) {
             productIds.add(((GenericValue) iter.next()).getString("productId"));
         }
         return productIds;
@@ -1723,14 +1723,14 @@
 
        // since we don't have a handy grouped view entity, we'll have to group the return items by hand
        Map returnMap = FastMap.newInstance();
-       for (Iterator iter = this.getValidOrderItems().iterator(); iter.hasNext(); ) {
+       for (Iterator iter = this.getValidOrderItems().iterator(); iter.hasNext();) {
            GenericValue orderItem = (GenericValue) iter.next();
            List group = EntityUtil.filterByAnd(returnItems,
                    UtilMisc.toMap("orderId", orderItem.get("orderId"), "orderItemSeqId", orderItem.get("orderItemSeqId")));
 
            // add up the returned quantities for this group TODO: received quantity should be used eventually
            BigDecimal returned = BigDecimal.ZERO;
-           for (Iterator groupiter = group.iterator(); groupiter.hasNext(); ) {
+           for (Iterator groupiter = group.iterator(); groupiter.hasNext();) {
                GenericValue returnItem = (GenericValue) groupiter.next();
                if (returnItem.getBigDecimal("returnQuantity") != null) {
                    returned = returned.add(returnItem.getBigDecimal("returnQuantity"));
@@ -1941,7 +1941,7 @@
 
         // sum up the return items that have a return item response with a billing account defined
         try {
-            for (Iterator iter = returnedItems.iterator(); iter.hasNext(); ) {
+            for (Iterator iter = returnedItems.iterator(); iter.hasNext();) {
                 GenericValue returnItem = (GenericValue) iter.next();
                 GenericValue returnItemResponse = returnItem.getRelatedOne("ReturnItemResponse");
                 if (returnItemResponse == null) continue;
@@ -2805,7 +2805,7 @@
        try {
            // this is simply the sum of quantity billed in all related OrderItemBillings
            List billings = orderItem.getRelated("OrderItemBilling");
-           for (Iterator iter = billings.iterator(); iter.hasNext(); ) {
+           for (Iterator iter = billings.iterator(); iter.hasNext();) {
                GenericValue billing = (GenericValue) iter.next();
                BigDecimal quantity = billing.getBigDecimal("quantity");
                if (quantity != null) {

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Mon Aug 17 08:20:38 2009
@@ -465,11 +465,11 @@
             EntityConditionList whereConditions = EntityCondition.makeCondition(UtilMisc.toList(
                     EntityCondition.makeCondition("orderId", EntityOperator.EQUALS, orderHeader.getString("orderId")),
                     EntityCondition.makeCondition("orderItemStatusId", EntityOperator.IN, UtilMisc.toList("ITEM_APPROVED", "ITEM_COMPLETED"))
-                ), EntityOperator.AND);
+               ), EntityOperator.AND);
             /*
             EntityConditionList havingConditions = EntityCondition.makeCondition(UtilMisc.toList(
                     EntityCondition.makeCondition("quantityIssued", EntityOperator.GREATER_THAN, Double.valueOf(0))
-                ), EntityOperator.AND);
+               ), EntityOperator.AND);
              */
             List orderItemQuantitiesIssued = null;
             try {
@@ -486,7 +486,7 @@
                     GenericValue item = null;
                     try {
                         item = orderItemQuantityIssued.getRelatedOne("OrderItem");
-                    } catch ( GenericEntityException e ) {
+                    } catch (GenericEntityException e) {
                         Debug.logError(e, module);
                         return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderErrorUnableToGetOrderItemInformation", locale));
                     }
@@ -517,7 +517,7 @@
                     } else {
 
                         // Don't add the OrderItem to the map of returnable OrderItems if there isn't any returnable quantity.
-                        if (((BigDecimal) serviceResult.get("returnableQuantity")).compareTo(BigDecimal.ZERO) == 0 ) {
+                        if (((BigDecimal) serviceResult.get("returnableQuantity")).compareTo(BigDecimal.ZERO) == 0) {
                             continue;
                         }
                         Map returnInfo = new HashMap();
@@ -842,7 +842,7 @@
 
             // first, compute the total credit from the return items
             BigDecimal creditTotal = ZERO;
-            for (Iterator itemsIter = returnItems.iterator(); itemsIter.hasNext(); ) {
+            for (Iterator itemsIter = returnItems.iterator(); itemsIter.hasNext();) {
                 GenericValue item = (GenericValue) itemsIter.next();
                 BigDecimal quantity = item.getBigDecimal("returnQuantity");
                 BigDecimal price = item.getBigDecimal("returnPrice");
@@ -919,7 +919,7 @@
             String itemResponseId = (String) serviceResults.get("returnItemResponseId");
 
             // loop through the items again to update them and store a status change history
-            for (Iterator itemsIter = returnItems.iterator(); itemsIter.hasNext(); ) {
+            for (Iterator itemsIter = returnItems.iterator(); itemsIter.hasNext();) {
                 GenericValue item = (GenericValue) itemsIter.next();
                 Map returnItemMap = UtilMisc.toMap("returnItemResponseId", itemResponseId, "returnId", item.get("returnId"), "returnItemSeqId", item.get("returnItemSeqId"), "statusId", "RETURN_COMPLETED", "userLogin", userLogin);
                 // store the item changes (attached responseId)
@@ -989,10 +989,10 @@
                 EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, "EXT_BILLACT"),
                 EntityCondition.makeCondition("statusId", EntityOperator.NOT_IN, UtilMisc.toList("ORDER_CANCELLED", "ORDER_REJECTED")),
                 EntityCondition.makeCondition("preferenceStatusId", EntityOperator.NOT_IN, UtilMisc.toList("PAYMENT_SETTLED", "PAYMENT_RECEIVED", "PAYMENT_DECLINED", "PAYMENT_CANCELLED")) // PAYMENT_NOT_AUTH
-            ), EntityOperator.AND);
+           ), EntityOperator.AND);
 
         List orderPaymentPreferenceSums = delegator.findList("OrderPurchasePaymentSummary", whereConditions, UtilMisc.toSet("maxAmount"), null, null, false);
-        for (Iterator oppsi = orderPaymentPreferenceSums.iterator(); oppsi.hasNext(); ) {
+        for (Iterator oppsi = orderPaymentPreferenceSums.iterator(); oppsi.hasNext();) {
             GenericValue orderPaymentPreferenceSum = (GenericValue) oppsi.next();
             BigDecimal maxAmount = orderPaymentPreferenceSum.getBigDecimal("maxAmount");
             balance = maxAmount != null ? balance.subtract(maxAmount) : balance;
@@ -1000,7 +1000,7 @@
 
         List paymentAppls = delegator.findByAnd("PaymentApplication", UtilMisc.toMap("billingAccountId", billingAccountId));
         // TODO: cancelled payments?
-        for (Iterator pAi = paymentAppls.iterator(); pAi.hasNext(); ) {
+        for (Iterator pAi = paymentAppls.iterator(); pAi.hasNext();) {
             GenericValue paymentAppl = (GenericValue) pAi.next();
             if (paymentAppl.getString("invoiceId") == null) {
                 BigDecimal amountApplied = paymentAppl.getBigDecimal("amountApplied");
@@ -1039,7 +1039,7 @@
 
             // find the minimum storeCreditValidDays of all the ProductStores associated with all the Orders on the Return, skipping null ones
             Long storeCreditValidDays = null;
-            for (Iterator iter = productStores.iterator(); iter.hasNext(); ) {
+            for (Iterator iter = productStores.iterator(); iter.hasNext();) {
                 GenericValue productStore = (GenericValue) iter.next();
                 Long thisStoreValidDays = productStore.getLong("storeCreditValidDays");
                 if (thisStoreValidDays == null) continue;
@@ -1101,7 +1101,7 @@
         }
          
         // Check for replacement order
-        if (UtilValidate.isEmpty(orderPayPrefs)){
+        if (UtilValidate.isEmpty(orderPayPrefs)) {
             List<GenericValue> returnItemResponses = FastList.newInstance();
             try {
                 returnItemResponses = orderHeader.getRelated("ReplacementReturnItemResponse");
@@ -1201,7 +1201,7 @@
                     orderPayPrefs = EntityUtil.filterByOr(orderPayPrefs, exprs);
                     
                     // Check for replacement order
-                    if (UtilValidate.isEmpty(orderPayPrefs)){
+                    if (UtilValidate.isEmpty(orderPayPrefs)) {
                         List<GenericValue> orderItemAssocs = delegator.findByAnd("OrderItemAssoc", UtilMisc.toMap("toOrderId", orderId, "orderItemAssocTypeId", "REPLACEMENT"));
                         if (UtilValidate.isNotEmpty(orderItemAssocs)) {
                             String originalOrderId = EntityUtil.getFirst(orderItemAssocs).getString("orderId");
@@ -1236,7 +1236,7 @@
                     if (UtilValidate.isNotEmpty(orgAcctgPref)) {
                         try {
                             refundPaymentMethod = orgAcctgPref.getRelatedOne("PaymentMethod");
-                        } catch ( GenericEntityException e ) {
+                        } catch (GenericEntityException e) {
                             Debug.logError("Error retrieving related refundPaymentMethod from PartyAcctgPreference for partyId " + productStore.get("payToPartyId"), module);
                         }
                     }
@@ -1245,7 +1245,7 @@
                 // now; for all timestamps
                 Timestamp now = UtilDateTime.nowTimestamp();
 
-                // Assemble a map of orderPaymentPreferenceId -> list of maps of ( OPP and availableAmountForRefunding )
+                // Assemble a map of orderPaymentPreferenceId -> list of maps of (OPP and availableAmountForRefunding)
                 //     where availableAmountForRefunding = receivedAmount - alreadyRefundedAmount
                 // We break the OPPs down this way because we need to process the refunds to payment methods in a particular order
                 Map receivedPaymentTotalsByPaymentMethod = orderReadHelper.getReceivedPaymentTotalsByPaymentMethod() ;
@@ -1577,10 +1577,10 @@
             // for each return item in the response, get the list of return item billings and then a list of invoices
             Map returnInvoices = FastMap.newInstance(); // key is invoiceId, value is Invoice GenericValue
             List items = response.getRelated("ReturnItem");
-            for (Iterator itemIter = items.iterator(); itemIter.hasNext(); ) {
+            for (Iterator itemIter = items.iterator(); itemIter.hasNext();) {
                 GenericValue item = (GenericValue) itemIter.next();
                 List billings = item.getRelated("ReturnItemBilling");
-                for (Iterator billIter = billings.iterator(); billIter.hasNext(); ) {
+                for (Iterator billIter = billings.iterator(); billIter.hasNext();) {
                     GenericValue billing = (GenericValue) billIter.next();
                     GenericValue invoice = billing.getRelatedOne("Invoice");
 
@@ -1594,12 +1594,12 @@
             // for each return invoice found, sum up the related billings
             Map invoiceTotals = FastMap.newInstance(); // key is invoiceId, value is the sum of all billings for that invoice
             BigDecimal grandTotal = ZERO; // The sum of all return invoice totals
-            for (Iterator iter = returnInvoices.values().iterator(); iter.hasNext(); ) {
+            for (Iterator iter = returnInvoices.values().iterator(); iter.hasNext();) {
                 GenericValue invoice = (GenericValue) iter.next();
 
                 List billings = invoice.getRelated("ReturnItemBilling");
                 BigDecimal runningTotal = ZERO;
-                for (Iterator billIter = billings.iterator(); billIter.hasNext(); ) {
+                for (Iterator billIter = billings.iterator(); billIter.hasNext();) {
                     GenericValue billing = (GenericValue) billIter.next();
                     runningTotal = runningTotal.add(billing.getBigDecimal("amount").multiply(billing.getBigDecimal("quantity")).setScale(decimals, rounding));
                 }
@@ -1609,7 +1609,7 @@
             }
 
             // now allocate responseAmount * invoiceTotal / grandTotal to each invoice
-            for (Iterator iter = returnInvoices.values().iterator(); iter.hasNext(); ) {
+            for (Iterator iter = returnInvoices.values().iterator(); iter.hasNext();) {
                 GenericValue invoice = (GenericValue) iter.next();
                 String invoiceId = invoice.getString("invoiceId");
                 BigDecimal invoiceTotal = (BigDecimal) invoiceTotals.get(invoiceId);

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=804895&r1=804894&r2=804895&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon Aug 17 08:20:38 2009
@@ -388,7 +388,7 @@
                             String excMsg = "Could not find related Fixed Asset for the product: " + orderItem.getString("productId");
                             Debug.logError(excMsg, module);
                             errorMessages.add(excMsg);
-                            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderCouldNotFindRelatedFixedAssetForTheProduct",UtilMisc.toMap("productId",orderItem.getString("productId")), locale ));
+                            return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderCouldNotFindRelatedFixedAssetForTheProduct",UtilMisc.toMap("productId",orderItem.getString("productId")), locale));
                         }
 
                         if (UtilValidate.isNotEmpty(selFixedAssetProduct)) {
@@ -693,7 +693,7 @@
                         }
                     }
                 }
-                if (techDataCalendar == null ) {
+                if (techDataCalendar == null) {
                     techDataCalendar = delegator.makeValue("TechDataCalendar");
                     Debug.logInfo("create techdata calendar because it does not exist",module);
                     String calendarId = delegator.getNextSeqId("TechDataCalendar");
@@ -1436,7 +1436,7 @@
         List orderTaxAdjustments = null;
         try {
             orderTaxAdjustments = delegator.findByAnd("OrderAdjustment", UtilMisc.toMap("orderId", orderId, "orderAdjustmentTypeId", "SALES_TAX"));
-        } catch ( GenericEntityException e ) {
+        } catch (GenericEntityException e) {
             Debug.logError(e, "Unable to retrieve SALES_TAX adjustments for order : " + orderId, module);
             return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderUnableToRetrieveSalesTaxAdjustments",locale));
         }
@@ -1446,7 +1446,7 @@
         Iterator otait = UtilMisc.toIterator(orderTaxAdjustments);
         while (otait != null && otait.hasNext()) {
             GenericValue orderTaxAdjustment = (GenericValue) otait.next();
-            if ( orderTaxAdjustment.get("amount") != null) {
+            if (orderTaxAdjustment.get("amount") != null) {
                 totalExistingOrderTax = totalExistingOrderTax.add(orderTaxAdjustment.getBigDecimal("amount").setScale(taxDecimals, taxRounding));
             }
         }
@@ -1557,7 +1557,7 @@
                         Iterator oai = orderAdj.iterator();
                         while (oai.hasNext()) {
                             GenericValue oa = (GenericValue) oai.next();
-                            if ( oa.get("amount") != null) {
+                            if (oa.get("amount") != null) {
                                 totalNewOrderTax = totalNewOrderTax.add(oa.getBigDecimal("amount").setScale(taxDecimals, taxRounding));
                             }
 
@@ -1572,7 +1572,7 @@
                             Iterator ida = itemAdjustments.iterator();
                             while (ida.hasNext()) {
                                 GenericValue ia = (GenericValue) ida.next();
-                                if ( ia.get("amount") != null) {
+                                if (ia.get("amount") != null) {
                                     totalNewOrderTax = totalNewOrderTax.add(ia.getBigDecimal("amount").setScale(taxDecimals, taxRounding));
                                 }
                             }
@@ -1597,7 +1597,7 @@
                 Map createOrderAdjResponse = null;
                 try {
                     createOrderAdjResponse = dispatcher.runSync("createOrderAdjustment", createOrderAdjContext);
-                } catch ( GenericServiceException e ) {
+                } catch (GenericServiceException e) {
                     String createOrderAdjErrMsg = UtilProperties.getMessage(resource_error, "OrderErrorCallingCreateOrderAdjustmentService", locale);
                     Debug.logError(createOrderAdjErrMsg, module);
                     return ServiceUtil.returnError(createOrderAdjErrMsg);
@@ -2419,7 +2419,7 @@
         uiLabelMap.addBottomResourceBundle("CommonUiLabels");
 
         Map bodyParameters = UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId, "userLogin", placingUserLogin, "uiLabelMap", uiLabelMap, "locale", locale);
-        if ( placingParty!= null) {
+        if (placingParty!= null) {
             bodyParameters.put("partyId", placingParty.get("partyId"));
         }
         bodyParameters.put("note", note);
@@ -2795,7 +2795,7 @@
                 EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_COMPLETED"),
                 EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
                 EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED")
-        );
+       );
         EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(exprs, EntityOperator.AND);
 
         // get the orders
@@ -4351,7 +4351,7 @@
         GenericValue userLogin = (GenericValue) context.get("userLogin");
         List orderIds = (List) context.get("orderIdList");
 
-        for (Object orderId : orderIds){
+        for (Object orderId : orderIds) {
             if (UtilValidate.isEmpty(orderId)) {
                 continue;
             }
@@ -4635,7 +4635,7 @@
             // the original method did a "\d+" regexp to decide which is the case, this version is more explicit with its lookup of PaymentMethodType
             if (checkOutPaymentId != null) {
                 List paymentMethodTypes = delegator.findList("PaymentMethodType", null, null, null, null, true);
-                for (Iterator iter = paymentMethodTypes.iterator(); iter.hasNext(); ) {
+                for (Iterator iter = paymentMethodTypes.iterator(); iter.hasNext();) {
                     GenericValue type = (GenericValue) iter.next();
                     if (type.get("paymentMethodTypeId").equals(checkOutPaymentId)) {
                         paymentMethodTypeId = (String) type.get("paymentMethodTypeId");
@@ -4715,7 +4715,7 @@
 
                 // Get the cancelled quantity for the item
                 BigDecimal orderItemCancelQuantity = BigDecimal.ZERO;
-                if (! UtilValidate.isEmpty(orderItem.get("cancelQuantity")) ) {
+                if (! UtilValidate.isEmpty(orderItem.get("cancelQuantity"))) {
                     orderItemCancelQuantity = orderItem.getBigDecimal("cancelQuantity");
                 }
 
@@ -4791,7 +4791,7 @@
                     orderItemQuantity = orderItem.getBigDecimal("quantity");
                 }
                 BigDecimal orderItemCancelQuantity = BigDecimal.ZERO;
-                if (! UtilValidate.isEmpty(orderItem.get("cancelQuantity")) ) {
+                if (! UtilValidate.isEmpty(orderItem.get("cancelQuantity"))) {
                     orderItemCancelQuantity = orderItem.getBigDecimal("cancelQuantity");
                 }
 
@@ -4801,7 +4801,7 @@
                 Iterator srit = shipmentReceipts.iterator();
                 while (srit.hasNext()) {
                     GenericValue shipmentReceipt = (GenericValue) srit.next();
-                    if (! UtilValidate.isEmpty(shipmentReceipt.get("quantityAccepted")) ) {
+                    if (! UtilValidate.isEmpty(shipmentReceipt.get("quantityAccepted"))) {
                         receivedQuantity = receivedQuantity.add(shipmentReceipt.getBigDecimal("quantityAccepted"));
                     }
                 }
@@ -5335,7 +5335,7 @@
             EntityCondition cond = EntityCondition.makeCondition(UtilMisc.toList(
                     EntityCondition.makeCondition("productAssocTypeId", "ALSO_BOUGHT"),
                     EntityCondition.makeConditionDate("fromDate", "thruDate")
-            ));
+           ));
             try {
                 delegator.storeByCondition("ProductAssoc", UtilMisc.toMap("thruDate", UtilDateTime.nowTimestamp()), cond);
             } catch (GenericEntityException e) {
@@ -5406,8 +5406,8 @@
                                 EntityCondition.makeCondition("productAssocTypeId", "ALSO_BOUGHT"),
                                 EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, UtilDateTime.nowTimestamp()),
                                 EntityCondition.makeCondition("thruDate", null)
-                        )
-                );
+                       )
+               );
                 GenericValue existingProductAssoc = null;
                 try {
                     // No point in using the cache because of the filterByDateExpr