svn commit: r737003 [3/11] - in /ofbiz/trunk: ./ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/invoice/ applications/accounting/script/org/ofbiz/accounting/ledger/ applications/accounting/servicedef/ application...

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

svn commit: r737003 [3/11] - in /ofbiz/trunk: ./ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/invoice/ applications/accounting/script/org/ofbiz/accounting/ledger/ applications/accounting/servicedef/ application...

jleroux@apache.org
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java Fri Jan 23 03:08:47 2009
@@ -781,20 +781,20 @@
                 GenericValue contentAssoc = (GenericValue)iter.next();
                 String contentIdTo = contentAssoc.getString("contentIdTo");
                 GenericValue contentTo = delegator.findByPrimaryKey("Content", UtilMisc.toMap("contentId", contentIdTo));
-         int intLeafCount = 0;
-         Long leafCount = (Long)contentTo.get("childLeafCount");
-            if (leafCount != null) {
-                intLeafCount = leafCount.intValue();
+                int intLeafCount = 0;
+                Long leafCount = (Long)contentTo.get("childLeafCount");
+                if (leafCount != null) {
+                    intLeafCount = leafCount.intValue();
                 }
                 contentTo.set("childLeafCount", Long.valueOf(intLeafCount + leafChangeAmount));
                 
                 if (branchChangeAmount != 0) {
-                 int intBranchCount = 0;
-         Long branchCount = (Long)contentTo.get("childBranchCount");
-             if (branchCount != null) {
-                 intBranchCount = branchCount.intValue();
-             }
-                 contentTo.set("childBranchCount", Long.valueOf(intBranchCount + branchChangeAmount));
+                    int intBranchCount = 0;
+                    Long branchCount = (Long)contentTo.get("childBranchCount");
+                    if (branchCount != null) {
+                        intBranchCount = branchCount.intValue();
+                    }
+                    contentTo.set("childBranchCount", Long.valueOf(intBranchCount + branchChangeAmount));
                 }
                 contentTo.store();
                 updateStatsBottomUp(delegator, contentIdTo, typeList, 0, leafChangeAmount);

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java Fri Jan 23 03:08:47 2009
@@ -70,8 +70,8 @@
         if (webSiteId == null) {
             webSiteId = WebSiteWorker.getWebSiteId(request);
             if (webSiteId == null) {
-             request.setAttribute("_ERROR_MESSAGE_", "Not able to run CMS application; no webSiteId defined for WebApp!");
-             return "error";
+                request.setAttribute("_ERROR_MESSAGE_", "Not able to run CMS application; no webSiteId defined for WebApp!");
+                return "error";
             }
         }
 
@@ -104,7 +104,7 @@
             }
         } // if called through the default request, there is no request in pathinfo
 
-     Debug.log("========pathinfo: " + pathInfo);
+        Debug.log("========pathinfo: " + pathInfo);
         // if path info is null; check for a default content
         if (pathInfo == null) {
             List<GenericValue> defaultContents = null;
@@ -182,7 +182,7 @@
                     contentId = pathInfo;
                 }
             }
-         Debug.log("========contentId: " + contentId);
+            Debug.log("========contentId: " + contentId);
 
             // verify the request content is associated with the current website
             boolean websiteOk;
@@ -237,28 +237,28 @@
 
                 return "success";
             } else {
-             String contentName = null;
-             String siteName = null;
-             try {
-             GenericValue content = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId", contentId));
-             if (UtilValidate.isNotEmpty(content)) {
-             contentName = content.getString("contentName");
-             }
-             siteName = delegator.findByPrimaryKeyCache("WebSite", UtilMisc.toMap("webSiteId", webSiteId)).getString("siteName");
+                String contentName = null;
+                String siteName = null;
+                try {
+                    GenericValue content = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId", contentId));
+                    if (UtilValidate.isNotEmpty(content)) {
+                        contentName = content.getString("contentName");
+                    }
+                    siteName = delegator.findByPrimaryKeyCache("WebSite", UtilMisc.toMap("webSiteId", webSiteId)).getString("siteName");
                 } catch (GenericEntityException e) {
                     Debug.logError(e, module);
                 }
-             request.setAttribute("_ERROR_MESSAGE_", "Content: " + contentName + " [" + contentId + "] is not a publish point for the current website: "+ siteName + " [" + webSiteId + "]");
+                request.setAttribute("_ERROR_MESSAGE_", "Content: " + contentName + " [" + contentId + "] is not a publish point for the current website: "+ siteName + " [" + webSiteId + "]");
                 return "error";
             }
         }
         String siteName = null;
-     try {
-     siteName = delegator.findByPrimaryKeyCache("WebSite", UtilMisc.toMap("webSiteId", webSiteId)).getString("siteName");
+        try {
+            siteName = delegator.findByPrimaryKeyCache("WebSite", UtilMisc.toMap("webSiteId", webSiteId)).getString("siteName");
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
         }
-     request.setAttribute("_ERROR_MESSAGE_", "Not able to find a page to display for website: "+ siteName + " [" + webSiteId + "] not even a default page!");
+        request.setAttribute("_ERROR_MESSAGE_", "Not able to find a page to display for website: "+ siteName + " [" + webSiteId + "] not even a default page!");
         return "error";
         // throw an unknown request error
         //throw new GeneralRuntimeException("Unknown request; this request does not exist or cannot be called directly.");

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.java Fri Jan 23 03:08:47 2009
@@ -68,7 +68,7 @@
             int multipartCount = multipart.getCount();
             // Debug.logInfo(currentIndex + "====number of attachments: " + multipartCount, module);
             for (int i=0; i < multipartCount; i++) {
-             // Debug.logInfo(currentIndex + "====processing attachment: " + i, module);
+                // Debug.logInfo(currentIndex + "====processing attachment: " + i, module);
                 Part part = multipart.getBodyPart(i);
                 String thisContentTypeRaw = part.getContentType();
                 // Debug.logInfo("====thisContentTypeRaw: " + thisContentTypeRaw, module);
@@ -79,11 +79,11 @@
                 ByteArrayOutputStream baos = new ByteArrayOutputStream();
                 if (part instanceof Multipart) {
                     currentIndex = currentIndex.concat("." + i);
-                 // Debug.logInfo("=====attachment contain attachment, index:" + currentIndex, module);
+                    // Debug.logInfo("=====attachment contain attachment, index:" + currentIndex, module);
                     return addMultipartAttachementToComm((Multipart) part.getContent(), commEventMap, subject, dispatcher, userLogin);
                 }
-             // Debug.logInfo("=====attachment not contains attachment, index:" + currentIndex, module);
-             // Debug.logInfo("=====check for currentIndex(" + currentIndex  + ") against master contentIndex(" + EmailServices.contentIndex + ")", module);
+                // Debug.logInfo("=====attachment not contains attachment, index:" + currentIndex, module);
+                // Debug.logInfo("=====check for currentIndex(" + currentIndex  + ") against master contentIndex(" + EmailServices.contentIndex + ")", module);
                 if(currentIndex.concat("." + i).equals(EmailServices.contentIndex)) continue;
 
                 // The first test should not pass, because if it exists, it should be the bodyContentIndex part

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=737003&r1=737002&r2=737003&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 Fri Jan 23 03:08:47 2009
@@ -86,9 +86,9 @@
             //Debug.logVerbose("in uploadAndStoreImage, fieldName:" + fieldName + " fieldStr:" + fieldStr, "");
             }
             if (fieldName.equals(uploadField)){
-             imageFi = fi;
-             //MimeType of upload file
-             results.put("uploadMimeType", fi.getContentType());
+                imageFi = fi;
+                //MimeType of upload file
+                results.put("uploadMimeType", fi.getContentType());
             }
         }
 

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=737003&r1=737002&r2=737003&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 Fri Jan 23 03:08:47 2009
@@ -31,68 +31,68 @@
  */
 
 public class OpenOfficeByteArrayInputStream extends ByteArrayInputStream implements XInputStream, XSeekable {
-
+    
     public static final String module = OpenOfficeByteArrayInputStream.class.getName();
     
- public OpenOfficeByteArrayInputStream(byte [] bytes) {
- super(bytes);
- }
-
-
- public long getPosition() throws com.sun.star.io.IOException {
- return this.pos;
- }
-
- public long getLength() throws com.sun.star.io.IOException {
- return this.count;
- }
-
- public void seek(long pos1) throws com.sun.star.io.IOException, IllegalArgumentException {
- this.pos = (int)pos1;
- }
+    public OpenOfficeByteArrayInputStream(byte [] bytes) {
+        super(bytes);
+    }
+    
+    
+    public long getPosition() throws com.sun.star.io.IOException {
+        return this.pos;
+    }
+    
+    public long getLength() throws com.sun.star.io.IOException {
+        return this.count;
+    }
+    
+    public void seek(long pos1) throws com.sun.star.io.IOException, IllegalArgumentException {
+        this.pos = (int)pos1;
+    }
 
- public void skipBytes(int pos1) throws BufferSizeExceededException,
+    public void skipBytes(int pos1) throws BufferSizeExceededException,
                                              NotConnectedException, com.sun.star.io.IOException {
         skip(pos1);
- }
+    }
 
