From 385bfbb2c635f74aca318617175cd57a8e26ecda Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Sun, 25 Oct 2015 11:14:11 -0400 Subject: [PATCH] NIFI-673: Rebased from master; Added InputRequirement annotation, as it is now merged into master --- .../java/org/apache/nifi/processors/standard/FetchSFTP.java | 3 +++ .../java/org/apache/nifi/processors/standard/ListSFTP.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/FetchSFTP.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/FetchSFTP.java index b95d864523..8379987871 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/FetchSFTP.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/FetchSFTP.java @@ -22,6 +22,8 @@ import java.util.Collection; import java.util.Collections; import java.util.List; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.InputRequirement.Requirement; import org.apache.nifi.annotation.behavior.WritesAttribute; import org.apache.nifi.annotation.behavior.WritesAttributes; import org.apache.nifi.annotation.documentation.CapabilityDescription; @@ -35,6 +37,7 @@ import org.apache.nifi.processors.standard.util.FileTransfer; import org.apache.nifi.processors.standard.util.SFTPTransfer; // Note that we do not use @SupportsBatching annotation. This processor cannot support batching because it must ensure that session commits happen before remote files are deleted. +@InputRequirement(Requirement.INPUT_REQUIRED) @Tags({"sftp", "get", "retrieve", "files", "fetch", "remote", "ingest", "source", "input"}) @CapabilityDescription("Fetches the content of a file from a remote SFTP server and overwrites the contents of an incoming FlowFile with the content of the remote file.") @SeeAlso({GetSFTP.class, PutSFTP.class, GetFTP.class, PutFTP.class}) diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListSFTP.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListSFTP.java index 7226263cfa..609b69368d 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListSFTP.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListSFTP.java @@ -20,6 +20,8 @@ package org.apache.nifi.processors.standard; import java.util.ArrayList; import java.util.List; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.InputRequirement.Requirement; import org.apache.nifi.annotation.behavior.TriggerSerially; import org.apache.nifi.annotation.behavior.WritesAttribute; import org.apache.nifi.annotation.behavior.WritesAttributes; @@ -32,6 +34,7 @@ import org.apache.nifi.processors.standard.util.FileTransfer; import org.apache.nifi.processors.standard.util.SFTPTransfer; @TriggerSerially +@InputRequirement(Requirement.INPUT_FORBIDDEN) @Tags({"list", "sftp", "remote", "ingest", "source", "input", "files"}) @CapabilityDescription("Performs a listing of the files residing on an SFTP server. For each file that is found on the remote server, a new FlowFile will be created with the filename attribute " + "set to the name of the file on the remote server. This can then be used in conjunction with FetchSFTP in order to fetch those files.")