/[Apache-SVN]
ViewVC logotype

Revision 1831867


Jump to revision: Previous Next
Author: pgil
Date: Fri May 18 15:53:35 2018 UTC (5 years, 10 months ago)
Changed paths: 24
Log Message:
Implemented : File transfer management with communicationEvent and new contactMech FTP_ADDRESS
(OFBIZ-10245)

This commit introduce a new way to manage file transfer in OFBiz.
Inspired by mailing communication event management, a new communicationEventTypeId is created ('FILE_TRANSFER_COMM').

Such commEvent with classics : partyIdFrom/partyIdTo/contactMechIdTo/entryDate etc. are analysed by a job (like sendEmailDated), to send associated contents to a configured FTP/SFTP/FTPS server. If failure happens, it is catched and stored in communicationEvent, waiting for a new try.

For this purpose :

A new contactMechTypeId is introduced (FtpAddress), with its corresponding table. This contactMech store needed information for basic user/password authentication (server url and protocol, port, username, password, etc.)
A new service sendFileTransferDated that will look for pending file transfer and call following service.
A new service sendCommEventAsFtp that take a selected commEvent, check its structure and manage its status after trying the associated content file transfers.
A new service sendContentToFtp, that take a content and transfer it to a given FtpAddress.
A seca createCommEventFromFtpTransfer on sendContentToFtp to manage plural content file transfer, creating children communicationEvent to follow each content transfer separately (only for several content transfers).
A new Interface FtpClientInterface, with the 3 implementations of FTP, FTPS (To Implement), SFTP clients to manage Ftp connection and transfer.
A new property file to enable and manage redirection for testing purpose.

With this implementation, creating a communicationEvent, with a FtpAddress contactMechIdTo, and sendFileTransferDated job planned, the file is transfered to the ftp : communication event status set to COM_COMPLETE, if error occured the communication event status is set to COM_BOUNCED with error message on communicationEvent note.

Thanks Rishi for your feedbacks

Changed paths

Path Details
Directoryofbiz/ofbiz-framework/trunk/applications/content/config/ContentErrorUiLabels.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/content/ofbiz-component.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_ftp.xml added
Directoryofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ftp/ added
Directoryofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ftp/FtpClientInterface.java added
Directoryofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ftp/FtpServices.java added
Directoryofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ftp/SecureFtpClient.java added
Directoryofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ftp/SimpleFtpClient.java added
Directoryofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ftp/SshFtpClient.java added
Directoryofbiz/ofbiz-framework/trunk/applications/datamodel/data/seed/PartySeedData.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/party-entitymodel.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/party/config/PartyEntityLabels.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/party/config/PartyErrorUiLabels.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/party/config/PartyUiLabels.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/party/groovyScripts/party/ContactMechServices.groovy added
Directoryofbiz/ofbiz-framework/trunk/applications/party/servicedef/secas.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/party/servicedef/services.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactMechWorker.java modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/party/template/party/EditContactMech.ftl modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/party/template/party/profileblocks/Contact.ftl modified , text changed
Directoryofbiz/ofbiz-framework/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml modified , text changed
Directoryofbiz/ofbiz-framework/trunk/build.gradle modified , text changed
Directoryofbiz/ofbiz-framework/trunk/framework/common/config/ftp.properties added

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26