- public void closeInput() throws NotConnectedException, com.sun.star.io.IOException {
-
- try {
- close();
- } catch( IOException e) {
- String errMsg = e.getMessage();
- throw new com.sun.star.io.IOException( errMsg, this );
- }
-
-    }
-
- public int readBytes(byte [][]buf, int pos2) throws BufferSizeExceededException, NotConnectedException, com.sun.star.io.IOException {
-
- int bytesRead = 0;
- byte [] buf2 = new byte[pos2];
- try {
- bytesRead = super.read(buf2);
- } catch( IOException e) {
- String errMsg = e.getMessage();
- throw new com.sun.star.io.IOException( errMsg, this );
- }
-
- if (bytesRead > 0) {
- if (bytesRead < pos2) {
- byte [] buf3 = new byte[bytesRead];
- System.arraycopy(buf2, 0, buf3, 0, bytesRead);
- buf[0] = buf3;
- } else {
- buf[0] = buf2;
- }
- } else {
- buf[0] = new byte[0];
- }
- return bytesRead;
- }
+    public void closeInput() throws NotConnectedException, com.sun.star.io.IOException {
+        
+        try {
+            close();
+        } catch( IOException e) {
+            String errMsg = e.getMessage();
+            throw new com.sun.star.io.IOException( errMsg, this );
+        }
+        
+    }
+    
+    public int readBytes(byte [][]buf, int pos2) throws BufferSizeExceededException, NotConnectedException, com.sun.star.io.IOException {
+        
+        int bytesRead = 0;
+        byte [] buf2 = new byte[pos2];
+        try {
+            bytesRead = super.read(buf2);
+        } catch( IOException e) {
+            String errMsg = e.getMessage();
+            throw new com.sun.star.io.IOException( errMsg, this );
+        }
+        
+        if (bytesRead > 0) {
+            if (bytesRead < pos2) {
+                byte [] buf3 = new byte[bytesRead];
+                System.arraycopy(buf2, 0, buf3, 0, bytesRead);
+                buf[0] = buf3;
+            } else {
+                buf[0] = buf2;
+            }
+        } else {
+            buf[0] = new byte[0];
+        }
+        return bytesRead;
+    }
 
- public int readSomeBytes(byte [][]buf, int pos2) throws BufferSizeExceededException, NotConnectedException, com.sun.star.io.IOException {
- return readBytes(buf, pos2);
- }
+    public int readSomeBytes(byte [][]buf, int pos2) throws BufferSizeExceededException, NotConnectedException, com.sun.star.io.IOException {
+        return readBytes(buf, pos2);
+    }
 }

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=737003&r1=737002&r2=737003&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 Fri Jan 23 03:08:47 2009
@@ -34,42 +34,42 @@
 
     public static final String module = OpenOfficeByteArrayOutputStream.class.getName();
     
- public OpenOfficeByteArrayOutputStream() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- public OpenOfficeByteArrayOutputStream(int arg0) {
- super(arg0);
- // TODO Auto-generated constructor stub
- }
-
-
-  public void writeBytes(byte[] buf) throws BufferSizeExceededException, NotConnectedException, com.sun.star.io.IOException
-  {
-  try {
-  write(buf);
-  } catch ( java.io.IOException e ) {
-  throw(new com.sun.star.io.IOException(e.getMessage()));
-  }
-  }
-
-  public void closeOutput() throws BufferSizeExceededException, NotConnectedException, com.sun.star.io.IOException
-  {
-  try {
-  super.flush();
-  close();
-  } catch ( java.io.IOException e ) {
-  throw(new com.sun.star.io.IOException(e.getMessage()));
-  }
-  }
-  
-  public void flush()
-  {
-  try {
-  super.flush();
-  } catch ( java.io.IOException e ) {
-  }
-  }
+    public OpenOfficeByteArrayOutputStream() {
+        super();
+        // TODO Auto-generated constructor stub
+    }
+
+    public OpenOfficeByteArrayOutputStream(int arg0) {
+        super(arg0);
+        // TODO Auto-generated constructor stub
+    }
+
+
+      public void writeBytes(byte[] buf) throws BufferSizeExceededException, NotConnectedException, com.sun.star.io.IOException
+      {
+          try {
+              write(buf);
+          } catch ( java.io.IOException e ) {
+              throw(new com.sun.star.io.IOException(e.getMessage()));
+          }
+      }
+
+      public void closeOutput() throws BufferSizeExceededException, NotConnectedException, com.sun.star.io.IOException
+      {
+          try {
+              super.flush();
+              close();
+          } catch ( java.io.IOException e ) {
+              throw(new com.sun.star.io.IOException(e.getMessage()));
+          }
+      }
+      
+      public void flush()
+      {
+          try {
+              super.flush();
+          } 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=737003&r1=737002&r2=737003&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 Fri Jan 23 03:08:47 2009
@@ -347,12 +347,12 @@
     }
     public static String convertToUrl(String filePath, XComponentContext xComponentContext ) throws MalformedURLException {
 
-     String returnUrl = null;
-     File f = new File(filePath);
-     URL u = f.toURL();
+        String returnUrl = null;
+        File f = new File(filePath);
+        URL u = f.toURL();
         returnUrl =  ExternalUriReferenceTranslator.create(xComponentContext).translateToInternal(u.toExternalForm());
 
-     return returnUrl;
+        return returnUrl;
     }
     
 }

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/search/ContentDocument.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/search/ContentDocument.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/search/ContentDocument.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/search/ContentDocument.java Fri Jan 23 03:08:47 2009
@@ -54,143 +54,143 @@
     static char dirSep = System.getProperty("file.separator").charAt(0);
     public static final String module = ContentDocument.class.getName();
 
- public static Document Document(String id, GenericDelegator delegator, LocalDispatcher dispatcher) throws InterruptedException  {
+    public static Document Document(String id, GenericDelegator delegator, LocalDispatcher dispatcher) throws InterruptedException  {
 
- Document doc = null;
- GenericValue content;
-   try {
-   content = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId",id));
-   } catch(GenericEntityException e) {
-   Debug.logError(e, module);
-   return doc;
-   }
+        Document doc = null;
+        GenericValue content;
+          try {
+              content = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId",id));
+          } catch(GenericEntityException e) {
+              Debug.logError(e, module);
+              return doc;
+          }
 
         Map map = FastMap.newInstance();
-   doc = Document(content, map, dispatcher);
+          doc = Document(content, map, dispatcher);
         return doc;
- }
+    }
 
- public static Document Document(GenericValue content, Map context, LocalDispatcher dispatcher) throws InterruptedException {
+    public static Document Document(GenericValue content, Map context, LocalDispatcher dispatcher) throws InterruptedException {
 
- Document doc;
- // make a new, empty document
- doc = new Document();
- String contentId = content.getString("contentId");
- doc.add(new Field("contentId", contentId, Store.YES, Index.UN_TOKENIZED, TermVector.NO));
- // Add the last modified date of the file a field named "modified". Use
- // a
- // Keyword field, so that it's searchable, but so that no attempt is
- // made
- // to tokenize the field into words.
- Timestamp modDate = (Timestamp) content.get("lastModifiedDate");
- if (modDate == null) {
- modDate = (Timestamp) content.get("createdDate");
- }
- if (modDate != null) {
- doc.add(new Field("modified", modDate.toString(), Store.YES, Index.UN_TOKENIZED, TermVector.NO));
- }
- String contentName = content.getString("contentName");
- if (UtilValidate.isNotEmpty(contentName))
- doc.add(new Field("title", contentName, Store.YES, Index.TOKENIZED, TermVector.NO));
- String description = content.getString("description");
- if (UtilValidate.isNotEmpty(description))
- doc.add(new Field("description", description, Store.YES, Index.TOKENIZED, TermVector.NO));
- List ancestorList = FastList.newInstance();
- GenericDelegator delegator = content.getDelegator();
- ContentWorker.getContentAncestryAll(delegator, contentId, "WEB_SITE_PUB_PT", "TO", ancestorList);
- String ancestorString = StringUtil.join(ancestorList, " ");
- //Debug.logInfo("in ContentDocument, ancestorString:" + ancestorString,
- // module);
- if (UtilValidate.isNotEmpty(ancestorString)) {
- Field field = new Field("site", ancestorString, Store.NO, Index.TOKENIZED, TermVector.NO);
- //Debug.logInfo("in ContentDocument, field:" + field.stringValue(),
- // module);
- doc.add(field);
- }
- boolean retVal = indexDataResource(content, doc, context, dispatcher);
- //Debug.logInfo("in DataResourceDocument, context.badIndexList:" +
- // context.get("badIndexList"), module);
- if (!retVal)
- doc = null;
- return doc;
- }
+        Document doc;
+        // make a new, empty document
+        doc = new Document();
+        String contentId = content.getString("contentId");
+        doc.add(new Field("contentId", contentId, Store.YES, Index.UN_TOKENIZED, TermVector.NO));
+        // Add the last modified date of the file a field named "modified". Use
+        // a
+        // Keyword field, so that it's searchable, but so that no attempt is
+        // made
+        // to tokenize the field into words.
+        Timestamp modDate = (Timestamp) content.get("lastModifiedDate");
+        if (modDate == null) {
+            modDate = (Timestamp) content.get("createdDate");
+        }
+        if (modDate != null) {
+            doc.add(new Field("modified", modDate.toString(), Store.YES, Index.UN_TOKENIZED, TermVector.NO));
+        }
+        String contentName = content.getString("contentName");
+        if (UtilValidate.isNotEmpty(contentName))
+            doc.add(new Field("title", contentName, Store.YES, Index.TOKENIZED, TermVector.NO));
+        String description = content.getString("description");
+        if (UtilValidate.isNotEmpty(description))
+            doc.add(new Field("description", description, Store.YES, Index.TOKENIZED, TermVector.NO));
+        List ancestorList = FastList.newInstance();
+        GenericDelegator delegator = content.getDelegator();
+        ContentWorker.getContentAncestryAll(delegator, contentId, "WEB_SITE_PUB_PT", "TO", ancestorList);
+        String ancestorString = StringUtil.join(ancestorList, " ");
+        //Debug.logInfo("in ContentDocument, ancestorString:" + ancestorString,
+        // module);
+        if (UtilValidate.isNotEmpty(ancestorString)) {
+            Field field = new Field("site", ancestorString, Store.NO, Index.TOKENIZED, TermVector.NO);
+            //Debug.logInfo("in ContentDocument, field:" + field.stringValue(),
+            // module);
+            doc.add(field);
+        }
+        boolean retVal = indexDataResource(content, doc, context, dispatcher);
+        //Debug.logInfo("in DataResourceDocument, context.badIndexList:" +
+        // context.get("badIndexList"), module);
+        if (!retVal)
+            doc = null;
+        return doc;
+    }
 
