svn commit: r1754644 - in /ofbiz/trunk: ./ applications/content/config/ applications/content/servicedef/ applications/content/src/main/java/org/apache/ofbiz/content/compdoc/ applications/content/src/main/java/org/apache/ofbiz/content/openoffice/

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

svn commit: r1754644 - in /ofbiz/trunk: ./ applications/content/config/ applications/content/servicedef/ applications/content/src/main/java/org/apache/ofbiz/content/compdoc/ applications/content/src/main/java/org/apache/ofbiz/content/openoffice/

Mridul Pathak-5
Author: mridulpathak
Date: Sun Jul 31 09:42:41 2016
New Revision: 1754644

URL: http://svn.apache.org/viewvc?rev=1754644&view=rev
Log:
[OFBIZ-7529] Part 4 (final) of "Delete stale java files from applications and framework". Deleted following file/directories and their references. Had to do some adjustments in ComDocServices.java as Open Office specific "convertDocumentByteBuffer" service was being referenced there.

applications/content/src/main/java/org/apache/ofbiz/content/openoffice
applications/content/src/main/java/org/apache/ofbiz/content/openoffice/OpenOfficeByteArrayInputStream.java
applications/content/src/main/java/org/apache/ofbiz/content/openoffice/OpenOfficeByteArrayOutputStream.java
applications/content/src/main/java/org/apache/ofbiz/content/openoffice/OpenOfficeServices.java
applications/content/src/main/java/org/apache/ofbiz/content/openoffice/OpenOfficeWorker.java

Removed:
    ofbiz/trunk/applications/content/config/openoffice-uno.properties
    ofbiz/trunk/applications/content/src/main/java/org/apache/ofbiz/content/openoffice/
Modified:
    ofbiz/trunk/OPTIONAL_LIBRARIES
    ofbiz/trunk/applications/content/config/ContentUiLabels.xml
    ofbiz/trunk/applications/content/servicedef/services.xml
    ofbiz/trunk/applications/content/src/main/java/org/apache/ofbiz/content/compdoc/CompDocServices.java
    ofbiz/trunk/build.gradle

Modified: ofbiz/trunk/OPTIONAL_LIBRARIES
URL: http://svn.apache.org/viewvc/ofbiz/trunk/OPTIONAL_LIBRARIES?rev=1754644&r1=1754643&r2=1754644&view=diff
==============================================================================
--- ofbiz/trunk/OPTIONAL_LIBRARIES (original)
+++ ofbiz/trunk/OPTIONAL_LIBRARIES Sun Jul 31 09:42:41 2016
@@ -22,26 +22,6 @@ on the old Undersun SVN server in the sp
     and rename the ZIP file that comes with it as jimi-xxx.jar, then copy it into the same directory as fop.jar, which at this time
     is ${ofbiz.home}/framework/webapp/lib/
 
