(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
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1831867 13f79535-47bb-0310-9956-ffa450edef68
63 lines
3.2 KiB
XML
63 lines
3.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
Licensed to the Apache Software Foundation (ASF) under one
|
|
or more contributor license agreements. See the NOTICE file
|
|
distributed with this work for additional information
|
|
regarding copyright ownership. The ASF licenses this file
|
|
to you under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance
|
|
with the License. You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, either express or implied. See the License for the
|
|
specific language governing permissions and limitations
|
|
under the License.
|
|
-->
|
|
|
|
<ofbiz-component name="content"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
|
|
<resource-loader name="main" type="component"/>
|
|
<classpath type="dir" location="config"/>
|
|
<classpath type="dir" location="dtd"/>
|
|
|
|
<entity-resource type="eca" reader-name="main" loader="main" location="entitydef/eecas.xml"/>
|
|
|
|
<entity-resource type="data" reader-name="seed" loader="main" location="data/ContentHelpData.xml"/>
|
|
<entity-resource type="data" reader-name="seed" loader="main" location="data/ContentHttpErrorData.xml"/>
|
|
<entity-resource type="data" reader-name="seed" loader="main" location="data/ContentPortletData.xml"/>
|
|
<entity-resource type="data" reader-name="seed" loader="main" location="data/PartyHelpData.xml"/>
|
|
<entity-resource type="data" reader-name="seed" loader="main" location="data/WebtoolsHelpData.xml"/>
|
|
<service-resource type="model" loader="main" location="servicedef/services.xml"/>
|
|
<service-resource type="model" loader="main" location="servicedef/services_content.xml"/>
|
|
<service-resource type="model" loader="main" location="servicedef/services_contenttypes.xml"/>
|
|
<service-resource type="model" loader="main" location="servicedef/services_data.xml"/>
|
|
<service-resource type="model" loader="main" location="servicedef/services_document.xml"/>
|
|
<service-resource type="model" loader="main" location="servicedef/services_ftp.xml"/>
|
|
<service-resource type="model" loader="main" location="servicedef/services_output.xml"/>
|
|
<service-resource type="model" loader="main" location="servicedef/services_survey.xml"/>
|
|
<service-resource type="model" loader="main" location="servicedef/services_commevent.xml"/>
|
|
<service-resource type="model" loader="main" location="servicedef/services_website.xml"/>
|
|
<service-resource type="eca" loader="main" location="servicedef/secas.xml"/>
|
|
<service-resource type="mca" loader="main" location="servicedef/mca.xml"/>
|
|
|
|
<webapp name="content"
|
|
title="Content"
|
|
server="default-server"
|
|
location="webapp/content"
|
|
base-permission="OFBTOOLS,CONTENTMGR"
|
|
mount-point="/content"/>
|
|
|
|
<webapp name="contentimages"
|
|
title="Content Images"
|
|
server="default-server"
|
|
location="webapp/contentimages"
|
|
mount-point="/contentimages/"
|
|
app-bar-display="false"/>
|
|
|
|
</ofbiz-component>
|