- public static boolean indexDataResource(GenericValue content, Document doc, Map context, LocalDispatcher dispatcher) {
+    public static boolean indexDataResource(GenericValue content, Document doc, Map context, LocalDispatcher dispatcher) {
         GenericDelegator delegator = content.getDelegator();
- String contentId = content.getString("contentId");
- //Debug.logInfo("in ContentDocument, contentId:" + contentId,
- // module);
- String dataResourceId = content.getString("dataResourceId");
- //Debug.logInfo("in ContentDocument, dataResourceId:" + dataResourceId, module);
- GenericValue dataResource;
- try {
- dataResource = delegator.findByPrimaryKeyCache("DataResource", UtilMisc.toMap("dataResourceId", dataResourceId));
- } catch (GenericEntityException e) {
- Debug.logError(e, module);
- List badIndexList = (List) context.get("badIndexList");
- badIndexList.add(contentId + " - " + e.getMessage());
- //Debug.logInfo("in DataResourceDocument, badIndexList:" + badIndexList, module);
- return false;
- }
- if (dataResource == null) {
- List badIndexList = (List) context.get("badIndexList");
- badIndexList.add(contentId + " - dataResource is null.");
- //Debug.logInfo("in DataResourceDocument, badIndexList:" + badIndexList, module);
- return false;
- }
- String mimeTypeId = dataResource.getString("mimeTypeId");
- if (UtilValidate.isEmpty(mimeTypeId)) {
- mimeTypeId = "text/html";
- }
- Locale locale = Locale.getDefault();
- String currentLocaleString = dataResource.getString("localeString");
- if (UtilValidate.isNotEmpty(currentLocaleString)) {
- locale = UtilMisc.parseLocale(currentLocaleString);
- }
- String text;
- try {
- text = ContentWorker.renderContentAsText(dispatcher, delegator, contentId, context, locale, mimeTypeId, true);
- } catch (GeneralException e) {
- Debug.logError(e, module);
- List badIndexList = (List) context.get("badIndexList");
- badIndexList.add(contentId + " - " + e.getMessage());
- //Debug.logInfo("in DataResourceDocument, badIndexList:" + badIndexList, module);
- return false;
- } catch (IOException e2) {
- Debug.logError(e2, module);
- List badIndexList = (List) context.get("badIndexList");
- badIndexList.add(contentId + " - " + e2.getMessage());
- //Debug.logInfo("in DataResourceDocument, badIndexList:" + badIndexList, module);
- return false;
- }
- //Debug.logInfo("in DataResourceDocument, text:" + text, module);
- if (UtilValidate.isNotEmpty(text)) {
- Field field = new Field("content", text, Store.NO, Index.TOKENIZED, TermVector.NO);
- //Debug.logInfo("in ContentDocument, field:" + field.stringValue(), module);
- doc.add(field);
- }
- List featureDataResourceList;
- try {
- featureDataResourceList = content.getRelatedCache("ProductFeatureDataResource");
- } catch (GenericEntityException e) {
- Debug.logError(e, module);
- List badIndexList = (List) context.get("badIndexList");
- badIndexList.add(contentId + " - " + e.getMessage());
- return false;
- }
- List featureList = FastList.newInstance();
- Iterator iter = featureDataResourceList.iterator();
- while (iter.hasNext()) {
- GenericValue productFeatureDataResource = (GenericValue) iter .next();
- String feature = productFeatureDataResource.getString("productFeatureId");
- featureList.add(feature);
- }
- String featureString = StringUtil.join(featureList, " ");
- //Debug.logInfo("in ContentDocument, featureString:" + featureString, module);
- if (UtilValidate.isNotEmpty(featureString)) {
- Field field = new Field("feature", featureString, Store.NO, Index.TOKENIZED, TermVector.NO);
- doc.add(field);
- }
- return true;
- }
+        String contentId = content.getString("contentId");
+        //Debug.logInfo("in ContentDocument, contentId:" + contentId,
+        // module);
+        String dataResourceId = content.getString("dataResourceId");
+        //Debug.logInfo("in ContentDocument, dataResourceId:" + dataResourceId, module);
+        GenericValue dataResource;
+        try {
+            dataResource = delegator.findByPrimaryKeyCache("DataResource", UtilMisc.toMap("dataResourceId", dataResourceId));
+        } catch (GenericEntityException e) {
+            Debug.logError(e, module);
+            List badIndexList = (List) context.get("badIndexList");
+            badIndexList.add(contentId + " - " + e.getMessage());
+            //Debug.logInfo("in DataResourceDocument, badIndexList:" + badIndexList, module);
+            return false;
+        }
+        if (dataResource == null) {
+            List badIndexList = (List) context.get("badIndexList");
+            badIndexList.add(contentId + " - dataResource is null.");
+            //Debug.logInfo("in DataResourceDocument, badIndexList:" + badIndexList, module);
+            return false;
+        }
+        String mimeTypeId = dataResource.getString("mimeTypeId");
+        if (UtilValidate.isEmpty(mimeTypeId)) {
+            mimeTypeId = "text/html";
+        }
+        Locale locale = Locale.getDefault();
+        String currentLocaleString = dataResource.getString("localeString");
+        if (UtilValidate.isNotEmpty(currentLocaleString)) {
+            locale = UtilMisc.parseLocale(currentLocaleString);
+        }
+        String text;
+        try {
+            text = ContentWorker.renderContentAsText(dispatcher, delegator, contentId, context, locale, mimeTypeId, true);
+        } catch (GeneralException e) {
+            Debug.logError(e, module);
+            List badIndexList = (List) context.get("badIndexList");
+            badIndexList.add(contentId + " - " + e.getMessage());
+            //Debug.logInfo("in DataResourceDocument, badIndexList:" + badIndexList, module);
+            return false;
+        } catch (IOException e2) {
+            Debug.logError(e2, module);
+            List badIndexList = (List) context.get("badIndexList");
+            badIndexList.add(contentId + " - " + e2.getMessage());
+            //Debug.logInfo("in DataResourceDocument, badIndexList:" + badIndexList, module);
+            return false;
+        }
+        //Debug.logInfo("in DataResourceDocument, text:" + text, module);
+        if (UtilValidate.isNotEmpty(text)) {
+            Field field = new Field("content", text, Store.NO, Index.TOKENIZED, TermVector.NO);
+            //Debug.logInfo("in ContentDocument, field:" + field.stringValue(), module);
+            doc.add(field);
+        }
+        List featureDataResourceList;
+        try {
+            featureDataResourceList = content.getRelatedCache("ProductFeatureDataResource");
+        } catch (GenericEntityException e) {
+            Debug.logError(e, module);
+            List badIndexList = (List) context.get("badIndexList");
+            badIndexList.add(contentId + " - " + e.getMessage());
+            return false;
+        }
+        List featureList = FastList.newInstance();
+        Iterator iter = featureDataResourceList.iterator();
+        while (iter.hasNext()) {
+            GenericValue productFeatureDataResource = (GenericValue) iter .next();
+            String feature = productFeatureDataResource.getString("productFeatureId");
+            featureList.add(feature);
+        }
+        String featureString = StringUtil.join(featureList, " ");
+        //Debug.logInfo("in ContentDocument, featureString:" + featureString, module);
+        if (UtilValidate.isNotEmpty(featureString)) {
+            Field field = new Field("feature", featureString, Store.NO, Index.TOKENIZED, TermVector.NO);
+            doc.add(field);
+        }
+        return true;
+    }
 }

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/search/DataResourceDocument.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/search/DataResourceDocument.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/search/DataResourceDocument.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/search/DataResourceDocument.java Fri Jan 23 03:08:47 2009
@@ -44,49 +44,49 @@
  */
 
 public class DataResourceDocument {
- static char dirSep = System.getProperty("file.separator").charAt(0);
+    static char dirSep = System.getProperty("file.separator").charAt(0);
     public static final String module = ContentDocument.class.getName();
 
- public static Document Document(String id, GenericDelegator delegator, Map context) throws InterruptedException  {
+    public static Document Document(String id, GenericDelegator delegator, Map context) throws InterruptedException  {
 
- Document doc = null;
- GenericValue dataResource = null;
-   try {
-   dataResource = delegator.findByPrimaryKeyCache("DataResource", UtilMisc.toMap("dataResourceId",id));
-   } catch(GenericEntityException e) {
-   Debug.logError(e, module);
-   return doc;
-   }
-   // make a new, empty document
-   doc = new Document();
+        Document doc = null;
+        GenericValue dataResource = null;
+          try {
+              dataResource = delegator.findByPrimaryKeyCache("DataResource", UtilMisc.toMap("dataResourceId",id));
+          } catch(GenericEntityException e) {
+              Debug.logError(e, module);
+              return doc;
+          }
+          // make a new, empty document
+          doc = new Document();
 
-   doc.add(new Field("dataResourceId", id, Store.YES, Index.UN_TOKENIZED, TermVector.NO));
+          doc.add(new Field("dataResourceId", id, Store.YES, Index.UN_TOKENIZED, TermVector.NO));
 
-   String mimeTypeId = dataResource.getString("mimeTypeId");
-    if (UtilValidate.isEmpty(mimeTypeId)) {
+          String mimeTypeId = dataResource.getString("mimeTypeId");
+        if (UtilValidate.isEmpty(mimeTypeId)) {
             mimeTypeId = "text/html";
         }
 
-    Locale locale = Locale.getDefault();
+        Locale locale = Locale.getDefault();
         String currentLocaleString = dataResource.getString("localeString");
         if (UtilValidate.isNotEmpty(currentLocaleString)) {
             locale = UtilMisc.parseLocale(currentLocaleString);
         }
 
         StringWriter outWriter = new StringWriter();
-   try {
-      DataResourceWorker.writeDataResourceText(dataResource, mimeTypeId, locale, context, delegator, outWriter, true);
-   } catch(GeneralException e) {
-   Debug.logError(e, module);
-   } catch(IOException e) {
-   Debug.logError(e, module);
-   }
-   String text = outWriter.toString();
-   Debug.logInfo("in DataResourceDocument, text:" + text, module);
+          try {
+              DataResourceWorker.writeDataResourceText(dataResource, mimeTypeId, locale, context, delegator, outWriter, true);
+          } catch(GeneralException e) {
+              Debug.logError(e, module);
+          } catch(IOException e) {
+              Debug.logError(e, module);
+          }
+          String text = outWriter.toString();
+          Debug.logInfo("in DataResourceDocument, text:" + text, module);
                 if (UtilValidate.isNotEmpty(text))
-      doc.add(new Field("content", text, Store.NO, Index.TOKENIZED, TermVector.NO));
+              doc.add(new Field("content", text, Store.NO, Index.TOKENIZED, TermVector.NO));
 
-    return doc;
- }
+        return doc;
+    }
 
 }

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchEvents.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/search/SearchEvents.java Fri Jan 23 03:08:47 2009
@@ -43,7 +43,7 @@
 public class SearchEvents {
 
     public static final String module = SearchEvents.class.getName();
-
+    
     public static String indexTree(HttpServletRequest request, HttpServletResponse response) {
 
         Map result;

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=737003&r1=737002&r2=737003&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 Fri Jan 23 03:08:47 2009
@@ -50,7 +50,7 @@
  */
 public class SearchWorker {
 
- public static final String module = SearchWorker.class.getName();
+    public static final String module = SearchWorker.class.getName();
 
         public static Map indexTree(LocalDispatcher dispatcher, GenericDelegator delegator, String siteId, Map context, String path) throws Exception {
 
@@ -58,14 +58,14 @@
             GenericValue content = delegator.makeValue("Content", UtilMisc.toMap("contentId", siteId));
                 if (Debug.infoOn()) Debug.logInfo("in indexTree, siteId:" + siteId + " content:" + content, module);
             List siteList = ContentWorker.getAssociatedContent(content, "From", UtilMisc.toList("SUBSITE", "PUBLISH_LINK"), null, UtilDateTime.nowTimestamp().toString(), null);
-    //if (Debug.infoOn()) Debug.logInfo("in indexTree, siteList:" + siteList, module);
+        //if (Debug.infoOn()) Debug.logInfo("in indexTree, siteList:" + siteList, module);
             if (siteList != null) {
                 Iterator iter = siteList.iterator();
                 while (iter.hasNext()) {
                     GenericValue siteContent = (GenericValue)iter.next();
                     String siteContentId = siteContent.getString("contentId");
                     List subContentList = ContentWorker.getAssociatedContent(siteContent, "From", UtilMisc.toList("SUBSITE", "PUBLISH_LINK", "SUB_CONTENT"), null, UtilDateTime.nowTimestamp().toString(), null);
-       //if (Debug.infoOn()) Debug.logInfo("in indexTree, subContentList:" + subContentList, module);
+              //if (Debug.infoOn()) Debug.logInfo("in indexTree, subContentList:" + subContentList, module);
                     if (subContentList != null) {
                         List contentIdList = FastList.newInstance();
                         Iterator iter2 = subContentList.iterator();
@@ -73,7 +73,7 @@
                             GenericValue subContent = (GenericValue)iter2.next();
                             contentIdList.add(subContent.getString("contentId"));
                         }
-           //if (Debug.infoOn()) Debug.logInfo("in indexTree, contentIdList:" + contentIdList, module);
+                  //if (Debug.infoOn()) Debug.logInfo("in indexTree, contentIdList:" + contentIdList, module);
                         indexContentList(contentIdList, delegator, dispatcher, context);
 
                         String subSiteId = siteContent.getString("contentId");
@@ -93,117 +93,117 @@
             return results;
         }
 
- public static void indexContentList(List idList, GenericDelegator delegator, LocalDispatcher dispatcher, Map context) throws Exception {
- String path = null;
- indexContentList(dispatcher, delegator, context, idList, path);
- }
-
- public static void indexContentList(LocalDispatcher dispatcher, GenericDelegator delegator, Map context, List idList, String path) throws Exception {
- String indexAllPath = getIndexPath(path);
- if (Debug.infoOn())
- Debug.logInfo("in indexContent, indexAllPath:" + indexAllPath, module);
- GenericValue content = null;
- // Delete existing documents
- Iterator iter = null;
- List contentList = null;
- IndexReader reader = null;
- try {
- reader = IndexReader.open(indexAllPath);
- } catch (Exception e) {
- // ignore
- }
- //if (Debug.infoOn()) Debug.logInfo("in indexContent, reader:" +
- // reader, module);
- contentList = FastList.newInstance();
- iter = idList.iterator();
- while (iter.hasNext()) {
- String id = (String) iter.next();
- if (Debug.infoOn())
- Debug.logInfo("in indexContent, id:" + id, module);
- try {
- content = delegator.findByPrimaryKeyCache("Content", UtilMisc .toMap("contentId", id));
- if (content != null) {
- if (reader != null) {
- deleteContentDocument(content, reader);
- }
- contentList.add(content);
- }
- } catch (GenericEntityException e) {
- Debug.logError(e, module);
- return;
- }
- }
- if (reader != null) {
- reader.close();
- }
- // Now create
- IndexWriter writer = null;
- try {
- writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), false);
- } catch (Exception e) {
- writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), true);
- }
- //if (Debug.infoOn()) Debug.logInfo("in indexContent, writer:" +
- // writer, module);
- iter = contentList.iterator();
- while (iter.hasNext()) {
- content = (GenericValue) iter.next();
- indexContent(dispatcher, delegator, context, content, writer);
- }
- writer.optimize();
- writer.close();
- }
-
-
- public static void deleteContentDocument(GenericValue content, String path) throws Exception {
-    String indexAllPath = null;
-    indexAllPath = getIndexPath(path);
-    IndexReader reader = IndexReader.open(indexAllPath);
+    public static void indexContentList(List idList, GenericDelegator delegator, LocalDispatcher dispatcher, Map context) throws Exception {
+        String path = null;
+        indexContentList(dispatcher, delegator, context, idList, path);
+    }
+
+    public static void indexContentList(LocalDispatcher dispatcher, GenericDelegator delegator, Map context, List idList, String path) throws Exception {
+        String indexAllPath = getIndexPath(path);
+        if (Debug.infoOn())
+            Debug.logInfo("in indexContent, indexAllPath:" + indexAllPath, module);
+        GenericValue content = null;
+        // Delete existing documents
+        Iterator iter = null;
+        List contentList = null;
+        IndexReader reader = null;
+        try {
+            reader = IndexReader.open(indexAllPath);
+        } catch (Exception e) {
+            // ignore
+        }
+        //if (Debug.infoOn()) Debug.logInfo("in indexContent, reader:" +
+        // reader, module);
+        contentList = FastList.newInstance();
+        iter = idList.iterator();
+        while (iter.hasNext()) {
+            String id = (String) iter.next();
+            if (Debug.infoOn())
+                Debug.logInfo("in indexContent, id:" + id, module);
+            try {
+                content = delegator.findByPrimaryKeyCache("Content", UtilMisc .toMap("contentId", id));
+                if (content != null) {
+                    if (reader != null) {
+                        deleteContentDocument(content, reader);
+                    }
+                    contentList.add(content);
+                }
+            } catch (GenericEntityException e) {
+                Debug.logError(e, module);
+                return;
+            }
+        }
+        if (reader != null) {
+            reader.close();
+        }
+        // Now create
+        IndexWriter writer = null;
+        try {
+            writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), false);
+        } catch (Exception e) {
+            writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), true);
+        }
+        //if (Debug.infoOn()) Debug.logInfo("in indexContent, writer:" +
+        // writer, module);
+        iter = contentList.iterator();
+        while (iter.hasNext()) {
+            content = (GenericValue) iter.next();
+            indexContent(dispatcher, delegator, context, content, writer);
+        }
+        writer.optimize();
+        writer.close();
+    }
+
+
+    public static void deleteContentDocument(GenericValue content, String path) throws Exception {
+        String indexAllPath = null;
+        indexAllPath = getIndexPath(path);
+        IndexReader reader = IndexReader.open(indexAllPath);
             deleteContentDocument(content, reader);
             reader.close();
- }
+    }
 
