NIFI-309 This closes #40

This commit is contained in:
joewitt 2015-03-21 10:18:52 -04:00
parent 204112d3d2
commit 0bd27847ab
41 changed files with 106 additions and 111 deletions

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.annotation.documentation;
package org.apache.nifi.annotation.behavior;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.annotation.documentation;
package org.apache.nifi.annotation.behavior;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;

View File

@ -14,8 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.annotation.documentation;
package org.apache.nifi.annotation.behavior;
import org.apache.nifi.annotation.behavior.ReadsAttribute;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.annotation.documentation;
package org.apache.nifi.annotation.behavior;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.annotation.documentation;
package org.apache.nifi.annotation.behavior;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;

View File

@ -72,14 +72,14 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
}
/**
* Writes the head portion of the HTML documentation.
* Writes the head portion of the HTML documentation.
*
* @param configurableComponent
* the component to describe
* @param xmlStreamWriter
* the stream to write to
* @throws XMLStreamException
* thrown if there was a problem writing to the stream
* thrown if there was a problem writing to the stream
*/
protected void writeHead(final ConfigurableComponent configurableComponent,
final XMLStreamWriter xmlStreamWriter) throws XMLStreamException {
@ -99,10 +99,10 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
}
/**
* Gets the class name of the component.
* Gets the class name of the component.
*
* @param configurableComponent
* the component to describe
* the component to describe
* @return the class name of the component
*/
protected String getTitle(final ConfigurableComponent configurableComponent) {
@ -111,7 +111,7 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
/**
* Writes the body section of the documentation, this consists of the
* component description, the tags, and the PropertyDescriptors.
* component description, the tags, and the PropertyDescriptors.
*
* @param configurableComponent
* the component to describe
@ -122,7 +122,7 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
* @throws XMLStreamException
* thrown if there was a problem writing to the XML stream
*/
private final void writeBody(final ConfigurableComponent configurableComponent,
private void writeBody(final ConfigurableComponent configurableComponent,
final XMLStreamWriter xmlStreamWriter, final boolean hasAdditionalDetails)
throws XMLStreamException {
xmlStreamWriter.writeStartElement("body");
@ -130,12 +130,12 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
writeTags(configurableComponent, xmlStreamWriter);
writeProperties(configurableComponent, xmlStreamWriter);
writeDynamicProperties(configurableComponent, xmlStreamWriter);
writeAdditionalBodyInfo(configurableComponent, xmlStreamWriter);
writeSeeAlso(configurableComponent, xmlStreamWriter);
writeAdditionalBodyInfo(configurableComponent, xmlStreamWriter);
writeSeeAlso(configurableComponent, xmlStreamWriter);
xmlStreamWriter.writeEndElement();
}
/**
/**
* Writes the list of components that may be linked from this component.
*
* @param configurableComponent
@ -194,12 +194,12 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
*/
protected void writeAdditionalBodyInfo(final ConfigurableComponent configurableComponent,
final XMLStreamWriter xmlStreamWriter) throws XMLStreamException {
}
/**
* Writes the tags attached to a ConfigurableComponent.
*
* Writes the tags attached to a ConfigurableComponent.
*
* @param configurableComponent
* @param xmlStreamWriter
* @throws XMLStreamException
@ -222,7 +222,7 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
}
/**
* Writes a description of the configurable component.
* Writes a description of the configurable component.
*
* @param configurableComponent
* the component to describe
@ -232,7 +232,7 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
* whether there are additional details available as
* 'additionalDetails.html'
* @throws XMLStreamException
* thrown if there was a problem writing to the XML stream
* thrown if there was a problem writing to the XML stream
*/
protected void writeDescription(final ConfigurableComponent configurableComponent,
final XMLStreamWriter xmlStreamWriter, final boolean hasAdditionalDetails)
@ -250,10 +250,10 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
/**
* Gets a description of the ConfigurableComponent using the
* CapabilityDescription annotation.
* CapabilityDescription annotation.
*
* @param configurableComponent
* the component to describe
* the component to describe
* @return a description of the configurableComponent
*/
protected String getDescription(final ConfigurableComponent configurableComponent) {
@ -271,14 +271,14 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
}
/**
* Writes the PropertyDescriptors out as a table.
* Writes the PropertyDescriptors out as a table.
*
* @param configurableComponent
* the component to describe
* @param xmlStreamWriter
* the stream writer
* @throws XMLStreamException
* thrown if there was a problem writing to the XML Stream
* thrown if there was a problem writing to the XML Stream
*/
protected void writeProperties(final ConfigurableComponent configurableComponent,
final XMLStreamWriter xmlStreamWriter) throws XMLStreamException {
@ -288,8 +288,8 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
writeSimpleElement(xmlStreamWriter, "strong", "bold");
xmlStreamWriter.writeCharacters(". Any "
+ "other properties (not in bold) are considered optional. The table also "
+ "indicates any default values, whether a property supports the ");
writeLink(xmlStreamWriter, "NiFi Expression Language", "../../html/expression-language-guide.html");
+ "indicates any default values, whether a property supports the ");
writeLink(xmlStreamWriter, "NiFi Expression Language", "../../html/expression-language-guide.html");
xmlStreamWriter.writeCharacters(", and whether a property is considered "
+ "\"sensitive\", meaning that its value will be encrypted. Before entering a "
+ "value in a sensitive property, ensure that the ");
@ -438,14 +438,14 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
/**
* Interrogates a PropertyDescriptor to get a list of AllowableValues, if
* there are none, nothing is written to the stream.
* there are none, nothing is written to the stream.
*
* @param xmlStreamWriter
* the stream writer to use
* @param property
* the property to describe
* @throws XMLStreamException
* thrown if there was a problem writing to the XML Stream
* thrown if there was a problem writing to the XML Stream
*/
protected void writeValidValues(XMLStreamWriter xmlStreamWriter, PropertyDescriptor property)
throws XMLStreamException {
@ -462,10 +462,10 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
}
xmlStreamWriter.writeEndElement();
} else if (property.getControllerServiceDefinition() != null) {
} else if (property.getControllerServiceDefinition() != null) {
Class<? extends ControllerService> controllerServiceClass = property
.getControllerServiceDefinition();
writeSimpleElement(xmlStreamWriter, "strong", "Controller Service: ");
xmlStreamWriter.writeEmptyElement("br");
xmlStreamWriter.writeCharacters(controllerServiceClass.getSimpleName());
@ -474,7 +474,7 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
/**
* Writes a begin element, then text, then end element for the element of a
* users choosing. Example: &lt;p&gt;text&lt;/p&gt;
* users choosing. Example: &lt;p&gt;text&lt;/p&gt;
*
* @param writer
* the stream writer to use
@ -485,7 +485,7 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
* @param strong
* whether the characters should be strong or not.
* @throws XMLStreamException
* thrown if there was a problem writing to the stream.
* thrown if there was a problem writing to the stream.
*/
protected final static void writeSimpleElement(final XMLStreamWriter writer, final String elementName,
final String characters, boolean strong) throws XMLStreamException {
@ -502,7 +502,7 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
/**
* Writes a begin element, then text, then end element for the element of a
* users choosing. Example: &lt;p&gt;text&lt;/p&gt;
* users choosing. Example: &lt;p&gt;text&lt;/p&gt;
*
* @param writer
* the stream writer to use
@ -511,7 +511,7 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
* @param characters
* the characters to insert into the element
* @throws XMLStreamException
* thrown if there was a problem writing to the stream
* thrown if there was a problem writing to the stream
*/
protected final static void writeSimpleElement(final XMLStreamWriter writer, final String elementName,
final String characters) throws XMLStreamException {
@ -519,7 +519,7 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
}
/**
* A helper method to write a link
* A helper method to write a link
*
* @param xmlStreamWriter
* the stream to write to
@ -528,7 +528,7 @@ public class HtmlDocumentationWriter implements DocumentationWriter {
* @param location
* the location of the link
* @throws XMLStreamException
* thrown if there was a problem writing to the stream
* thrown if there was a problem writing to the stream
*/
protected void writeLink(final XMLStreamWriter xmlStreamWriter, final String text, final String location)
throws XMLStreamException {

View File

@ -17,26 +17,27 @@
package org.apache.nifi.documentation.html;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import org.apache.commons.lang3.StringUtils;
import org.apache.nifi.annotation.documentation.DynamicRelationship;
import org.apache.nifi.annotation.documentation.ReadsAttribute;
import org.apache.nifi.annotation.documentation.ReadsAttributes;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.DynamicRelationship;
import org.apache.nifi.annotation.behavior.ReadsAttribute;
import org.apache.nifi.annotation.behavior.ReadsAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.components.ConfigurableComponent;
import org.apache.nifi.processor.Processor;
import org.apache.nifi.processor.Relationship;
/**
* Writes documentation specific for a Processor. This includes everything for a
* ConfigurableComponent as well as Relationship information.
* ConfigurableComponent as well as Relationship information.
*
*
*
*/
public class HtmlProcessorDocumentationWriter extends HtmlDocumentationWriter {
@ -151,9 +152,7 @@ public class HtmlProcessorDocumentationWriter extends HtmlDocumentationWriter {
ReadsAttributes readsAttributes = processor.getClass().getAnnotation(ReadsAttributes.class);
if (readsAttributes != null) {
for (ReadsAttribute readAttribute : readsAttributes.value()) {
attributes.add(readAttribute);
}
attributes.addAll(Arrays.asList(readsAttributes.value()));
}
ReadsAttribute readsAttribute = processor.getClass().getAnnotation(ReadsAttribute.class);
@ -176,9 +175,7 @@ public class HtmlProcessorDocumentationWriter extends HtmlDocumentationWriter {
WritesAttributes writesAttributes = processor.getClass().getAnnotation(WritesAttributes.class);
if (writesAttributes != null) {
for (WritesAttribute writeAttribute : writesAttributes.value()) {
attributes.add(writeAttribute);
}
attributes.addAll(Arrays.asList(writesAttributes.value()));
}
WritesAttribute writeAttribute = processor.getClass().getAnnotation(WritesAttribute.class);

View File

@ -24,12 +24,12 @@ import java.util.Set;
import org.apache.nifi.annotation.behavior.DynamicProperty;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.DynamicRelationship;
import org.apache.nifi.annotation.documentation.ReadsAttribute;
import org.apache.nifi.annotation.behavior.DynamicRelationship;
import org.apache.nifi.annotation.behavior.ReadsAttribute;
import org.apache.nifi.annotation.documentation.SeeAlso;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.processor.AbstractProcessor;

View File

@ -42,8 +42,8 @@ import org.apache.nifi.annotation.behavior.TriggerWhenEmpty;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.SeeAlso;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.annotation.lifecycle.OnScheduled;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.components.ValidationContext;

View File

@ -35,7 +35,7 @@ import org.apache.hadoop.ipc.RemoteException;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.SeeAlso;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.lifecycle.OnScheduled;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.components.PropertyValue;

View File

@ -42,8 +42,8 @@ import kafka.message.MessageAndMetadata;
import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.annotation.lifecycle.OnScheduled;
import org.apache.nifi.annotation.lifecycle.OnStopped;
import org.apache.nifi.annotation.lifecycle.OnUnscheduled;

View File

@ -50,7 +50,7 @@ import org.apache.nifi.util.StopWatch;
@SideEffectFree
@SupportsBatching
@Tags({"experimental", "encode", "base64"})
@CapabilityDescription("Encodes the FlowFile content in base64")
@CapabilityDescription("Encodes or decodes content to and from base64")
public class Base64EncodeContent extends AbstractProcessor {
public static final String ENCODE_MODE = "Encode";

View File

@ -40,9 +40,9 @@ import org.apache.nifi.annotation.behavior.EventDriven;
import org.apache.nifi.annotation.behavior.SideEffectFree;
import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.ReadsAttribute;
import org.apache.nifi.annotation.behavior.ReadsAttribute;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.flowfile.FlowFile;
import org.apache.nifi.flowfile.attributes.CoreAttributes;

View File

@ -32,7 +32,7 @@ import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.SeeAlso;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.distributed.cache.client.Deserializer;
import org.apache.nifi.distributed.cache.client.DistributedMapCacheClient;

View File

@ -36,7 +36,7 @@ import org.apache.nifi.annotation.behavior.SideEffectFree;
import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.behavior.TriggerWhenAnyDestinationAvailable;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.DynamicRelationship;
import org.apache.nifi.annotation.behavior.DynamicRelationship;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.lifecycle.OnScheduled;
import org.apache.nifi.components.PropertyDescriptor;

View File

@ -27,7 +27,7 @@ import org.apache.nifi.annotation.behavior.EventDriven;
import org.apache.nifi.annotation.behavior.SideEffectFree;
import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.DynamicRelationship;
import org.apache.nifi.annotation.behavior.DynamicRelationship;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.lifecycle.OnRemoved;
import org.apache.nifi.components.PropertyDescriptor;

View File

@ -48,23 +48,18 @@ import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.processor.io.InputStreamCallback;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.commons.lang3.StringUtils;
import org.apache.nifi.annotation.documentation.SeeAlso;
@EventDriven
@SideEffectFree
@SupportsBatching
@Tags({"deprecated"})
@CapabilityDescription(
"WARNING: This has been deprecated and will be removed in 0.2.0. Use ExtractText instead.\n"
+ "Evaluates one or more Regular Expressions against the content of a FlowFile. "
+ "The results of those Regular Expressions are assigned to FlowFile Attributes. "
+ "Regular Expressions are entered by adding user-defined properties; "
+ "the name of the property maps to the Attribute Name into which the result will be placed. "
+ "The value of the property must be a valid Regular Expressions with exactly one capturing group. "
+ "If the Regular Expression matches more than once, only the first match will be used. "
+ "If any provided Regular Expression matches, the FlowFile(s) will be routed to 'matched'. "
+ "If no provided Regular Expression matches, the FlowFile will be routed to 'unmatched' and no attributes will be applied to the FlowFile.")
"WARNING: This has been deprecated and will be removed in 0.2.0. \n\n"
+ "Use ExtractText instead.")
@SeeAlso(ExtractText.class)
@Deprecated
@DynamicProperty(name="A FlowFile attribute", value="A regular expression with exactly one capturing group", description="Will update the specified FlowFile attribute with the group captured by the regular expression")
@DynamicProperty(name = "A FlowFile attribute", value = "A regular expression with exactly one capturing group", description = "Will update the specified FlowFile attribute with the group captured by the regular expression")
public class EvaluateRegularExpression extends AbstractProcessor {
public static final PropertyDescriptor CHARACTER_SET = new PropertyDescriptor.Builder()

View File

@ -66,7 +66,7 @@ import org.apache.nifi.processor.ProcessSession;
import org.apache.nifi.processor.ProcessorInitializationContext;
import org.apache.nifi.processor.Relationship;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.EventDriven;
import org.apache.nifi.annotation.lifecycle.OnScheduled;
import org.apache.nifi.annotation.behavior.DynamicProperty;

View File

@ -56,7 +56,7 @@ import org.apache.nifi.annotation.behavior.SideEffectFree;
import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.components.ValidationContext;
import org.apache.nifi.components.ValidationResult;

View File

@ -37,8 +37,8 @@ import org.apache.nifi.annotation.behavior.EventDriven;
import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.components.ValidationContext;
import org.apache.nifi.components.ValidationResult;

View File

@ -25,8 +25,8 @@ import org.apache.nifi.processor.ProcessContext;
import org.apache.nifi.processor.ProcessorInitializationContext;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.SeeAlso;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.annotation.behavior.SideEffectFree;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.processors.standard.util.FTPTransfer;

View File

@ -53,8 +53,8 @@ import org.apache.nifi.annotation.behavior.TriggerWhenEmpty;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.SeeAlso;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.annotation.lifecycle.OnScheduled;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.flowfile.FlowFile;

View File

@ -69,7 +69,7 @@ import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.conn.BasicHttpClientConnectionManager;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.lifecycle.OnShutdown;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.components.ValidationContext;

View File

@ -25,8 +25,8 @@ import org.apache.nifi.annotation.behavior.SideEffectFree;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.SeeAlso;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.components.ValidationContext;
import org.apache.nifi.components.ValidationResult;

View File

@ -47,8 +47,8 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.SeeAlso;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.annotation.lifecycle.OnScheduled;
import org.apache.nifi.annotation.lifecycle.OnStopped;
import org.apache.nifi.components.AllowableValue;

View File

@ -28,7 +28,7 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.nifi.annotation.behavior.DynamicProperty;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.ReadsAttribute;
import org.apache.nifi.annotation.behavior.ReadsAttribute;
import org.apache.nifi.annotation.documentation.SeeAlso;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.components.PropertyDescriptor;

View File

@ -37,7 +37,7 @@ import org.apache.nifi.annotation.behavior.SideEffectFree;
import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.flowfile.FlowFile;
import org.apache.nifi.logging.ProcessorLog;

View File

@ -32,7 +32,7 @@ import org.apache.nifi.annotation.behavior.EventDriven;
import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.flowfile.FlowFile;
import org.apache.nifi.logging.ProcessorLog;

View File

@ -28,7 +28,7 @@ import org.apache.nifi.annotation.behavior.SideEffectFree;
import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.flowfile.FlowFile;
import org.apache.nifi.flowfile.attributes.CoreAttributes;
import org.apache.nifi.logging.ProcessorLog;

View File

@ -53,8 +53,8 @@ import org.apache.nifi.annotation.behavior.DynamicProperty;
import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.flowfile.FlowFile;
import org.apache.nifi.logging.ProcessorLog;

View File

@ -40,12 +40,12 @@ import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
import org.apache.nifi.annotation.behavior.SideEffectFree;
import org.apache.nifi.annotation.behavior.TriggerWhenEmpty;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.ReadsAttribute;
import org.apache.nifi.annotation.documentation.ReadsAttributes;
import org.apache.nifi.annotation.behavior.ReadsAttribute;
import org.apache.nifi.annotation.behavior.ReadsAttributes;
import org.apache.nifi.annotation.documentation.SeeAlso;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.components.PropertyValue;

View File

@ -35,8 +35,8 @@ import org.apache.nifi.annotation.behavior.TriggerSerially;
import org.apache.nifi.annotation.behavior.TriggerWhenEmpty;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.flowfile.FlowFile;
import org.apache.nifi.flowfile.attributes.CoreAttributes;

View File

@ -82,7 +82,7 @@ import org.apache.http.protocol.HttpCoreContext;
import org.apache.http.util.EntityUtils;
import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.ReadsAttribute;
import org.apache.nifi.annotation.behavior.ReadsAttribute;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.lifecycle.OnScheduled;
import org.apache.nifi.annotation.lifecycle.OnStopped;

View File

@ -31,7 +31,7 @@ import org.apache.nifi.annotation.behavior.EventDriven;
import org.apache.nifi.annotation.behavior.SideEffectFree;
import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.DynamicRelationship;
import org.apache.nifi.annotation.behavior.DynamicRelationship;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.PropertyDescriptor;

View File

@ -41,7 +41,7 @@ import org.apache.nifi.processor.ProcessSession;
import org.apache.nifi.processor.ProcessorInitializationContext;
import org.apache.nifi.processor.Relationship;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.DynamicRelationship;
import org.apache.nifi.annotation.behavior.DynamicRelationship;
import org.apache.nifi.annotation.behavior.DynamicProperty;
import org.apache.nifi.annotation.behavior.EventDriven;
import org.apache.nifi.annotation.behavior.SideEffectFree;

View File

@ -39,7 +39,7 @@ import org.apache.nifi.annotation.behavior.SideEffectFree;
import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.flowfile.FlowFile;
import org.apache.nifi.logging.ProcessorLog;

View File

@ -31,8 +31,8 @@ import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.SeeAlso;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.flowfile.FlowFile;
import org.apache.nifi.flowfile.attributes.CoreAttributes;

View File

@ -35,8 +35,8 @@ import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.SeeAlso;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.components.ValidationContext;
import org.apache.nifi.components.ValidationResult;

View File

@ -31,8 +31,8 @@ import org.apache.nifi.processor.ProcessorInitializationContext;
import org.apache.nifi.processor.Relationship;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.SeeAlso;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.annotation.behavior.EventDriven;
import org.apache.nifi.annotation.behavior.SideEffectFree;
import org.apache.nifi.annotation.behavior.SupportsBatching;

View File

@ -38,11 +38,11 @@ import org.apache.nifi.annotation.behavior.EventDriven;
import org.apache.nifi.annotation.behavior.SideEffectFree;
import org.apache.nifi.annotation.behavior.SupportsBatching;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.ReadsAttribute;
import org.apache.nifi.annotation.behavior.ReadsAttribute;
import org.apache.nifi.annotation.documentation.SeeAlso;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.annotation.documentation.WritesAttribute;
import org.apache.nifi.annotation.documentation.WritesAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.flowfile.FlowFile;
import org.apache.nifi.flowfile.attributes.CoreAttributes;

View File

@ -60,6 +60,7 @@ import org.apache.nifi.update.attributes.Rule;
import org.apache.nifi.update.attributes.FlowFilePolicy;
import org.apache.nifi.update.attributes.serde.CriteriaSerDe;
import org.apache.commons.lang3.StringUtils;
import org.apache.nifi.annotation.behavior.WritesAttribute;
/**
* This processor supports updating flowfile attributes and can do so
@ -115,6 +116,7 @@ import org.apache.commons.lang3.StringUtils;
@CapabilityDescription("Updates the Attributes for a FlowFile by using the Attribute Expression Language")
@DynamicProperty(name="A FlowFile attribute to update", value="The value to set it to", supportsExpressionLanguage=true, description="Updates a " +
"FlowFile attribute specified by the Dynamic Property's key with the value specified by the Dynamic Property's value")
@WritesAttribute(attribute = "See additional details", description = "This processor may write zero or more attributes as described in additional details")
public class UpdateAttribute extends AbstractProcessor implements Searchable {
private final AtomicReference<Criteria> criteriaCache = new AtomicReference<>(null);