Class AbstractSFTPSubmitter
java.lang.Object
com.broadleafcommerce.datafeed.service.publisher.file.submitter.AbstractSFTPSubmitter
- All Implemented Interfaces:
DataFeedFileSubmitter
,org.springframework.core.Ordered
- Direct Known Subclasses:
MerchantCenterSFTPSubmitter
Common starting point for
DataFeedFileSubmitter
implementations that need to use SFTP.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Bundle of details required to set up an SFTP upload request. -
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionAbstractSFTPSubmitter
(com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected DataFeedFileSubmitResponseDetails
buildFailedResponse
(List<String> errors) protected abstract AbstractSFTPSubmitter.SFTPUploadConfiguration
buildSftpConfiguration
(AbstractFileFeedPublisher.FilePublishContext filePublishContext) Build a validAbstractSFTPSubmitter.SFTPUploadConfiguration
from theAbstractFileFeedPublisher.FilePublishContext
.protected DataFeedFileSubmitResponseDetails
protected com.broadleafcommerce.common.extension.TypeFactory
protected void
initializeSSHClient
(net.schmizz.sshj.SSHClient sshClient, AbstractSFTPSubmitter.SFTPUploadConfiguration sftpUploadConfiguration, AbstractFileFeedPublisher.FilePublishContext filePublishContext) submit
(AbstractFileFeedPublisher.FilePublishContext filePublishContext) Reference: SSHJ SFTP upload exampleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.datafeed.service.publisher.file.submitter.DataFeedFileSubmitter
canHandle, getOrder
-
Constructor Details
-
AbstractSFTPSubmitter
public AbstractSFTPSubmitter(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
submit
public DataFeedFileSubmitResponseDetails submit(AbstractFileFeedPublisher.FilePublishContext filePublishContext) Reference: SSHJ SFTP upload example- Specified by:
submit
in interfaceDataFeedFileSubmitter
- Parameters:
filePublishContext
- details around the file publish process- Returns:
- details about the success/failure of the operation
-
initializeSSHClient
protected void initializeSSHClient(net.schmizz.sshj.SSHClient sshClient, AbstractSFTPSubmitter.SFTPUploadConfiguration sftpUploadConfiguration, AbstractFileFeedPublisher.FilePublishContext filePublishContext) -
buildFailedResponse
-
buildSuccessfulResponse
-
buildSftpConfiguration
protected abstract AbstractSFTPSubmitter.SFTPUploadConfiguration buildSftpConfiguration(AbstractFileFeedPublisher.FilePublishContext filePublishContext) Build a validAbstractSFTPSubmitter.SFTPUploadConfiguration
from theAbstractFileFeedPublisher.FilePublishContext
.- Parameters:
filePublishContext
- details around the file publish context- Returns:
- a
AbstractSFTPSubmitter.SFTPUploadConfiguration
describing the SFTP upload that needs to be made
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-