- public static void deleteContentDocument(GenericValue content, IndexReader reader) throws Exception {
+    public static void deleteContentDocument(GenericValue content, IndexReader reader) throws Exception {
             String contentId = content.getString("contentId");
-    Term term = new Term("contentId", contentId);
-    if (Debug.infoOn()) Debug.logInfo("in indexContent, term:" + term, module);
-    int qtyDeleted = reader.deleteDocuments(term);
-    if (Debug.infoOn()) Debug.logInfo("in indexContent, qtyDeleted:" + term, module);
-    String dataResourceId = content.getString("dataResourceId");
-    if (dataResourceId != null) {
-     deleteDataResourceDocument(dataResourceId, reader);
-    }
-
- }
-
-
- public static void deleteDataResourceDocument(String dataResourceId, IndexReader reader) throws Exception {
-    Term term = new Term("dataResourceId", dataResourceId);
-    if (Debug.infoOn()) Debug.logInfo("in indexContent, term:" + term, module);
-    int qtyDeleted = reader.deleteDocuments(term);
-    if (Debug.infoOn()) Debug.logInfo("in indexContent, qtyDeleted:" + term, module);
-
- }
-
- public static void indexContent(LocalDispatcher dispatcher, GenericDelegator delegator, Map context, GenericValue content, String path) throws Exception {
- String indexAllPath = getIndexPath(path);
- IndexWriter writer = null;
- try {
-   writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), false);
-                if (Debug.infoOn()) Debug.logInfo("Used old directory:" + indexAllPath, module);
- } catch(FileNotFoundException e) {
-   writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), true);
-                if (Debug.infoOn()) Debug.logInfo("Created new directory:" + indexAllPath, module);
- }
-
- indexContent(dispatcher, delegator, context, content, writer);
-       writer.optimize();
-     writer.close();
- }
-
- public static void indexContent(LocalDispatcher dispatcher, GenericDelegator delegator, Map context, GenericValue content, IndexWriter writer) throws Exception {
-    Document doc = ContentDocument.Document(content, context, dispatcher);
-    //if (Debug.infoOn()) Debug.logInfo("in indexContent, content:" + content, module);
+        Term term = new Term("contentId", contentId);
+        if (Debug.infoOn()) Debug.logInfo("in indexContent, term:" + term, module);
+        int qtyDeleted = reader.deleteDocuments(term);
+        if (Debug.infoOn()) Debug.logInfo("in indexContent, qtyDeleted:" + term, module);
+        String dataResourceId = content.getString("dataResourceId");
+        if (dataResourceId != null) {
+            deleteDataResourceDocument(dataResourceId, reader);
+        }
+
+    }
+
+
+    public static void deleteDataResourceDocument(String dataResourceId, IndexReader reader) throws Exception {
+        Term term = new Term("dataResourceId", dataResourceId);
+        if (Debug.infoOn()) Debug.logInfo("in indexContent, term:" + term, module);
+        int qtyDeleted = reader.deleteDocuments(term);
+        if (Debug.infoOn()) Debug.logInfo("in indexContent, qtyDeleted:" + term, module);
+
+    }
+
+    public static void indexContent(LocalDispatcher dispatcher, GenericDelegator delegator, Map context, GenericValue content, String path) throws Exception {
+        String indexAllPath = getIndexPath(path);
+        IndexWriter writer = null;
+        try {
+               writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), false);
+                    if (Debug.infoOn()) Debug.logInfo("Used old directory:" + indexAllPath, module);
+        } catch(FileNotFoundException e) {
+               writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), true);
+                    if (Debug.infoOn()) Debug.logInfo("Created new directory:" + indexAllPath, module);
+        }
+
+        indexContent(dispatcher, delegator, context, content, writer);
+           writer.optimize();
+        writer.close();
+    }
+
+    public static void indexContent(LocalDispatcher dispatcher, GenericDelegator delegator, Map context, GenericValue content, IndexWriter writer) throws Exception {
+        Document doc = ContentDocument.Document(content, context, dispatcher);
+        //if (Debug.infoOn()) Debug.logInfo("in indexContent, content:" + content, module);
             if (doc != null) {
                 writer.addDocument(doc);
                 Integer goodIndexCount = (Integer)context.get("goodIndexCount");
@@ -218,39 +218,39 @@
             }
             */
 
- }
+    }
 