--=- Office (Word, etc) File Handling __________________________________________________________________________________________________________________________
-
--OpenOffice UNO (LGPL)
-  http://udk.openoffice.org/
-  applications/content/lib/uno:
-    XFlatXml.jar
-    XMergeBridge.jar
-    XSLTFilter.jar
-    XSLTValidate.jar
-    htmlsoff.jar
-    java_uno.jar
-    java_uno_accessbridge.jar
-    juh.jar
-    jurt.jar
-    jut.jar
-    officebean.jar
-    ridl.jar
-    unoil.jar
-  TO BUILD comment out exclude: applications/content/build.xml:org/apache/ofbiz/content/openoffice/*
-
 -=- Accounting: Payment Processing ____________________________________________________________________________________________________________________________
 
 -CyberSource

Modified: ofbiz/trunk/applications/content/config/ContentUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/config/ContentUiLabels.xml?rev=1754644&r1=1754643&r2=1754644&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/config/ContentUiLabels.xml (original)
+++ ofbiz/trunk/applications/content/config/ContentUiLabels.xml Sun Jul 31 09:42:41 2016
@@ -1094,26 +1094,6 @@
         <value xml:lang="zh">关联到这个数据资源的内容记录</value>
         <value xml:lang="zh-TW">結合到這個資料資源的內容記錄</value>
     </property>
-    <property key="ContentConvertingDocumentByteBuffer">
-        <value xml:lang="en">Error converting document byte buffer: </value>
-        <value xml:lang="fr">Erreur dans la conversion de document sur les tampons de donnée : </value>
-        <value xml:lang="it">Errore durante la conversione del documento in byte buffer: </value>
-        <value xml:lang="ja">ドキュメントバイトバッファ変換中にエラー: </value>
-        <value xml:lang="pt">Erro ao converter buffer de bytes do documento: </value>
-        <value xml:lang="vi">Lỗi khi chuyển đổi dữ liệu tài liệu:</value>
-        <value xml:lang="zh">转换文档字节缓存时出错:</value>
-        <value xml:lang="zh-TW">轉換檔時字元組緩衝區出錯:</value>
-    </property>
-    <property key="ContentConvertingDocumentError">
-        <value xml:lang="en">Error converting document: ${errorString}</value>
-        <value xml:lang="fr">Erreur dans la conversion du document : ${errorString}</value>
-        <value xml:lang="it">Errore durante la conversione del documento: ${errorString}</value>
-        <value xml:lang="ja">ドキュメント変換中にエラー: ${errorString}</value>
-        <value xml:lang="pt">Erro ao converter o documento: ${errorString}</value>
-        <value xml:lang="vi">Lỗi khi chuyển đổi tài liệu: ${errorString}</value>
-        <value xml:lang="zh">转换文档时出错:${errorString}</value>
-        <value xml:lang="zh-TW">轉換檔時出錯:${errorString}</value>
-    </property>
     <property key="ContentCreateContentAssocMethodError">
         <value xml:lang="en">Not 2 out of ContentId/To/From</value>
         <value xml:lang="fr">Not 2 out of ContentId/To/From</value>
@@ -2130,6 +2110,9 @@
         <value xml:lang="zh">Mime类型模板</value>
         <value xml:lang="zh-TW">Mime類型模板</value>
     </property>
+    <property key="ContentMimeTypeNotSupported">
+        <value xml:lang="en">Mime Type not supported</value>
+    </property>
     <property key="ContentNavigate">
         <value xml:lang="da">Naviger</value>
         <value xml:lang="de">Navigieren</value>

Modified: ofbiz/trunk/applications/content/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services.xml?rev=1754644&r1=1754643&r2=1754644&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services.xml Sun Jul 31 09:42:41 2016
@@ -786,46 +786,6 @@
         <attribute name="mostRecentRevisionSeqId" type="String" mode="OUT" optional="true"/>
     </service>
 
-    <!-- Open Office Services -->
-    <service name="convertDocumentByteBuffer" auth="false" engine="java" transaction-timeout="7200"
-        location="org.apache.ofbiz.content.openoffice.OpenOfficeServices" invoke="convertDocumentByteBuffer">
-        <description>Use OpenOffice to convert between document types</description>
-        <attribute name="oooHost" type="String" mode="IN" optional="true"/>
-        <attribute name="oooPort" type="String" mode="IN" optional="true"/>
-        <attribute name="inputMimeType" type="String" mode="IN" optional="true"/>
-        <attribute name="outputMimeType" type="String" mode="IN" optional="true"/>
-        <attribute name="inByteBuffer" type="java.nio.ByteBuffer" mode="IN" optional="false"/>
-        <attribute name="outByteBuffer" type="java.nio.ByteBuffer" mode="OUT" optional="false"/>
-    </service>
-    <service name="convertDocument" auth="false" engine="java" transaction-timeout="7200"
-            location="org.apache.ofbiz.content.openoffice.OpenOfficeServices" invoke="convertDocument">
-        <description>Use OpenOffice to convert between document types</description>
-        <attribute name="oooHost" type="String" mode="IN" optional="true"/>
-        <attribute name="oooPort" type="String" mode="IN" optional="true"/>
-        <attribute name="filenameFrom" type="String" mode="IN" optional="false"/>
-        <attribute name="filenameTo" type="String" mode="IN" optional="false"/>
-        <attribute name="convertFilterName" type="String" mode="IN" optional="true"/>
-    </service>
-    <service name="convertDocumentFileToFile" auth="false" engine="java" transaction-timeout="7200"
-            location="org.apache.ofbiz.content.openoffice.OpenOfficeServices" invoke="convertDocumentFileToFile">
-        <description>Use OpenOffice to convert between document types</description>
-        <attribute name="oooHost" type="String" mode="IN" optional="true"/>
-        <attribute name="oooPort" type="String" mode="IN" optional="true"/>
-        <attribute name="filenameFrom" type="String" mode="IN" optional="false"/>
-        <attribute name="filenameTo" type="String" mode="IN" optional="false"/>
-        <attribute name="inputMimeType" type="String" mode="IN" optional="true"/>
-        <attribute name="outputMimeType" type="String" mode="IN" optional="true"/>
-    </service>
-    <service name="compareDocuments" auth="false" engine="java" transaction-timeout="7200"
-            location="org.apache.ofbiz.content.openoffice.OpenOfficeServices" invoke="compareDocuments">
-        <description>Use OpenOffice to compare two documents</description>
-        <attribute name="oooHost" type="String" mode="IN" optional="true"/>
-        <attribute name="oooPort" type="String" mode="IN" optional="true"/>
-        <attribute name="filenameFrom" type="String" mode="IN" optional="false"/>
-        <attribute name="filenameOriginal" type="String" mode="IN" optional="false"/>
-        <attribute name="filenameOut" type="String" mode="IN" optional="false"/>
-    </service>
-
     <!-- CompDoc Rendering Services  -->
     <service name="renderCompDocPdf" engine="java"
         location="org.apache.ofbiz.content.compdoc.CompDocServices"

Modified: ofbiz/trunk/applications/content/src/main/java/org/apache/ofbiz/content/compdoc/CompDocServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/main/java/org/apache/ofbiz/content/compdoc/CompDocServices.java?rev=1754644&r1=1754643&r2=1754644&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/main/java/org/apache/ofbiz/content/compdoc/CompDocServices.java (original)
+++ ofbiz/trunk/applications/content/src/main/java/org/apache/ofbiz/content/compdoc/CompDocServices.java Sun Jul 31 09:42:41 2016
@@ -135,8 +135,6 @@ public class CompDocServices {
 
         String contentId = (String) context.get("contentId");
         String contentRevisionSeqId = (String) context.get("contentRevisionSeqId");
-        String oooHost = (String) context.get("oooHost");
-        String oooPort = (String) context.get("oooPort");
         GenericValue userLogin = (GenericValue) context.get("userLogin");
 
         try {
@@ -223,21 +221,7 @@ public class CompDocServices {
                         }
                     }
                 } else {
-                    ByteBuffer inByteBuffer = DataResourceWorker.getContentAsByteBuffer(delegator, thisDataResourceId, https, webSiteId, locale, rootDir);
-
-                    Map<String, Object> convertInMap = UtilMisc.<String, Object>toMap("userLogin", userLogin, "inByteBuffer", inByteBuffer, "inputMimeType", inputMimeType, "outputMimeType", "application/pdf");
-                    if (UtilValidate.isNotEmpty(oooHost)) convertInMap.put("oooHost", oooHost);
-                    if (UtilValidate.isNotEmpty(oooPort)) convertInMap.put("oooPort", oooPort);
-
-                    Map<String, Object> convertResult = dispatcher.runSync("convertDocumentByteBuffer", convertInMap);
-
-                    if (ServiceUtil.isError(convertResult)) {
-                        return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentConvertingDocumentByteBuffer", locale), null, null, convertResult);
-                    }
-
-                    ByteBuffer outByteBuffer = (ByteBuffer) convertResult.get("outByteBuffer");
-                    inputByteArray = outByteBuffer.array();
-                    reader = new PdfReader(inputByteArray);
+                    return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentMimeTypeNotSupported", locale));
                 }
                 if (reader != null) {
                     int n = reader.getNumberOfPages();
@@ -363,21 +347,7 @@ public class CompDocServices {
                     }
                 }
             } else {
-                ByteBuffer inByteBuffer = DataResourceWorker.getContentAsByteBuffer(delegator, dataResourceId, https, webSiteId, locale, rootDir);
-
-                Map<String, Object> convertInMap = UtilMisc.<String, Object>toMap("userLogin", userLogin, "inByteBuffer", inByteBuffer,
-                        "inputMimeType", inputMimeType, "outputMimeType", "application/pdf");
-                if (UtilValidate.isNotEmpty(oooHost)) convertInMap.put("oooHost", oooHost);
-                if (UtilValidate.isNotEmpty(oooPort)) convertInMap.put("oooPort", oooPort);
-
-                Map<String, Object> convertResult = dispatcher.runSync("convertDocumentByteBuffer", convertInMap);
-
-                if (ServiceUtil.isError(convertResult)) {
-                    return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentConvertingDocumentByteBuffer", locale), null, null, convertResult);
-                }
-
-                ByteBuffer outByteBuffer = (ByteBuffer) convertResult.get("outByteBuffer");
-                inputByteArray = outByteBuffer.array();
+                return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentMimeTypeNotSupported", locale));
             }
 
             ByteBuffer outByteBuffer = ByteBuffer.wrap(inputByteArray);

Modified: ofbiz/trunk/build.gradle
URL: http://svn.apache.org/viewvc/ofbiz/trunk/build.gradle?rev=1754644&r1=1754643&r2=1754644&view=diff
==============================================================================
--- ofbiz/trunk/build.gradle (original)
+++ ofbiz/trunk/build.gradle Sun Jul 31 09:42:41 2016
@@ -213,10 +213,6 @@ excludedJavaSources.add 'org/apache/ofbi
 excludedJavaSources.add 'org/apache/ofbiz/accounting/thirdparty/securepay/SecurePayPaymentServices.java'
 excludedJavaSources.add 'org/apache/ofbiz/accounting/thirdparty/securepay/SecurePayServiceTest.java'
 excludedJavaSources.add 'org/apache/ofbiz/accounting/thirdparty/verisign/PayflowPro.java'
-excludedJavaSources.add 'org/apache/ofbiz/content/openoffice/OpenOfficeByteArrayInputStream.java'
-excludedJavaSources.add 'org/apache/ofbiz/content/openoffice/OpenOfficeByteArrayOutputStream.java'
-excludedJavaSources.add 'org/apache/ofbiz/content/openoffice/OpenOfficeServices.java'
-excludedJavaSources.add 'org/apache/ofbiz/content/openoffice/OpenOfficeWorker.java'
 excludedJavaSources.add 'org/apache/ofbiz/order/thirdparty/taxware/TaxwareException.java'
 excludedJavaSources.add 'org/apache/ofbiz/order/thirdparty/taxware/TaxwareServices.java'
 excludedJavaSources.add 'org/apache/ofbiz/order/thirdparty/taxware/TaxwareUTL.java'