Author: pgil
Date: Sun Jul 15 20:49:28 2018
New Revision: 1835994
URL: http://svn.apache.org/viewvc?rev=1835994&view=rev
Log:
Improved : File transfer management with communicationEvent and new contactMech
FTP_ADDRESS
(OFBIZ-10245)
Rename SQL reserved words, thanks Deepak for reporting the issue and providing
a patch
Modified:
ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ftp/FtpServices.java
ofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/party-entitymodel.xml
ofbiz/ofbiz-framework/trunk/applications/party/template/party/EditContactMech.ftl
ofbiz/ofbiz-framework/trunk/applications/party/template/party/profileblocks/Contact.ftl
ofbiz/ofbiz-framework/trunk/framework/common/config/ftp.properties
Modified:
ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ftp/FtpServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ftp/FtpServices.java?rev=1835994&r1=1835993&r2=1835994&view=diff
==============================================================================
---
ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ftp/FtpServices.java
(original)
+++
ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ftp/FtpServices.java
Sun Jul 15 20:49:28 2018
@@ -103,10 +103,10 @@ public class FtpServices {
ftpAddress = delegator.makeValue("FtpAddress");
ftpAddress.put("defaultTimeout",
UtilProperties.getPropertyAsLong("ftp",
"ftp.notifications.redirectTo.defaultTimeout", 30000));
ftpAddress.put("hostname",
UtilProperties.getPropertyValue("ftp",
"ftp.notifications.redirectTo.hostname"));
- ftpAddress.put("path", UtilProperties.getPropertyValue("ftp",
"ftp.notifications.redirectTo.path"));
+ ftpAddress.put("filePath",
UtilProperties.getPropertyValue("ftp",
"ftp.notifications.redirectTo.filePath"));
ftpAddress.put("port", UtilProperties.getPropertyAsLong("ftp",
"ftp.notifications.redirectTo.port", 65535));
ftpAddress.put("username",
UtilProperties.getPropertyValue("ftp",
"ftp.notifications.redirectTo.username"));
- ftpAddress.put("password",
UtilProperties.getPropertyValue("ftp",
"ftp.notifications.redirectTo.password"));
+ ftpAddress.put("ftpPassword",
UtilProperties.getPropertyValue("ftp",
"ftp.notifications.redirectTo.ftpPassword"));
ftpAddress.put("binaryTransfer",
UtilProperties.getPropertyValue("ftp",
"ftp.notifications.redirectTo.binaryTransfer"));
ftpAddress.put("passiveMode",
UtilProperties.getPropertyValue("ftp",
"ftp.notifications.redirectTo.passiveMode"));
ftpAddress.put("zipFile",
UtilProperties.getPropertyValue("ftp", "ftp.notifications.redirectTo.zipFile"));
@@ -130,7 +130,7 @@ public class FtpServices {
Long defaultTimeout = ftpAddress.getLong("defaultTimeout");
Long port = ftpAddress.getLong("port");
String username = ftpAddress.getString("username");
- String password = ftpAddress.getString("password");
+ String password = ftpAddress.getString("ftpPassword");
if (Debug.infoOn())
Debug.logInfo("connecting to: " + username + "@" +
ftpAddress.getString("hostname") + ":" + port, module);
@@ -147,7 +147,7 @@ public class FtpServices {
return ServiceUtil.returnError("DataResource " +
content.getString("dataResourceId") + " return an empty stream");
}
- String path = ftpAddress.getString("path");
+ String path = ftpAddress.getString("filePath");
if (Debug.infoOn())
Debug.logInfo("storing local file remotely as: " +
(UtilValidate.isNotEmpty(path) ? path + "/" : "") +
content.getString("contentName"), module);
Modified:
ofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/party-entitymodel.xml
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/party-entitymodel.xml?rev=1835994&r1=1835993&r2=1835994&view=diff
==============================================================================
---
ofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/party-entitymodel.xml
(original)
+++
ofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/party-entitymodel.xml
Sun Jul 15 20:49:28 2018
@@ -1311,9 +1311,9 @@ under the License.
<field name="hostname" type="long-varchar"/>
<field name="port" type="numeric"/>
<field name="username" type="long-varchar"/>
- <field name="password" type="long-varchar" encrypt="true"/>
+ <field name="ftpPassword" type="long-varchar" encrypt="true"/>
<field name="binaryTransfer" type="indicator"/>
- <field name="path" type="long-varchar"/>
+ <field name="filePath" type="long-varchar"/>
<field name="zipFile" type="indicator"/>
<field name="passiveMode" type="indicator"/>
<field name="defaultTimeout" type="numeric"/>
Modified:
ofbiz/ofbiz-framework/trunk/applications/party/template/party/EditContactMech.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/template/party/EditContactMech.ftl?rev=1835994&r1=1835993&r2=1835994&view=diff
==============================================================================
---
ofbiz/ofbiz-framework/trunk/applications/party/template/party/EditContactMech.ftl
(original)
+++
ofbiz/ofbiz-framework/trunk/applications/party/template/party/EditContactMech.ftl
Sun Jul 15 20:49:28 2018
@@ -229,7 +229,7 @@ under the License.
<tr>
<td class="label">${uiLabelMap.CommonPassword}</td>
<td>
- <input type="text" size="60" maxlength="255" name="password"
value="${(mechMap.ftpAddress.password)!request.getParameter('password')!''}" />
+ <input type="text" size="60" maxlength="255" name="ftpPassword"
value="${(mechMap.ftpAddress.ftpPassword)!request.getParameter('ftpPassword')!''}"
/>
</td>
</tr>
<tr>
@@ -247,7 +247,7 @@ under the License.
<tr>
<td class="label">${uiLabelMap.FormFieldTitle_path}</td>
<td>
- <input type="text" size="60" maxlength="255" name="path"
value="${(mechMap.ftpAddress.path)!request.getParameter('path')!''}" />
+ <input type="text" size="60" maxlength="255" name="filePath"
value="${(mechMap.ftpAddress.filePath)!request.getParameter('filePath')!''}" />
</td>
</tr>
<tr>
Modified:
ofbiz/ofbiz-framework/trunk/applications/party/template/party/profileblocks/Contact.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/template/party/profileblocks/Contact.ftl?rev=1835994&r1=1835993&r2=1835994&view=diff
==============================================================================
---
ofbiz/ofbiz-framework/trunk/applications/party/template/party/profileblocks/Contact.ftl
(original)
+++
ofbiz/ofbiz-framework/trunk/applications/party/template/party/profileblocks/Contact.ftl
Sun Jul 15 20:49:28 2018
@@ -99,9 +99,9 @@ under the License.
<#if contactMechMap.ftpAddress?has_content>
<#assign ftpAddress = contactMechMap.ftpAddress>
<div>
- <b><#if
ftpAddress.hostname?has_content>${ftpAddress.hostname!}</#if><#if
ftpAddress.port?has_content>:${ftpAddress.port!}</#if><#if
ftpAddress.path?has_content>:${ftpAddress.path!}</#if></b>
+ <b><#if
ftpAddress.hostname?has_content>${ftpAddress.hostname!}</#if><#if
ftpAddress.port?has_content>:${ftpAddress.port!}</#if><#if
ftpAddress.filePath?has_content>:${ftpAddress.filePath!}</#if></b>
<br/>${uiLabelMap.CommonUsername} :
${ftpAddress.username!}
- <br/>${uiLabelMap.CommonPassword} :
${ftpAddress.password!}
+ <br/>${uiLabelMap.CommonPassword} :
${ftpAddress.ftpPassword!}
<br/>${uiLabelMap.FormFieldTitle_binaryTransfer} :
${ftpAddress.binaryTransfer!}
<br/>${uiLabelMap.FormFieldTitle_zipFile} :
${ftpAddress.zipFile!}
<br/>${uiLabelMap.FormFieldTitle_passiveMode} :
${ftpAddress.passiveMode!}
Modified: ofbiz/ofbiz-framework/trunk/framework/common/config/ftp.properties
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/config/ftp.properties?rev=1835994&r1=1835993&r2=1835994&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/common/config/ftp.properties
(original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/config/ftp.properties Sun Jul
15 20:49:28 2018
@@ -25,9 +25,9 @@ ftp.notifications.redirectTo.enabled=Y
ftp.notifications.redirectTo.hostname=localhost
ftp.notifications.redirectTo.port=65535
ftp.notifications.redirectTo.username=admin
-ftp.notifications.redirectTo.password=ofbiz
+ftp.notifications.redirectTo.ftpPassword=ofbiz
ftp.notifications.redirectTo.binaryTransfer=Y
-ftp.notifications.redirectTo.path=
+ftp.notifications.redirectTo.filePath=
ftp.notifications.redirectTo.passiveMode=Y
ftp.notifications.redirectTo.defaultTimeout=