- public static void indexDataResource(GenericDelegator delegator, Map context, String id) throws Exception {
- String path = null;
- indexDataResource(delegator, context, id, path );
- }
-
- public static void indexDataResource(GenericDelegator delegator, Map context, String id, String path) throws Exception {
- String indexAllPath = getIndexPath(path);
- IndexWriter writer = null;
- try {
-    writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), false);
- } catch(FileNotFoundException e) {
-    writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), true);
- }
- indexDataResource(delegator, context, id, writer);
-    writer.optimize();
+    public static void indexDataResource(GenericDelegator delegator, Map context, String id) throws Exception {
+        String path = null;
+        indexDataResource(delegator, context, id, path );
+    }
+
+    public static void indexDataResource(GenericDelegator delegator, Map context, String id, String path) throws Exception {
+        String indexAllPath = getIndexPath(path);
+        IndexWriter writer = null;
+        try {
+            writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), false);
+        } catch(FileNotFoundException e) {
+            writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), true);
+        }
+        indexDataResource(delegator, context, id, writer);
+        writer.optimize();
             writer.close();
 
- }
+    }
 
- public static void indexDataResource(GenericDelegator delegator, Map context, String id, IndexWriter writer) throws Exception {
-    Document doc = DataResourceDocument.Document(id, delegator, context);
-    writer.addDocument(doc);
- }
-
- public static String getIndexPath(String path) {
- String indexAllPath = path;
- if (UtilValidate.isEmpty(indexAllPath))
- indexAllPath = UtilProperties.getPropertyValue("search", "defaultIndex");
- if (UtilValidate.isEmpty(indexAllPath))
- indexAllPath = "index";
- return indexAllPath;
+    public static void indexDataResource(GenericDelegator delegator, Map context, String id, IndexWriter writer) throws Exception {
+        Document doc = DataResourceDocument.Document(id, delegator, context);
+        writer.addDocument(doc);
+    }
+
+    public static String getIndexPath(String path) {
+        String indexAllPath = path;
+        if (UtilValidate.isEmpty(indexAllPath))
+            indexAllPath = UtilProperties.getPropertyValue("search", "defaultIndex");
+        if (UtilValidate.isEmpty(indexAllPath))
+            indexAllPath = "index";
+        return indexAllPath;
 
- }
+    }
 }

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java Fri Jan 23 03:08:47 2009
@@ -145,7 +145,7 @@
             String contentType2 = UtilValidate.isNotEmpty(mimeTypeId) ? mimeTypeId + "; charset=" +charset : contentType;
             String fileName = null;
             if (!UtilValidate.isEmpty(dataResource.getString("dataResourceName"))) {
-             fileName = dataResource.getString("dataResourceName").replace(" ", "_"); // spaces in filenames can be a problem
+                fileName = dataResource.getString("dataResourceName").replace(" ", "_"); // spaces in filenames can be a problem
             }
             UtilHttp.streamContentToBrowser(response, bais, byteBuffer.limit(), contentType2, fileName);
         } catch(GenericEntityException e) {

Modified: ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml Fri Jan 23 03:08:47 2009
@@ -980,9 +980,9 @@
     <request-map uri="EditDataResourceUpload"><security auth="true" https="true"/><response name="success" type="view" value="EditDataResourceUpload"/></request-map>
     <request-map uri="uploadImage">
         <security auth="true" https="true"/>
- <!--
+        <!--
         <event type="java" path="org.ofbiz.content.data.DataEvents" invoke="uploadImage" />
- -->
+            -->
         <event invoke="persistContentAndAssoc" path="" type="service"/>
         <response name="success" type="request" value="UploadImage"/>
         <response name="error" type="view" value="UploadImage"/>

Modified: ofbiz/trunk/applications/content/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/content/widget/CommonScreens.xml Fri Jan 23 03:08:47 2009
@@ -27,8 +27,8 @@
                 <property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/>
                 <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
                 <property-map resource="WorkEffortUiLabels" map-name="uiLabelMap" global="true"/>
- <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
- <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
+        <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
+        <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
 
                 <set field="layoutSettings.companyName" from-field="uiLabelMap.ContentCompanyName" global="true"/>
                 <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.ContentCompanySubtitle" global="true"/>

Modified: ofbiz/trunk/applications/content/widget/SurveyScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/SurveyScreens.xml?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/SurveyScreens.xml (original)
+++ ofbiz/trunk/applications/content/widget/SurveyScreens.xml Fri Jan 23 03:08:47 2009
@@ -254,7 +254,7 @@
         <section>
             <actions>
                 <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
-        <set field="titleProperty" value="PageTitleFindSurveyResponse"/>
+            <set field="titleProperty" value="PageTitleFindSurveyResponse"/>
                 <set field="tabButtonItem" value="FindSurveyResponse"/>
                 <set field="labelTitleProperty" value="PageTitleFindSurveyResponse"/>
 

Modified: ofbiz/trunk/applications/ecommerce/data/DemoFinAccount.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoFinAccount.xml?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoFinAccount.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoFinAccount.xml Fri Jan 23 03:08:47 2009
@@ -26,10 +26,10 @@
 
     <!-- settings -->
     <ProductStoreFinActSetting productStoreId="9000" finAccountTypeId="DEPOSIT_ACCOUNT" requirePinCode="N" validateGCFinAcct="Y" allowAuthToNegative="Y" replenishThreshold="0.0"
- purchaseSurveyId="1100" purchSurveySendTo="recipientEmail" purchSurveyCopyMe="copyMe" accountCodeLength="12" pinCodeLength="4" accountValidDays="365" authValidDays="5"/>
+        purchaseSurveyId="1100" purchSurveySendTo="recipientEmail" purchSurveyCopyMe="copyMe" accountCodeLength="12" pinCodeLength="4" accountValidDays="365" authValidDays="5"/>
 
     <ProductStoreFinActSetting productStoreId="9000" finAccountTypeId="REPLENISH_ACCOUNT" requirePinCode="N" validateGCFinAcct="Y" allowAuthToNegative="Y" replenishThreshold="0.0"
- purchaseSurveyId="1100" purchSurveySendTo="recipientEmail" purchSurveyCopyMe="copyMe" accountCodeLength="12" pinCodeLength="4" accountValidDays="365" authValidDays="5"/>
+        purchaseSurveyId="1100" purchSurveySendTo="recipientEmail" purchSurveyCopyMe="copyMe" accountCodeLength="12" pinCodeLength="4" accountValidDays="365" authValidDays="5"/>
 
     <ProductStorePaymentSetting productStoreId="9000" paymentMethodTypeId="FIN_ACCOUNT" paymentServiceTypeEnumId="PRDS_PAY_AUTH" paymentService="ofbFaAuthorize"/>
     <ProductStorePaymentSetting productStoreId="9000" paymentMethodTypeId="FIN_ACCOUNT" paymentServiceTypeEnumId="PRDS_PAY_RELEASE" paymentService="ofbFaRelease"/>

Modified: ofbiz/trunk/applications/ecommerce/data/DemoPurchasing.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoPurchasing.xml?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoPurchasing.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoPurchasing.xml Fri Jan 23 03:08:47 2009
@@ -188,7 +188,7 @@
     <!-- Here we have two "Payment term" options available (30 days or 60 days) -->
 
     <!-- Jacopo - based on my suggested changes, termDays would be the # of days and termValue would be the amount of discount, if any.  Does that make sense?
-     Also, I thought that all the terms of the agreement would apply to the order at the same time, so we would not have "Net 30" and "net 60" simultaneously. -->
+        Also, I thought that all the terms of the agreement would apply to the order at the same time, so we would not have "Net 30" and "net 60" simultaneously. -->
     <!--
     <AgreementTerm agreementTermId="1000" termTypeId="FIN_PAYMENT_TERM" agreementId="AGR_TEST" termValue="30"/>
     <AgreementTerm agreementTermId="1001" termTypeId="FIN_PAYMENT_TERM" agreementId="AGR_TEST" termValue="60"/>

Modified: ofbiz/trunk/applications/ecommerce/data/DemoStoreGiftCertificateSettings.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoStoreGiftCertificateSettings.xml?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoStoreGiftCertificateSettings.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoStoreGiftCertificateSettings.xml Fri Jan 23 03:08:47 2009
@@ -19,25 +19,25 @@
 -->
 
 <entity-engine-xml>
- <!-- sample settings for gift certificates.  DemoProduct.xml must be loaded -->
+    <!-- sample settings for gift certificates.  DemoProduct.xml must be loaded -->
     <!-- Note: if you set require pin code to N, then you can set validate GC FinAcct to Y -->
- <ProductStoreFinActSetting productStoreId="9000" finAccountTypeId="GIFTCERT_ACCOUNT" requirePinCode="N" validateGCFinAcct="Y"
- purchaseSurveyId="1000" purchSurveySendTo="recipientEmail" purchSurveyCopyMe="copyMe" accountCodeLength="12" pinCodeLength="4" accountValidDays="365" authValidDays="30"/>
+    <ProductStoreFinActSetting productStoreId="9000" finAccountTypeId="GIFTCERT_ACCOUNT" requirePinCode="N" validateGCFinAcct="Y"
+        purchaseSurveyId="1000" purchSurveySendTo="recipientEmail" purchSurveyCopyMe="copyMe" accountCodeLength="12" pinCodeLength="4" accountValidDays="365" authValidDays="30"/>
     
     <!-- service for purchasing gift certificate configured as a Content and to be associated with products -->
     <Content contentId="GC_PURCHASE" serviceName="ofbGcPurchase"/>
     
     <!-- associate gift certificate purchase fulfillment services with products.  virtual products ok.  MUST be async fulfillment -
-     synchronous fulfillment can cause database lock problems -->
-    <ProductContent productId="GC-001" contentId="GC_PURCHASE" productContentTypeId="FULFILLMENT_EXTASYNC" fromDate="2000-01-01 00:00:00"/>
-    
+        synchronous fulfillment can cause database lock problems -->
+    <ProductContent productId="GC-001" contentId="GC_PURCHASE" productContentTypeId="FULFILLMENT_EXTASYNC" fromDate="2000-01-01 00:00:00"/>    
+        
     <!-- payment settings for gift certificates.  the idea is that you re-configure this store's GIFT_CARD settings to use the gift certificate services,
-     rather than the gift card services. -->
+        rather than the gift card services. -->
     <ProductStorePaymentSetting productStoreId="9000" paymentMethodTypeId="GIFT_CARD" paymentServiceTypeEnumId="PRDS_PAY_AUTH" paymentService="ofbGcAuthorize"/>
     <ProductStorePaymentSetting productStoreId="9000" paymentMethodTypeId="GIFT_CARD" paymentServiceTypeEnumId="PRDS_PAY_RELEASE" paymentService="ofbGcRelease"/>
     <ProductStorePaymentSetting productStoreId="9000" paymentMethodTypeId="GIFT_CARD" paymentServiceTypeEnumId="PRDS_PAY_CAPTURE" paymentService="ofbGcProcessor"/>
     <ProductStorePaymentSetting productStoreId="9000" paymentMethodTypeId="GIFT_CARD" paymentServiceTypeEnumId="PRDS_PAY_REAUTH" paymentService="ofbGcAuthorize"/>
     <ProductStorePaymentSetting productStoreId="9000" paymentMethodTypeId="GIFT_CARD" paymentServiceTypeEnumId="PRDS_PAY_REFUND" paymentService="ofbGcRefund"/>
     
-    
+        
 </entity-engine-xml>

Modified: ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml (original)
+++ ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml Fri Jan 23 03:08:47 2009
@@ -791,7 +791,7 @@
             </call-object-method>
         </if-not-empty>
     </simple-method>
-
+    
     <simple-method method-name="processShipOptions" short-description="Process Ship Options; to be called as a Request Event" login-required="false">
        <call-bsh><![CDATA[
            shipmentMethod = parameters.get("shipping_method");
@@ -828,7 +828,7 @@
 
            <set field="correspondingPoId" from-field="parameters.correspondingPoId"/>
            <if-not-empty field="correspondingPoId">
-             <call-object-method obj-field="cart" method-name="setPoNumber">
+                  <call-object-method obj-field="cart" method-name="setPoNumber">
                    <field field="correspondingPoId" type="String"/>
                </call-object-method>
            </if-not-empty>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy Fri Jan 23 03:08:47 2009
@@ -29,9 +29,9 @@
 context.shoppingCart = shoppingCart;
 
 if (parameters.add_product_id) { // check if a parameter is passed
- add_product_id = parameters.add_product_id;
- product = delegator.findByPrimaryKeyCache("Product", [productId : add_product_id]);
- context.product = product;
+    add_product_id = parameters.add_product_id;
+    product = delegator.findByPrimaryKeyCache("Product", [productId : add_product_id]);
+    context.product = product;
 }
 
 // get all the possible gift wrap options

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditEmailAndTelecomNumber.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditEmailAndTelecomNumber.groovy?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditEmailAndTelecomNumber.groovy (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditEmailAndTelecomNumber.groovy Fri Jan 23 03:08:47 2009
@@ -29,16 +29,16 @@
         context.emailAddress = contactMech.infoString;
     }
     
- contactMech = EntityUtil.getFirst(ContactHelper.getContactMech(party, "PRIMARY_PHONE", "TELECOM_NUMBER", false));
- if (contactMech) {
-    partyContactMech = EntityUtil.getFirst(delegator.findByAnd("PartyContactMech", [partyId : party.partyId, contactMechId : contactMech.contactMechId]));
-    if (partyContactMech) {
-        telecomNumber = partyContactMech.getRelatedOne("TelecomNumber");
-        context.phoneContactMechId = telecomNumber.contactMechId;
-        context.countryCode = telecomNumber.countryCode;
-        context.areaCode = telecomNumber.areaCode;
-        context.contactNumber = telecomNumber.contactNumber;
-        context.extension = partyContactMech.extension;
-    }
- }
+    contactMech = EntityUtil.getFirst(ContactHelper.getContactMech(party, "PRIMARY_PHONE", "TELECOM_NUMBER", false));
+    if (contactMech) {
+        partyContactMech = EntityUtil.getFirst(delegator.findByAnd("PartyContactMech", [partyId : party.partyId, contactMechId : contactMech.contactMechId]));
+        if (partyContactMech) {
+            telecomNumber = partyContactMech.getRelatedOne("TelecomNumber");
+            context.phoneContactMechId = telecomNumber.contactMechId;
+            context.countryCode = telecomNumber.countryCode;
+            context.areaCode = telecomNumber.areaCode;
+            context.contactNumber = telecomNumber.contactNumber;
+            context.extension = partyContactMech.extension;
+        }
+    }
 }
\ No newline at end of file

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy Fri Jan 23 03:08:47 2009
@@ -49,7 +49,7 @@
         context.shipToContactMechId = null;
     }
     
- shipToContactMechList = ContactHelper.getContactMech(party, "PHONE_SHIPPING", "TELECOM_NUMBER", false)
+    shipToContactMechList = ContactHelper.getContactMech(party, "PHONE_SHIPPING", "TELECOM_NUMBER", false)
     if (shipToContactMechList) {
         shipToTelecomNumber = (EntityUtil.getFirst(shipToContactMechList)).getRelatedOne("TelecomNumber");
         pcm = EntityUtil.getFirst(shipToTelecomNumber.getRelated("PartyContactMech"));

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/PermPrep.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/PermPrep.groovy?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/PermPrep.groovy (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/PermPrep.groovy Fri Jan 23 03:08:47 2009
@@ -155,12 +155,12 @@
     //org.ofbiz.base.util.Debug.logInfo("entityOperation:" + entityOperation , null);
     if (security.hasEntityPermission(permission, entityOperation, session)) {
         //org.ofbiz.base.util.Debug.logInfo("hasEntityPermission is true:" , null);
-     context.hasPermission = true;
+        context.hasPermission = true;
         request.setAttribute("hasPermission", true);
         request.setAttribute("permissionStatus", "granted");
     } else {
         //org.ofbiz.base.util.Debug.logInfo("hasEntityPermission is false:" , null);
-     context.hasPermission = false;
+        context.hasPermission = false;
         request.setAttribute("hasPermission", false);
         request.setAttribute("permissionStatus", "");
     }

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipSettings.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipSettings.groovy?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipSettings.groovy (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipSettings.groovy Fri Jan 23 03:08:47 2009
@@ -41,7 +41,7 @@
 if (cart?.getShippingContactMechId()) {
     shippingContactMechId = cart.getShippingContactMechId();
     shippingPartyContactDetail = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findByAnd("PartyContactDetailByPurpose",
-   [partyId : partyId, contactMechId : shippingContactMechId])));
+        [partyId : partyId, contactMechId : shippingContactMechId])));
     parameters.shippingContactMechId = shippingPartyContactDetail.contactMechId;
     context.callSubmitForm = true;
     

