Class PutFTP

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.processor.Processor

@SupportsBatching @InputRequirement(INPUT_REQUIRED) @Tags({"remote","copy","egress","put","ftp","archive","files"}) @CapabilityDescription("Sends FlowFiles to an FTP Server") @SeeAlso(GetFTP.class) @DynamicProperty(name="pre.cmd._____",value="Not used",description="The command specified in the key will be executed before doing a put. You may add these optional properties to send any commands to the FTP server before the file is actually transferred (before the put command). This option is only available for the PutFTP processor, as only FTP has this functionality. This is essentially the same as sending quote commands to an FTP server from the command line. While this is the same as sending a quote command, it is very important that you leave off the .") @DynamicProperty(name="post.cmd._____",value="Not used",description="The command specified in the key will be executed after doing a put. You may add these optional properties to send any commands to the FTP server before the file is actually transferred (before the put command). This option is only available for the PutFTP processor, as only FTP has this functionality. This is essentially the same as sending quote commands to an FTP server from the command line. While this is the same as sending a quote command, it is very important that you leave off the .") public class PutFTP extends PutFileTransfer<FTPTransfer>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final Pattern
     
    private final AtomicReference<List<org.apache.nifi.components.PropertyDescriptor>>
     
    private static final Pattern
     
    private final AtomicReference<List<org.apache.nifi.components.PropertyDescriptor>>
     
    private static final List<org.apache.nifi.components.PropertyDescriptor>
     
    static final org.apache.nifi.components.PropertyDescriptor
     

    Fields inherited from class org.apache.nifi.processor.util.file.transfer.PutFileTransfer

    REL_FAILURE, REL_REJECT, REL_SUCCESS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    afterPut(org.apache.nifi.flowfile.FlowFile flowFile, org.apache.nifi.processor.ProcessContext context, FTPTransfer transfer)
     
    protected void
    beforePut(org.apache.nifi.flowfile.FlowFile flowFile, org.apache.nifi.processor.ProcessContext context, FTPTransfer transfer)
     
    protected Collection<org.apache.nifi.components.ValidationResult>
    customValidate(org.apache.nifi.components.ValidationContext validationContext)
     
    void
    determinePrePostSendProperties(org.apache.nifi.processor.ProcessContext context)
     
    private List<String>
    getCommands(List<org.apache.nifi.components.PropertyDescriptor> descriptors, org.apache.nifi.processor.ProcessContext context, org.apache.nifi.flowfile.FlowFile flowFile)
     
    protected FTPTransfer
    getFileTransfer(org.apache.nifi.processor.ProcessContext context)
     
    protected org.apache.nifi.components.PropertyDescriptor
     
    protected List<org.apache.nifi.components.PropertyDescriptor>
     
    void
     

    Methods inherited from class org.apache.nifi.processor.util.file.transfer.PutFileTransfer

    getRelationships, onTrigger

    Methods inherited from class org.apache.nifi.processor.AbstractProcessor

    onTrigger

    Methods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor

    getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue

    Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent

    equals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, validate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.nifi.components.ConfigurableComponent

    getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate

    Methods inherited from interface org.apache.nifi.processor.Processor

    isStateful, migrateRelationships
  • Field Details

    • PRE_SEND_CMD_PATTERN

      private static final Pattern PRE_SEND_CMD_PATTERN
    • POST_SEND_CMD_PATTERN

      private static final Pattern POST_SEND_CMD_PATTERN
    • preSendDescriptorRef

      private final AtomicReference<List<org.apache.nifi.components.PropertyDescriptor>> preSendDescriptorRef
    • postSendDescriptorRef

      private final AtomicReference<List<org.apache.nifi.components.PropertyDescriptor>> postSendDescriptorRef
    • REMOTE_PATH

      public static final org.apache.nifi.components.PropertyDescriptor REMOTE_PATH
    • PROPERTY_DESCRIPTORS

      private static final List<org.apache.nifi.components.PropertyDescriptor> PROPERTY_DESCRIPTORS
  • Constructor Details

    • PutFTP

      public PutFTP()
  • Method Details

    • getSupportedPropertyDescriptors

      protected List<org.apache.nifi.components.PropertyDescriptor> getSupportedPropertyDescriptors()
      Overrides:
      getSupportedPropertyDescriptors in class org.apache.nifi.components.AbstractConfigurableComponent
    • migrateProperties

      public void migrateProperties(PropertyConfiguration config)
    • beforePut

      protected void beforePut(org.apache.nifi.flowfile.FlowFile flowFile, org.apache.nifi.processor.ProcessContext context, FTPTransfer transfer) throws IOException
      Overrides:
      beforePut in class PutFileTransfer<FTPTransfer>
      Throws:
      IOException
    • afterPut

      protected void afterPut(org.apache.nifi.flowfile.FlowFile flowFile, org.apache.nifi.processor.ProcessContext context, FTPTransfer transfer) throws IOException
      Overrides:
      afterPut in class PutFileTransfer<FTPTransfer>
      Throws:
      IOException
    • getFileTransfer

      protected FTPTransfer getFileTransfer(org.apache.nifi.processor.ProcessContext context)
      Specified by:
      getFileTransfer in class PutFileTransfer<FTPTransfer>
    • getSupportedDynamicPropertyDescriptor

      protected org.apache.nifi.components.PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
      Overrides:
      getSupportedDynamicPropertyDescriptor in class org.apache.nifi.components.AbstractConfigurableComponent
    • determinePrePostSendProperties

      @OnScheduled public void determinePrePostSendProperties(org.apache.nifi.processor.ProcessContext context)
    • getCommands

      private List<String> getCommands(List<org.apache.nifi.components.PropertyDescriptor> descriptors, org.apache.nifi.processor.ProcessContext context, org.apache.nifi.flowfile.FlowFile flowFile)
    • customValidate

      protected Collection<org.apache.nifi.components.ValidationResult> customValidate(org.apache.nifi.components.ValidationContext validationContext)
      Overrides:
      customValidate in class org.apache.nifi.components.AbstractConfigurableComponent