Modified: ofbiz/trunk/applications/ecommerce/widget/CartScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/CartScreens.xml?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/CartScreens.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/CartScreens.xml Fri Jan 23 03:08:47 2009
@@ -89,7 +89,7 @@
                 
                 <set field="promoUseDetailsInlineScreen" value="component://ecommerce/widget/CartScreens.xml#promoUseDetailsInline"/>
 
- <set field="titleProperty" value="PageTitleShowAllPromotions"/>
+                <set field="titleProperty" value="PageTitleShowAllPromotions"/>
                 <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy"/>
                 <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowPromoText.groovy"/>
             </actions>

Modified: ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/CommonScreens.xml Fri Jan 23 03:08:47 2009
@@ -49,7 +49,7 @@
 
                 <set field="layoutSettings.extraHead" value="&lt;link rel=&quot;stylesheet&quot; href=&quot;/content/images/contentForum.css&quot; type=&quot;text/css&quot;/&gt;" global="true"/>
                 <script location="component://ecommerce/widget/EcommerceSetup.groovy"/>
-
+                
                 <!-- The default (main) stylesheets -->
                 <set field="layoutSettings.styleSheets[+0]" value="/ecommerce/images/blog.css" global="true"/>
                 <set field="layoutSettings.styleSheets[+0]" value="${productStore.styleSheet}" default-value="/images/ecommain.css" global="true"/>

Modified: ofbiz/trunk/applications/ecommerce/widget/ContentScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/ContentScreens.xml?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/ContentScreens.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/ContentScreens.xml Fri Jan 23 03:08:47 2009
@@ -25,8 +25,8 @@
     <screen name="minipoll">
         <section>
             <actions>
- <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
- <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
             </actions>
 
             <widgets>
@@ -70,7 +70,7 @@
                 <set field="leftbarScreenName" value="leftbar"/>
                 <set field="MainColumnStyle" value="leftonly"/>
 
- <set field="titleProperty" value="PageTitleContentPage"/>
+                <set field="titleProperty" value="PageTitleContentPage"/>
                 <set field="headerItem" value="main"/>
                 <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/Main.groovy"/>
                 <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/content/ContentPrep.groovy"/>
@@ -91,7 +91,7 @@
                 <set field="rightbarScreenName" value="rightbar"/>
                 <set field="MainColumnStyle" value="center"/>
 
- <set field="titleProperty" value="PageTitleViewBlog"/>
+                <set field="titleProperty" value="PageTitleViewBlog"/>
                 <set field="headerItem" value="Blog"/>
                 <set field="formDefFile" value="/BlogForms.xml"/>
                 <set field="entityName" value="Content"/>

Modified: ofbiz/trunk/applications/ecommerce/widget/ForumScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/ForumScreens.xml?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/ForumScreens.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/ForumScreens.xml Fri Jan 23 03:08:47 2009
@@ -82,14 +82,14 @@
                         <section>
                             <widgets>
                                 <label style="head1" text="${uiLabelMap.EcommerceMessageListForForum} ${forum.description}"/>
-                        <section>
-                            <condition>
-                                <if-has-permission permission="CONTENTMGR" action="CREATE"/>
-                            </condition>
-                            <widgets>
-                                <link style="buttontext" target="AddForumThread?forumId=${parameters.forumId}&amp;forumMessageIdTo=&amp;threadView=${parameters.threadView?if_exists}&amp;VIEW_INDEX=${parameters.VIEW_INDEX}" text="${uiLabelMap.PageTitleNewMessage}"/>
-                            </widgets>
-                        </section>
+                                <section>
+                                    <condition>
+                                        <if-has-permission permission="CONTENTMGR" action="CREATE"/>
+                                    </condition>
+                                    <widgets>
+                                        <link style="buttontext" target="AddForumThread?forumId=${parameters.forumId}&amp;forumMessageIdTo=&amp;threadView=${parameters.threadView?if_exists}&amp;VIEW_INDEX=${parameters.VIEW_INDEX}" text="${uiLabelMap.PageTitleNewMessage}"/>
+                                    </widgets>
+                                </section>
                                 <platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/forum/forumPaging.ftl"/></html></platform-specific>
                                 <platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/forum/showforum.ftl"/></html></platform-specific>
                                 <platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/forum/forumPaging.ftl"/></html></platform-specific>
@@ -133,11 +133,11 @@
                                 <if-has-permission permission="CONTENTMGR" action="CREATE"/>
                             </condition>
                             <widgets>
-                        <label style="blogheader">Add response:</label>
-                        <include-form name="AddForumMessage" location="component://ecommerce/widget/ForumForms.xml"/>
+                                <label style="blogheader">Add response:</label>
+                                <include-form name="AddForumMessage" location="component://ecommerce/widget/ForumForms.xml"/>
                             </widgets>
                             <fail-widgets>
-                        <label style="blogheader">You must be logged in to add a response.</label>
+                                <label style="blogheader">You must be logged in to add a response.</label>
                             </fail-widgets>
                         </section>
                         <container>

Modified: ofbiz/trunk/applications/ecommerce/widget/ForumTrees.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/ForumTrees.xml?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/ForumTrees.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/ForumTrees.xml Fri Jan 23 03:08:47 2009
@@ -34,10 +34,10 @@
                         <condition-expr field-name="contentIdStart" operator="equals" env-name="rsp.contentId" />
                         <condition-expr field-name="caContentAssocTypeId" operator="equals" value="RESPONSE" />
                         <condition-expr field-name="caFromDate" operator="less-equals" env-name="nowTimestamp" />
-                    <condition-list combine="or">
-                        <condition-expr field-name="caThruDate" operator="equals" />
-                        <condition-expr field-name="caThruDate" operator="greater" env-name="nowTimestamp" />
-                    </condition-list>
+                        <condition-list combine="or">
+                            <condition-expr field-name="caThruDate" operator="equals" />
+                            <condition-expr field-name="caThruDate" operator="greater" env-name="nowTimestamp" />
+                        </condition-list>
                     </condition-list>
                     <order-by field-name="caFromDate DESC"/>
                 </entity-condition>
@@ -51,10 +51,10 @@
                         <condition-expr field-name="contentIdStart" operator="equals" env-name="rsp.contentId" />
                         <condition-expr field-name="caContentAssocTypeId" operator="equals" value="RESPONSE" />
                         <condition-expr field-name="caFromDate" operator="less-equals" env-name="nowTimestamp" />
-                    <condition-list combine="or">
-                        <condition-expr field-name="caThruDate" operator="equals" />
-                        <condition-expr field-name="caThruDate" operator="greater" env-name="nowTimestamp" />
-                    </condition-list>
+                        <condition-list combine="or">
+                            <condition-expr field-name="caThruDate" operator="equals" />
+                            <condition-expr field-name="caThruDate" operator="greater" env-name="nowTimestamp" />
+                        </condition-list>
                     </condition-list>
                     <order-by field-name="caFromDate DESC"/>
                 </entity-condition>

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java Fri Jan 23 03:08:47 2009
@@ -482,7 +482,7 @@
                     eventQuantityTmp = eventQuantityTmp.negate();
                     parameters = UtilMisc.toMap("mrpId", mrpId, "productId", productId, "eventDate", customTimePeriod.getDate("fromDate"), "mrpEventTypeId", "SALES_FORECAST");
                     try {
-                     InventoryEventPlannedServices.createOrUpdateMrpEvent(parameters, eventQuantityTmp, null, genericResult.getString("salesForecastDetailId"), false, delegator);
+                        InventoryEventPlannedServices.createOrUpdateMrpEvent(parameters, eventQuantityTmp, null, genericResult.getString("salesForecastDetailId"), false, delegator);
                     } catch (GenericEntityException e) {
                         return ServiceUtil.returnError("Problem initializing the MrpEvent entity (SalesForecastDetail)");
                     }

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/FindProductBom.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/FindProductBom.groovy?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/FindProductBom.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/FindProductBom.groovy Fri Jan 23 03:08:47 2009
@@ -25,32 +25,32 @@
 import javolution.util.FastMap;
 
 if (!parameters.productId && !parameters.productIdTo && !parameters.productAssocTypeId) {
- cond = EntityCondition.makeCondition([EntityCondition.makeCondition("productAssocTypeId", EntityOperator.EQUALS, "ENGINEER_COMPONENT"),
-                                      EntityCondition.makeCondition("productAssocTypeId", EntityOperator.EQUALS, "MANUF_COMPONENT")
-                                      ], EntityOperator.OR);
+    cond = EntityCondition.makeCondition([EntityCondition.makeCondition("productAssocTypeId", EntityOperator.EQUALS, "ENGINEER_COMPONENT"),
+                                          EntityCondition.makeCondition("productAssocTypeId", EntityOperator.EQUALS, "MANUF_COMPONENT")
+                                          ], EntityOperator.OR);
     findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
     fieldToSelect = UtilMisc.toSet("productId","internalName","productAssocTypeId");
     bomListIterator = delegator.find("ProductAndAssoc", cond, null, fieldToSelect, null, findOpts);
 } else {
- condList = [];
- if (parameters.productId) {
- cond = EntityCondition.makeCondition("productId", EntityOperator.EQUALS, parameters.productId);
- condList.add(cond);
- }
- if (parameters.productIdTo) {
- cond = EntityCondition.makeCondition("productIdTo", EntityOperator.EQUALS, parameters.productIdTo);
- condList.add(cond);    
- }
- if (parameters.productAssocTypeId) {
- cond = EntityCondition.makeCondition("productAssocTypeId", EntityOperator.EQUALS, parameters.productAssocTypeId);
- condList.add(cond);
- }else {
-    cond = EntityCondition.makeCondition([EntityCondition.makeCondition("productAssocTypeId", EntityOperator.EQUALS, "ENGINEER_COMPONENT"),
-                                          EntityCondition.makeCondition("productAssocTypeId", EntityOperator.EQUALS, "MANUF_COMPONENT")
-                                          ], EntityOperator.OR);
-    condList.add(cond);
- }
- cond =  EntityCondition.makeCondition(condList, EntityOperator.AND);
+    condList = [];
+    if (parameters.productId) {
+        cond = EntityCondition.makeCondition("productId", EntityOperator.EQUALS, parameters.productId);
+        condList.add(cond);
+    }
+    if (parameters.productIdTo) {
+        cond = EntityCondition.makeCondition("productIdTo", EntityOperator.EQUALS, parameters.productIdTo);
+        condList.add(cond);    
+    }
+    if (parameters.productAssocTypeId) {
+        cond = EntityCondition.makeCondition("productAssocTypeId", EntityOperator.EQUALS, parameters.productAssocTypeId);
+        condList.add(cond);
+    }else {
+        cond = EntityCondition.makeCondition([EntityCondition.makeCondition("productAssocTypeId", EntityOperator.EQUALS, "ENGINEER_COMPONENT"),
+                                              EntityCondition.makeCondition("productAssocTypeId", EntityOperator.EQUALS, "MANUF_COMPONENT")
+                                              ], EntityOperator.OR);
+        condList.add(cond);
+    }
+    cond =  EntityCondition.makeCondition(condList, EntityOperator.AND);
     findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
     fieldToSelect = UtilMisc.toSet("productId","internalName","productAssocTypeId");
     bomListIterator = delegator.find("ProductAndAssoc", cond, null, fieldToSelect, null, findOpts);

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/productionRunAllFixedAssets.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/productionRunAllFixedAssets.groovy?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/productionRunAllFixedAssets.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/productionRunAllFixedAssets.groovy Fri Jan 23 03:08:47 2009
@@ -31,6 +31,6 @@
             taskFixedAssets = prodRunTask.getRelated("WorkEffortFixedAssetAssign");
             productionRunFixedAssetsData.addAll(taskFixedAssets);
         }
-    context.productionRunFixedAssetsData = productionRunFixedAssetsData;
+        context.productionRunFixedAssetsData = productionRunFixedAssetsData;
     }
 }

Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml?rev=737003&r1=737002&r2=737003&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml Fri Jan 23 03:08:47 2009
@@ -64,7 +64,7 @@
                 </entity-options>
             </drop-down>
         </field>
-        <field name="phoneTitle" title="${uiLabelMap.PartyPrimaryPhone}" title-area-style="group-label"><display/></field>
+        <field name="phoneTitle" title="${uiLabelMap.PartyPrimaryPhone}" title-area-style="group-label"><display/></field>        
         <field name="countryCode" title="${uiLabelMap.PartyCountryCode}"><text size="4" maxlength="10"/></field>
         <field name="areaCode" title="${uiLabelMap.PartyAreaCode}"><text size="4" maxlength="10"/></field>
         <field name="contactNumber" title="${uiLabelMap.PartyPhoneNumber}"><text size="15" maxlength="15"/></field>