From e9d31f5d994e5d6d89edf8465942167647959abc Mon Sep 17 00:00:00 2001 From: joewitt Date: Tue, 17 Mar 2015 23:42:22 -0400 Subject: [PATCH] NIFI-280 This closes #19 Updated poms for versions after merge. Minor doc removals. Awesome PR! --- nifi/nifi-assembly/NOTICE | 5 + .../nifi-framework/nifi-documentation/pom.xml | 92 +-- .../ConfigurableComponentInitializer.java | 16 +- .../nifi/documentation/DocGenerator.java | 227 +++--- .../documentation/DocumentationWriter.java | 6 +- .../html/HtmlDocumentationWriter.java | 650 +++++++++--------- .../HtmlProcessorDocumentationWriter.java | 46 +- .../init/ControllerServiceInitializer.java | 12 +- .../init/ProcessorInitializer.java | 12 +- .../init/ReportingTaskingInitializer.java | 12 +- ...ontrollerServiceInitializationContext.java | 18 +- .../mock/MockControllerServiceLookup.java | 36 +- .../MockProcessorInitializationContext.java | 26 +- .../MockReportingInitializationContext.java | 50 +- .../documentation/example/NakedProcessor.java | 17 +- .../nifi-framework/pom.xml | 2 +- .../nifi-framework-bundle/pom.xml | 2 +- .../processors/standard/DistributeLoad.java | 2 +- .../standard/HandleHttpRequest.java | 7 +- .../additionalDetails.html | 42 +- .../additionalDetails.html | 58 ++ .../index.html | 155 ----- .../additionalDetails.html | 222 +++--- .../index.html | 100 --- .../additionalDetails.html | 127 ++++ .../index.html | 255 ------- .../additionalDetails.html | 57 ++ .../index.html | 112 --- .../additionalDetails.html | 88 +-- .../additionalDetails.html | 2 +- .../additionalDetails.html | 2 +- .../additionalDetails.html | 2 +- .../additionalDetails.html | 24 +- .../additionalDetails.html | 4 +- .../additionalDetails.html | 2 +- .../additionalDetails.html | 2 +- .../additionalDetails.html | 2 +- .../additionalDetails.html | 2 +- .../index.html | 85 --- 39 files changed, 1008 insertions(+), 1573 deletions(-) create mode 100644 nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.EvaluateJsonPath/additionalDetails.html delete mode 100644 nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.EvaluateJsonPath/index.html delete mode 100644 nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.ExecuteProcess/index.html create mode 100644 nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpRequest/additionalDetails.html delete mode 100644 nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpRequest/index.html create mode 100644 nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpResponse/additionalDetails.html delete mode 100644 nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpResponse/index.html delete mode 100644 nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.SplitJson/index.html diff --git a/nifi/nifi-assembly/NOTICE b/nifi/nifi-assembly/NOTICE index 4ead623d50..8d7db8d7ec 100644 --- a/nifi/nifi-assembly/NOTICE +++ b/nifi/nifi-assembly/NOTICE @@ -181,6 +181,11 @@ The following binary components are provided under the Apache Software License v Apache log4j Copyright 2007 The Apache Software Foundation + (ASLv2) Apache Tika + The following NOTICE information applies: + Apache Tika Core + Copyright 2007-2015 The Apache Software Foundation + (ASLv2) Apache Commons Configuration The following NOTICE information applies: Apache Commons Configuration diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/pom.xml b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/pom.xml index f35c8cd83c..e522d30ff7 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/pom.xml @@ -1,49 +1,49 @@ - - 4.0.0 - - org.apache.nifi - nifi-framework - 0.0.2-incubating-SNAPSHOT - - nifi-documentation - - - org.apache.nifi - nifi-nar-utils - - - org.apache.nifi - nifi-api - - - org.apache.nifi - nifi-properties - - - commons-io - commons-io - - - org.apache.commons - commons-lang3 - - - org.apache.nifi - nifi-processor-utils - test - - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" + xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + + 4.0.0 + + org.apache.nifi + nifi-framework + 0.1.0-incubating-SNAPSHOT + + nifi-documentation + + + org.apache.nifi + nifi-nar-utils + + + org.apache.nifi + nifi-api + + + org.apache.nifi + nifi-properties + + + commons-io + commons-io + + + org.apache.commons + commons-lang3 + + + org.apache.nifi + nifi-processor-utils + test + + diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/ConfigurableComponentInitializer.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/ConfigurableComponentInitializer.java index 164d212bd0..bd07ab54d8 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/ConfigurableComponentInitializer.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/ConfigurableComponentInitializer.java @@ -27,12 +27,12 @@ import org.apache.nifi.reporting.InitializationException; */ public interface ConfigurableComponentInitializer { - /** - * Initializes a configurable component to the point that you can call - * getPropertyDescriptors() on it - * - * @param component the component to initialize - * @throws InitializationException if the component could not be initialized - */ - void initialize(ConfigurableComponent component) throws InitializationException; + /** + * Initializes a configurable component to the point that you can call + * getPropertyDescriptors() on it + * + * @param component the component to initialize + * @throws InitializationException if the component could not be initialized + */ + void initialize(ConfigurableComponent component) throws InitializationException; } diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/DocGenerator.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/DocGenerator.java index 157d95edf5..8a53f00ca0 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/DocGenerator.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/DocGenerator.java @@ -43,140 +43,137 @@ import org.slf4j.LoggerFactory; /** * Uses the ExtensionManager to get a list of Processor, ControllerService, and * Reporting Task classes that were loaded and generate documentation for them. - * + * * */ public class DocGenerator { - private static final Logger logger = LoggerFactory.getLogger(DocGenerator.class); + private static final Logger logger = LoggerFactory.getLogger(DocGenerator.class); - /** - * Generates documentation into the work/docs dir specified by - * NiFiProperties. - * - * @param properties - */ - public static void generate(final NiFiProperties properties) { - @SuppressWarnings("rawtypes") - final Set extensionClasses = new HashSet<>(); - extensionClasses.addAll(ExtensionManager.getExtensions(Processor.class)); - extensionClasses.addAll(ExtensionManager.getExtensions(ControllerService.class)); - extensionClasses.addAll(ExtensionManager.getExtensions(ReportingTask.class)); + /** + * Generates documentation into the work/docs dir specified by + * NiFiProperties. + * + * @param properties + */ + public static void generate(final NiFiProperties properties) { + @SuppressWarnings("rawtypes") + final Set extensionClasses = new HashSet<>(); + extensionClasses.addAll(ExtensionManager.getExtensions(Processor.class)); + extensionClasses.addAll(ExtensionManager.getExtensions(ControllerService.class)); + extensionClasses.addAll(ExtensionManager.getExtensions(ReportingTask.class)); - final File explodedNiFiDocsDir = properties.getComponentDocumentationWorkingDirectory(); + final File explodedNiFiDocsDir = properties.getComponentDocumentationWorkingDirectory(); - logger.debug("Generating documentation for: " + extensionClasses.size() + " components in: " - + explodedNiFiDocsDir); + logger.debug("Generating documentation for: " + extensionClasses.size() + " components in: " + + explodedNiFiDocsDir); - for (final Class extensionClass : extensionClasses) { - if (ConfigurableComponent.class.isAssignableFrom(extensionClass)) { - final Class componentClass = extensionClass - .asSubclass(ConfigurableComponent.class); - try { - logger.debug("Documenting: " + componentClass); - document(explodedNiFiDocsDir, componentClass); - } catch (Exception e) { - logger.warn("Unable to document: " + componentClass); - } - } - } - } + for (final Class extensionClass : extensionClasses) { + if (ConfigurableComponent.class.isAssignableFrom(extensionClass)) { + final Class componentClass = extensionClass + .asSubclass(ConfigurableComponent.class); + try { + logger.debug("Documenting: " + componentClass); + document(explodedNiFiDocsDir, componentClass); + } catch (Exception e) { + logger.warn("Unable to document: " + componentClass); + } + } + } + } - /** - * Generates the documentation for a particular configurable comopnent. Will - * check to see if an "additionalDetails.html" file exists and will link - * that from the generated documentation. - * - * @param docsDir - * the work\docs\components dir to stick component documentation - * in - * @param componentClass - * the class to document - * @throws InstantiationException - * @throws IllegalAccessException - * @throws IOException - * @throws InitializationException - */ - private static void document(final File docsDir, final Class componentClass) - throws InstantiationException, IllegalAccessException, IOException, InitializationException { + /** + * Generates the documentation for a particular configurable comopnent. Will + * check to see if an "additionalDetails.html" file exists and will link + * that from the generated documentation. + * + * @param docsDir the work\docs\components dir to stick component + * documentation in + * @param componentClass the class to document + * @throws InstantiationException + * @throws IllegalAccessException + * @throws IOException + * @throws InitializationException + */ + private static void document(final File docsDir, final Class componentClass) + throws InstantiationException, IllegalAccessException, IOException, InitializationException { - final ConfigurableComponent component = componentClass.newInstance(); - final ConfigurableComponentInitializer initializer = getComponentInitializer(componentClass); - initializer.initialize(component); + final ConfigurableComponent component = componentClass.newInstance(); + final ConfigurableComponentInitializer initializer = getComponentInitializer(componentClass); + initializer.initialize(component); - final DocumentationWriter writer = getDocumentWriter(componentClass); + final DocumentationWriter writer = getDocumentWriter(componentClass); - final File directory = new File(docsDir, componentClass.getCanonicalName()); - directory.mkdirs(); + final File directory = new File(docsDir, componentClass.getCanonicalName()); + directory.mkdirs(); - final File baseDocumenationFile = new File(directory, "index.html"); - if (baseDocumenationFile.exists()) { - logger.warn(baseDocumenationFile + " already exists, overwriting!"); - } + final File baseDocumenationFile = new File(directory, "index.html"); + if (baseDocumenationFile.exists()) { + logger.warn(baseDocumenationFile + " already exists, overwriting!"); + } - try (final OutputStream output = new BufferedOutputStream(new FileOutputStream(baseDocumenationFile))) { - writer.write(component, output, hasAdditionalInfo(directory)); - } - } + try (final OutputStream output = new BufferedOutputStream(new FileOutputStream(baseDocumenationFile))) { + writer.write(component, output, hasAdditionalInfo(directory)); + } + } - /** - * Returns the DocumentationWriter for the type of component. Currently - * Processor, ControllerService, and ReportingTask are supported. - * - * @param componentClass - * the class that requires a DocumentationWriter - * @return a DocumentationWriter capable of generating documentation for - * that specific type of class - */ - private static DocumentationWriter getDocumentWriter(final Class componentClass) { - if (Processor.class.isAssignableFrom(componentClass)) { - return new HtmlProcessorDocumentationWriter(); - } else if (ControllerService.class.isAssignableFrom(componentClass)) { - return new HtmlDocumentationWriter(); - } else if (ReportingTask.class.isAssignableFrom(componentClass)) { - return new HtmlDocumentationWriter(); - } + /** + * Returns the DocumentationWriter for the type of component. Currently + * Processor, ControllerService, and ReportingTask are supported. + * + * @param componentClass the class that requires a DocumentationWriter + * @return a DocumentationWriter capable of generating documentation for + * that specific type of class + */ + private static DocumentationWriter getDocumentWriter(final Class componentClass) { + if (Processor.class.isAssignableFrom(componentClass)) { + return new HtmlProcessorDocumentationWriter(); + } else if (ControllerService.class.isAssignableFrom(componentClass)) { + return new HtmlDocumentationWriter(); + } else if (ReportingTask.class.isAssignableFrom(componentClass)) { + return new HtmlDocumentationWriter(); + } - return null; - } + return null; + } - /** - * Returns a ConfigurableComponentInitializer for the type of component. - * Currently Processor, ControllerService and ReportingTask are supported. - * - * @param componentClass - * the class that requires a ConfigurableComponentInitializer - * @return a ConfigurableComponentInitializer capable of initializing that - * specific type of class - */ - private static ConfigurableComponentInitializer getComponentInitializer( - final Class componentClass) { - if (Processor.class.isAssignableFrom(componentClass)) { - return new ProcessorInitializer(); - } else if (ControllerService.class.isAssignableFrom(componentClass)) { - return new ControllerServiceInitializer(); - } else if (ReportingTask.class.isAssignableFrom(componentClass)) { - return new ReportingTaskingInitializer(); - } + /** + * Returns a ConfigurableComponentInitializer for the type of component. + * Currently Processor, ControllerService and ReportingTask are supported. + * + * @param componentClass the class that requires a + * ConfigurableComponentInitializer + * @return a ConfigurableComponentInitializer capable of initializing that + * specific type of class + */ + private static ConfigurableComponentInitializer getComponentInitializer( + final Class componentClass) { + if (Processor.class.isAssignableFrom(componentClass)) { + return new ProcessorInitializer(); + } else if (ControllerService.class.isAssignableFrom(componentClass)) { + return new ControllerServiceInitializer(); + } else if (ReportingTask.class.isAssignableFrom(componentClass)) { + return new ReportingTaskingInitializer(); + } - return null; - } + return null; + } - /** - * Checks to see if a directory to write to has an additionalDetails.html in - * it already. - * - * @param directory - * @return true if additionalDetails.html exists, false otherwise. - */ - private static boolean hasAdditionalInfo(File directory) { - return directory.list(new FilenameFilter() { + /** + * Checks to see if a directory to write to has an additionalDetails.html in + * it already. + * + * @param directory + * @return true if additionalDetails.html exists, false otherwise. + */ + private static boolean hasAdditionalInfo(File directory) { + return directory.list(new FilenameFilter() { - @Override - public boolean accept(File dir, String name) { - return name.equalsIgnoreCase(HtmlDocumentationWriter.ADDITIONAL_DETAILS_HTML); - } + @Override + public boolean accept(File dir, String name) { + return name.equalsIgnoreCase(HtmlDocumentationWriter.ADDITIONAL_DETAILS_HTML); + } - }).length > 0; - } + }).length > 0; + } } diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/DocumentationWriter.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/DocumentationWriter.java index 5a3c5d8a80..d17863651a 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/DocumentationWriter.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/DocumentationWriter.java @@ -23,11 +23,11 @@ import org.apache.nifi.components.ConfigurableComponent; /** * Generates documentation for an instance of a ConfigurableComponent - * + * * */ public interface DocumentationWriter { - void write(ConfigurableComponent configurableComponent, OutputStream streamToWriteTo, - boolean includesAdditionalDocumentation) throws IOException; + void write(ConfigurableComponent configurableComponent, OutputStream streamToWriteTo, + boolean includesAdditionalDocumentation) throws IOException; } diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java index c192759b12..b547934d0d 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlDocumentationWriter.java @@ -38,380 +38,354 @@ import org.apache.nifi.documentation.DocumentationWriter; * Generates HTML documentation for a ConfigurableComponent. This class is used * to generate documentation for ControllerService and ReportingTask because * they have no additional information. - * + * * */ public class HtmlDocumentationWriter implements DocumentationWriter { - /** - * The filename where additional user specified information may be stored. - */ - public static final String ADDITIONAL_DETAILS_HTML = "additionalDetails.html"; + /** + * The filename where additional user specified information may be stored. + */ + public static final String ADDITIONAL_DETAILS_HTML = "additionalDetails.html"; - @Override - public void write(final ConfigurableComponent configurableComponent, final OutputStream streamToWriteTo, - final boolean includesAdditionalDocumentation) throws IOException { + @Override + public void write(final ConfigurableComponent configurableComponent, final OutputStream streamToWriteTo, + final boolean includesAdditionalDocumentation) throws IOException { - try { - XMLStreamWriter xmlStreamWriter = XMLOutputFactory.newInstance().createXMLStreamWriter( - streamToWriteTo, "UTF-8"); - xmlStreamWriter.writeDTD(""); - xmlStreamWriter.writeStartElement("html"); - xmlStreamWriter.writeAttribute("lang", "en"); - writeHead(configurableComponent, xmlStreamWriter); - writeBody(configurableComponent, xmlStreamWriter, includesAdditionalDocumentation); - xmlStreamWriter.writeEndElement(); - xmlStreamWriter.close(); - } catch (XMLStreamException | FactoryConfigurationError e) { - throw new IOException("Unable to create XMLOutputStream", e); - } - } + try { + XMLStreamWriter xmlStreamWriter = XMLOutputFactory.newInstance().createXMLStreamWriter( + streamToWriteTo, "UTF-8"); + xmlStreamWriter.writeDTD(""); + xmlStreamWriter.writeStartElement("html"); + xmlStreamWriter.writeAttribute("lang", "en"); + writeHead(configurableComponent, xmlStreamWriter); + writeBody(configurableComponent, xmlStreamWriter, includesAdditionalDocumentation); + xmlStreamWriter.writeEndElement(); + xmlStreamWriter.close(); + } catch (XMLStreamException | FactoryConfigurationError e) { + throw new IOException("Unable to create XMLOutputStream", e); + } + } - /** - * 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 - */ - protected void writeHead(final ConfigurableComponent configurableComponent, - final XMLStreamWriter xmlStreamWriter) throws XMLStreamException { - xmlStreamWriter.writeStartElement("head"); - xmlStreamWriter.writeStartElement("meta"); - xmlStreamWriter.writeAttribute("charset", "utf-8"); - xmlStreamWriter.writeEndElement(); - writeSimpleElement(xmlStreamWriter, "title", getTitle(configurableComponent)); + /** + * 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 + */ + protected void writeHead(final ConfigurableComponent configurableComponent, + final XMLStreamWriter xmlStreamWriter) throws XMLStreamException { + xmlStreamWriter.writeStartElement("head"); + xmlStreamWriter.writeStartElement("meta"); + xmlStreamWriter.writeAttribute("charset", "utf-8"); + xmlStreamWriter.writeEndElement(); + writeSimpleElement(xmlStreamWriter, "title", getTitle(configurableComponent)); - xmlStreamWriter.writeStartElement("link"); - xmlStreamWriter.writeAttribute("rel", "stylesheet"); - xmlStreamWriter.writeAttribute("href", "../../css/component-usage.css"); - xmlStreamWriter.writeAttribute("type", "text/css"); - xmlStreamWriter.writeEndElement(); + xmlStreamWriter.writeStartElement("link"); + xmlStreamWriter.writeAttribute("rel", "stylesheet"); + xmlStreamWriter.writeAttribute("href", "../../css/component-usage.css"); + xmlStreamWriter.writeAttribute("type", "text/css"); + xmlStreamWriter.writeEndElement(); - xmlStreamWriter.writeEndElement(); - } + xmlStreamWriter.writeEndElement(); + } - /** - * Gets the class name of the component. - * - * @param configurableComponent - * the component to describe - * @return the class name of the component - */ - protected String getTitle(final ConfigurableComponent configurableComponent) { - return configurableComponent.getClass().getSimpleName(); - } + /** + * Gets the class name of the component. + * + * @param configurableComponent the component to describe + * @return the class name of the component + */ + protected String getTitle(final ConfigurableComponent configurableComponent) { + return configurableComponent.getClass().getSimpleName(); + } - /** - * Writes the body section of the documentation, this consists of the - * component description, the tags, and the PropertyDescriptors. - * - * @param configurableComponent - * the component to describe - * @param xmlStreamWriter - * the stream writer - * @param hasAdditionalDetails - * whether there are additional details present or not - * @throws XMLStreamException - * thrown if there was a problem writing to the XML stream - */ - private final void writeBody(final ConfigurableComponent configurableComponent, - final XMLStreamWriter xmlStreamWriter, final boolean hasAdditionalDetails) - throws XMLStreamException { - xmlStreamWriter.writeStartElement("body"); - writeDescription(configurableComponent, xmlStreamWriter, hasAdditionalDetails); - writeTags(configurableComponent, xmlStreamWriter); - writeProperties(configurableComponent, xmlStreamWriter); - writeAdditionalBodyInfo(configurableComponent, xmlStreamWriter); - xmlStreamWriter.writeEndElement(); - } + /** + * Writes the body section of the documentation, this consists of the + * component description, the tags, and the PropertyDescriptors. + * + * @param configurableComponent the component to describe + * @param xmlStreamWriter the stream writer + * @param hasAdditionalDetails whether there are additional details present + * or not + * @throws XMLStreamException thrown if there was a problem writing to the + * XML stream + */ + private void writeBody(final ConfigurableComponent configurableComponent, + final XMLStreamWriter xmlStreamWriter, final boolean hasAdditionalDetails) + throws XMLStreamException { + xmlStreamWriter.writeStartElement("body"); + writeDescription(configurableComponent, xmlStreamWriter, hasAdditionalDetails); + writeTags(configurableComponent, xmlStreamWriter); + writeProperties(configurableComponent, xmlStreamWriter); + writeAdditionalBodyInfo(configurableComponent, xmlStreamWriter); + xmlStreamWriter.writeEndElement(); + } - /** - * This method may be overridden by sub classes to write additional - * information to the body of the documentation. - * - * @param configurableComponent - * the component to describe - * @param xmlStreamWriter - * the stream writer - * @throws XMLStreamException - * thrown if there was a problem writing to the XML stream - */ - protected void writeAdditionalBodyInfo(final ConfigurableComponent configurableComponent, - final XMLStreamWriter xmlStreamWriter) throws XMLStreamException { - } + /** + * This method may be overridden by sub classes to write additional + * information to the body of the documentation. + * + * @param configurableComponent the component to describe + * @param xmlStreamWriter the stream writer + * @throws XMLStreamException thrown if there was a problem writing to the + * XML stream + */ + protected void writeAdditionalBodyInfo(final ConfigurableComponent configurableComponent, + final XMLStreamWriter xmlStreamWriter) throws XMLStreamException { + } - /** - * Writes the tags attached to a ConfigurableComponent. - * - * @param configurableComponent - * @param xmlStreamWriter - * @throws XMLStreamException - */ - private void writeTags(final ConfigurableComponent configurableComponent, - final XMLStreamWriter xmlStreamWriter) throws XMLStreamException { - final Tags tags = configurableComponent.getClass().getAnnotation(Tags.class); - xmlStreamWriter.writeStartElement("h3"); - xmlStreamWriter.writeCharacters("Tags: "); - xmlStreamWriter.writeEndElement(); - xmlStreamWriter.writeStartElement("p"); - if (tags != null) { - final String tagString = StringUtils.join(tags.value(), ", "); - xmlStreamWriter.writeCharacters(tagString); - } else { - xmlStreamWriter.writeCharacters("None."); - } - xmlStreamWriter.writeEndElement(); + /** + * Writes the tags attached to a ConfigurableComponent. + * + * @param configurableComponent + * @param xmlStreamWriter + * @throws XMLStreamException + */ + private void writeTags(final ConfigurableComponent configurableComponent, + final XMLStreamWriter xmlStreamWriter) throws XMLStreamException { + final Tags tags = configurableComponent.getClass().getAnnotation(Tags.class); + xmlStreamWriter.writeStartElement("h3"); + xmlStreamWriter.writeCharacters("Tags: "); + xmlStreamWriter.writeEndElement(); + xmlStreamWriter.writeStartElement("p"); + if (tags != null) { + final String tagString = StringUtils.join(tags.value(), ", "); + xmlStreamWriter.writeCharacters(tagString); + } else { + xmlStreamWriter.writeCharacters("None."); + } + xmlStreamWriter.writeEndElement(); - } + } - /** - * Writes a description of the configurable component. - * - * @param configurableComponent - * the component to describe - * @param xmlStreamWriter - * the stream writer - * @param hasAdditionalDetails - * whether there are additional details available as - * 'additionalDetails.html' - * @throws XMLStreamException - * thrown if there was a problem writing to the XML stream - */ - protected void writeDescription(final ConfigurableComponent configurableComponent, - final XMLStreamWriter xmlStreamWriter, final boolean hasAdditionalDetails) - throws XMLStreamException { - writeSimpleElement(xmlStreamWriter, "h2", "Description: "); - writeSimpleElement(xmlStreamWriter, "p", getDescription(configurableComponent)); - if (hasAdditionalDetails) { - xmlStreamWriter.writeStartElement("p"); + /** + * Writes a description of the configurable component. + * + * @param configurableComponent the component to describe + * @param xmlStreamWriter the stream writer + * @param hasAdditionalDetails whether there are additional details + * available as 'additionalDetails.html' + * @throws XMLStreamException thrown if there was a problem writing to the + * XML stream + */ + protected void writeDescription(final ConfigurableComponent configurableComponent, + final XMLStreamWriter xmlStreamWriter, final boolean hasAdditionalDetails) + throws XMLStreamException { + writeSimpleElement(xmlStreamWriter, "h2", "Description: "); + writeSimpleElement(xmlStreamWriter, "p", getDescription(configurableComponent)); + if (hasAdditionalDetails) { + xmlStreamWriter.writeStartElement("p"); - writeLink(xmlStreamWriter, "Additional Details...", ADDITIONAL_DETAILS_HTML); + writeLink(xmlStreamWriter, "Additional Details...", ADDITIONAL_DETAILS_HTML); - xmlStreamWriter.writeEndElement(); - } - } + xmlStreamWriter.writeEndElement(); + } + } - /** - * Gets a description of the ConfigurableComponent using the - * CapabilityDescription annotation. - * - * @param configurableComponent - * the component to describe - * @return a description of the configurableComponent - */ - protected String getDescription(final ConfigurableComponent configurableComponent) { - final CapabilityDescription capabilityDescription = configurableComponent.getClass().getAnnotation( - CapabilityDescription.class); + /** + * Gets a description of the ConfigurableComponent using the + * CapabilityDescription annotation. + * + * @param configurableComponent the component to describe + * @return a description of the configurableComponent + */ + protected String getDescription(final ConfigurableComponent configurableComponent) { + final CapabilityDescription capabilityDescription = configurableComponent.getClass().getAnnotation( + CapabilityDescription.class); - final String description; - if (capabilityDescription != null) { - description = capabilityDescription.value(); - } else { - description = "No description provided."; - } + final String description; + if (capabilityDescription != null) { + description = capabilityDescription.value(); + } else { + description = "No description provided."; + } - return description; - } + return description; + } - /** - * 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 - */ - protected void writeProperties(final ConfigurableComponent configurableComponent, - final XMLStreamWriter xmlStreamWriter) throws XMLStreamException { - writeSimpleElement(xmlStreamWriter, "h3", "Properties: "); - xmlStreamWriter.writeStartElement("p"); - xmlStreamWriter.writeCharacters("In the list below, the names of required properties appear in "); - 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"); - 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 "); - writeSimpleElement(xmlStreamWriter, "strong", "nifi.properties"); - xmlStreamWriter.writeCharacters(" file has " + "an entry for the property "); - writeSimpleElement(xmlStreamWriter, "strong", "nifi.sensitive.props.key"); - xmlStreamWriter.writeCharacters("."); - xmlStreamWriter.writeEndElement(); + /** + * 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 + */ + protected void writeProperties(final ConfigurableComponent configurableComponent, + final XMLStreamWriter xmlStreamWriter) throws XMLStreamException { + writeSimpleElement(xmlStreamWriter, "h3", "Properties: "); + xmlStreamWriter.writeStartElement("p"); + xmlStreamWriter.writeCharacters("In the list below, the names of required properties appear in "); + 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"); + 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 "); + writeSimpleElement(xmlStreamWriter, "strong", "nifi.properties"); + xmlStreamWriter.writeCharacters(" file has " + "an entry for the property "); + writeSimpleElement(xmlStreamWriter, "strong", "nifi.sensitive.props.key"); + xmlStreamWriter.writeCharacters("."); + xmlStreamWriter.writeEndElement(); + List properties = configurableComponent.getPropertyDescriptors(); + if (properties.size() > 0) { + xmlStreamWriter.writeStartElement("table"); - List properties = configurableComponent.getPropertyDescriptors(); - if (properties.size() > 0) { - xmlStreamWriter.writeStartElement("table"); + // write the header row + xmlStreamWriter.writeStartElement("tr"); + writeSimpleElement(xmlStreamWriter, "th", "Name"); + writeSimpleElement(xmlStreamWriter, "th", "Default Value"); + writeSimpleElement(xmlStreamWriter, "th", "Valid Values"); + writeSimpleElement(xmlStreamWriter, "th", "Description"); + xmlStreamWriter.writeEndElement(); - // write the header row - xmlStreamWriter.writeStartElement("tr"); - writeSimpleElement(xmlStreamWriter, "th", "Name"); - writeSimpleElement(xmlStreamWriter, "th", "Default Value"); - writeSimpleElement(xmlStreamWriter, "th", "Valid Values"); - writeSimpleElement(xmlStreamWriter, "th", "Description"); - xmlStreamWriter.writeEndElement(); + // write the individual properties + for (PropertyDescriptor property : properties) { + xmlStreamWriter.writeStartElement("tr"); + xmlStreamWriter.writeStartElement("td"); + if (property.isRequired()) { + writeSimpleElement(xmlStreamWriter, "strong", property.getDisplayName()); + } else { + xmlStreamWriter.writeCharacters(property.getDisplayName()); + } - // write the individual properties - for (PropertyDescriptor property : properties) { - xmlStreamWriter.writeStartElement("tr"); - xmlStreamWriter.writeStartElement("td"); - if (property.isRequired()) { - writeSimpleElement(xmlStreamWriter, "strong", property.getDisplayName()); - } else { - xmlStreamWriter.writeCharacters(property.getDisplayName()); - } + xmlStreamWriter.writeEndElement(); + writeSimpleElement(xmlStreamWriter, "td", property.getDefaultValue()); + xmlStreamWriter.writeStartElement("td"); + writeValidValues(xmlStreamWriter, property); + xmlStreamWriter.writeEndElement(); + xmlStreamWriter.writeStartElement("td"); + if (property.getDescription() != null && property.getDescription().trim().length() > 0) { + xmlStreamWriter.writeCharacters(property.getDescription()); + } else { + xmlStreamWriter.writeCharacters("No Description Provided."); + } - xmlStreamWriter.writeEndElement(); - writeSimpleElement(xmlStreamWriter, "td", property.getDefaultValue()); - xmlStreamWriter.writeStartElement("td"); - writeValidValues(xmlStreamWriter, property); - xmlStreamWriter.writeEndElement(); - xmlStreamWriter.writeStartElement("td"); - if (property.getDescription() != null && property.getDescription().trim().length() > 0) { - xmlStreamWriter.writeCharacters(property.getDescription()); - } else { - xmlStreamWriter.writeCharacters("No Description Provided."); - } + if (property.isSensitive()) { + xmlStreamWriter.writeEmptyElement("br"); + writeSimpleElement(xmlStreamWriter, "strong", "Sensitive Property: true"); + } - if (property.isSensitive()) { - xmlStreamWriter.writeEmptyElement("br"); - writeSimpleElement(xmlStreamWriter, "strong", "Sensitive Property: true"); - } + if (property.isExpressionLanguageSupported()) { + xmlStreamWriter.writeEmptyElement("br"); + writeSimpleElement(xmlStreamWriter, "strong", "Supports Expression Language: true"); + } + xmlStreamWriter.writeEndElement(); - if (property.isExpressionLanguageSupported()) { - xmlStreamWriter.writeEmptyElement("br"); - writeSimpleElement(xmlStreamWriter, "strong", "Supports Expression Language: true"); - } - xmlStreamWriter.writeEndElement(); + xmlStreamWriter.writeEndElement(); + } - xmlStreamWriter.writeEndElement(); - } + // TODO support dynamic properties... + xmlStreamWriter.writeEndElement(); - // TODO support dynamic properties... - xmlStreamWriter.writeEndElement(); + } else { + writeSimpleElement(xmlStreamWriter, "p", "This component has no required or optional properties."); + } + } - } else { - writeSimpleElement(xmlStreamWriter, "p", "This component has no required or optional properties."); - } - } + private void writeValidValueDescription(XMLStreamWriter xmlStreamWriter, String description) + throws XMLStreamException { + xmlStreamWriter.writeCharacters(" "); + xmlStreamWriter.writeStartElement("img"); + xmlStreamWriter.writeAttribute("src", "../../html/images/iconInfo.png"); + xmlStreamWriter.writeAttribute("alt", description); + xmlStreamWriter.writeAttribute("title", description); + xmlStreamWriter.writeEndElement(); - private void writeValidValueDescription(XMLStreamWriter xmlStreamWriter, String description) - throws XMLStreamException { - xmlStreamWriter.writeCharacters(" "); - xmlStreamWriter.writeStartElement("img"); - xmlStreamWriter.writeAttribute("src", "../../html/images/iconInfo.png"); - xmlStreamWriter.writeAttribute("alt", description); - xmlStreamWriter.writeAttribute("title", description); - xmlStreamWriter.writeEndElement(); + } - } + /** + * Interrogates a PropertyDescriptor to get a list of AllowableValues, if + * 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 + */ + protected void writeValidValues(XMLStreamWriter xmlStreamWriter, PropertyDescriptor property) + throws XMLStreamException { + if (property.getAllowableValues() != null && property.getAllowableValues().size() > 0) { + xmlStreamWriter.writeStartElement("ul"); + for (AllowableValue value : property.getAllowableValues()) { + xmlStreamWriter.writeStartElement("li"); + xmlStreamWriter.writeCharacters(value.getDisplayName()); - /** - * Interrogates a PropertyDescriptor to get a list of AllowableValues, if - * 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 - */ - protected void writeValidValues(XMLStreamWriter xmlStreamWriter, PropertyDescriptor property) - throws XMLStreamException { - if (property.getAllowableValues() != null && property.getAllowableValues().size() > 0) { - xmlStreamWriter.writeStartElement("ul"); - for (AllowableValue value : property.getAllowableValues()) { - xmlStreamWriter.writeStartElement("li"); - xmlStreamWriter.writeCharacters(value.getDisplayName()); + if (value.getDescription() != null) { + writeValidValueDescription(xmlStreamWriter, value.getDescription()); + } + xmlStreamWriter.writeEndElement(); - if (value.getDescription() != null) { - writeValidValueDescription(xmlStreamWriter, value.getDescription()); - } - xmlStreamWriter.writeEndElement(); + } + xmlStreamWriter.writeEndElement(); + } else if (property.getControllerServiceDefinition() != null) { + Class controllerServiceClass = property.getControllerServiceDefinition(); + writeSimpleElement(xmlStreamWriter, "strong", "Controller Service: "); + xmlStreamWriter.writeEmptyElement("br"); + xmlStreamWriter.writeCharacters(controllerServiceClass.getSimpleName()); + } + } - } - xmlStreamWriter.writeEndElement(); - } else if (property.getControllerServiceDefinition() != null) { - Class controllerServiceClass = property.getControllerServiceDefinition(); - writeSimpleElement(xmlStreamWriter, "strong", "Controller Service: "); - xmlStreamWriter.writeEmptyElement("br"); - xmlStreamWriter.writeCharacters(controllerServiceClass.getSimpleName()); - } - } + /** + * Writes a begin element, then text, then end element for the element of a + * users choosing. Example: <p>text</p> + * + * @param writer the stream writer to use + * @param elementName the name of the element + * @param characters the characters to insert into the element + * @param strong whether the characters should be strong or not. + * @throws XMLStreamException 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 { + writer.writeStartElement(elementName); + if (strong) { + writer.writeStartElement("strong"); + } + writer.writeCharacters(characters); + if (strong) { + writer.writeEndElement(); + } + writer.writeEndElement(); + } - /** - * Writes a begin element, then text, then end element for the element of a - * users choosing. Example: <p>text</p> - * - * @param writer - * the stream writer to use - * @param elementName - * the name of the element - * @param characters - * the characters to insert into the element - * @param strong - * whether the characters should be strong or not. - * @throws XMLStreamException - * 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 { - writer.writeStartElement(elementName); - if (strong) { - writer.writeStartElement("strong"); - } - writer.writeCharacters(characters); - if (strong) { - writer.writeEndElement(); - } - writer.writeEndElement(); - } + /** + * Writes a begin element, then text, then end element for the element of a + * users choosing. Example: <p>text</p> + * + * @param writer the stream writer to use + * @param elementName the name of the element + * @param characters the characters to insert into the element + * @throws XMLStreamException 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 { + writeSimpleElement(writer, elementName, characters, false); + } - /** - * Writes a begin element, then text, then end element for the element of a - * users choosing. Example: <p>text</p> - * - * @param writer - * the stream writer to use - * @param elementName - * the name of the element - * @param characters - * the characters to insert into the element - * @throws XMLStreamException - * 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 { - writeSimpleElement(writer, elementName, characters, false); - } - - /** - * A helper method to write a link - * - * @param xmlStreamWriter - * the stream to write to - * @param text - * the text of the link - * @param location - * the location of the link - * @throws XMLStreamException - * thrown if there was a problem writing to the stream - */ - protected void writeLink(final XMLStreamWriter xmlStreamWriter, final String text, final String location) - throws XMLStreamException { - xmlStreamWriter.writeStartElement("a"); - xmlStreamWriter.writeAttribute("href", location); - xmlStreamWriter.writeCharacters(text); - xmlStreamWriter.writeEndElement(); - } + /** + * A helper method to write a link + * + * @param xmlStreamWriter the stream to write to + * @param text the text of the link + * @param location the location of the link + * @throws XMLStreamException thrown if there was a problem writing to the + * stream + */ + protected void writeLink(final XMLStreamWriter xmlStreamWriter, final String text, final String location) + throws XMLStreamException { + xmlStreamWriter.writeStartElement("a"); + xmlStreamWriter.writeAttribute("href", location); + xmlStreamWriter.writeCharacters(text); + xmlStreamWriter.writeEndElement(); + } } diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlProcessorDocumentationWriter.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlProcessorDocumentationWriter.java index 4cf6ba850e..412ebf6d43 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlProcessorDocumentationWriter.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/html/HtmlProcessorDocumentationWriter.java @@ -26,33 +26,33 @@ import org.apache.nifi.processor.Relationship; /** * Writes documentation specific for a Processor. This includes everything for a * ConfigurableComponent as well as Relationship information. - * + * * */ public class HtmlProcessorDocumentationWriter extends HtmlDocumentationWriter { - @Override - protected void writeAdditionalBodyInfo(final ConfigurableComponent configurableComponent, - final XMLStreamWriter xmlStreamWriter) throws XMLStreamException { - final Processor processor = (Processor) configurableComponent; - writeSimpleElement(xmlStreamWriter, "h3", "Relationships: "); + @Override + protected void writeAdditionalBodyInfo(final ConfigurableComponent configurableComponent, + final XMLStreamWriter xmlStreamWriter) throws XMLStreamException { + final Processor processor = (Processor) configurableComponent; + writeSimpleElement(xmlStreamWriter, "h3", "Relationships: "); - if (processor.getRelationships().size() > 0) { - xmlStreamWriter.writeStartElement("table"); - xmlStreamWriter.writeStartElement("tr"); - writeSimpleElement(xmlStreamWriter, "th", "Name"); - writeSimpleElement(xmlStreamWriter, "th", "Description"); - xmlStreamWriter.writeEndElement(); + if (processor.getRelationships().size() > 0) { + xmlStreamWriter.writeStartElement("table"); + xmlStreamWriter.writeStartElement("tr"); + writeSimpleElement(xmlStreamWriter, "th", "Name"); + writeSimpleElement(xmlStreamWriter, "th", "Description"); + xmlStreamWriter.writeEndElement(); - for (Relationship relationship : processor.getRelationships()) { - xmlStreamWriter.writeStartElement("tr"); - writeSimpleElement(xmlStreamWriter, "td", relationship.getName()); - writeSimpleElement(xmlStreamWriter, "td", relationship.getDescription()); - xmlStreamWriter.writeEndElement(); - } - xmlStreamWriter.writeEndElement(); - } else { - xmlStreamWriter.writeCharacters("This processor has no relationships."); - } - } + for (Relationship relationship : processor.getRelationships()) { + xmlStreamWriter.writeStartElement("tr"); + writeSimpleElement(xmlStreamWriter, "td", relationship.getName()); + writeSimpleElement(xmlStreamWriter, "td", relationship.getDescription()); + xmlStreamWriter.writeEndElement(); + } + xmlStreamWriter.writeEndElement(); + } else { + xmlStreamWriter.writeCharacters("This processor has no relationships."); + } + } } diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/init/ControllerServiceInitializer.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/init/ControllerServiceInitializer.java index 123a39c81d..3c66485923 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/init/ControllerServiceInitializer.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/init/ControllerServiceInitializer.java @@ -25,14 +25,14 @@ import org.apache.nifi.reporting.InitializationException; /** * Initializes a ControllerService using a * MockControllerServiceInitializationContext - * + * * */ public class ControllerServiceInitializer implements ConfigurableComponentInitializer { - @Override - public void initialize(ConfigurableComponent component) throws InitializationException { - ControllerService controllerService = (ControllerService) component; - controllerService.initialize(new MockControllerServiceInitializationContext()); - } + @Override + public void initialize(ConfigurableComponent component) throws InitializationException { + ControllerService controllerService = (ControllerService) component; + controllerService.initialize(new MockControllerServiceInitializationContext()); + } } diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/init/ProcessorInitializer.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/init/ProcessorInitializer.java index a33f7b9acc..07e9c3ab8f 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/init/ProcessorInitializer.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/init/ProcessorInitializer.java @@ -23,15 +23,15 @@ import org.apache.nifi.processor.Processor; /** * Initializes a Procesor using a MockProcessorInitializationContext - * + * * */ public class ProcessorInitializer implements ConfigurableComponentInitializer { - @Override - public void initialize(ConfigurableComponent component) { - Processor processor = (Processor) component; - processor.initialize(new MockProcessorInitializationContext()); - } + @Override + public void initialize(ConfigurableComponent component) { + Processor processor = (Processor) component; + processor.initialize(new MockProcessorInitializationContext()); + } } diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/init/ReportingTaskingInitializer.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/init/ReportingTaskingInitializer.java index ff915cfa0b..6fcfca91da 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/init/ReportingTaskingInitializer.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/init/ReportingTaskingInitializer.java @@ -24,14 +24,14 @@ import org.apache.nifi.reporting.ReportingTask; /** * Initializes a ReportingTask using a MockReportingInitializationContext; - * + * * */ public class ReportingTaskingInitializer implements ConfigurableComponentInitializer { - @Override - public void initialize(ConfigurableComponent component) throws InitializationException { - ReportingTask reportingTask = (ReportingTask) component; - reportingTask.initialize(new MockReportingInitializationContext()); - } + @Override + public void initialize(ConfigurableComponent component) throws InitializationException { + ReportingTask reportingTask = (ReportingTask) component; + reportingTask.initialize(new MockReportingInitializationContext()); + } } diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockControllerServiceInitializationContext.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockControllerServiceInitializationContext.java index 6153a8effe..fcd3ea340f 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockControllerServiceInitializationContext.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockControllerServiceInitializationContext.java @@ -22,19 +22,19 @@ import org.apache.nifi.controller.ControllerServiceLookup; /** * A Mock ControllerServiceInitializationContext so that ControllerServices can * be initialized for the purpose of generating documentation. - * + * * */ public class MockControllerServiceInitializationContext implements ControllerServiceInitializationContext { - @Override - public String getIdentifier() { - return ""; - } + @Override + public String getIdentifier() { + return ""; + } - @Override - public ControllerServiceLookup getControllerServiceLookup() { - return new MockControllerServiceLookup(); - } + @Override + public ControllerServiceLookup getControllerServiceLookup() { + return new MockControllerServiceLookup(); + } } diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockControllerServiceLookup.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockControllerServiceLookup.java index 88d091155e..f11bc6874e 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockControllerServiceLookup.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockControllerServiceLookup.java @@ -26,30 +26,30 @@ import org.apache.nifi.controller.ControllerServiceLookup; * A Mock ControllerServiceLookup that can be used so that * ConfigurableComponents can be initialized for the purpose of generating * documentation - * + * * */ public class MockControllerServiceLookup implements ControllerServiceLookup { - @Override - public ControllerService getControllerService(String serviceIdentifier) { - return null; - } + @Override + public ControllerService getControllerService(String serviceIdentifier) { + return null; + } - @Override - public boolean isControllerServiceEnabled(String serviceIdentifier) { - return false; - } + @Override + public boolean isControllerServiceEnabled(String serviceIdentifier) { + return false; + } - @Override - public boolean isControllerServiceEnabled(ControllerService service) { - return false; - } + @Override + public boolean isControllerServiceEnabled(ControllerService service) { + return false; + } - @Override - public Set getControllerServiceIdentifiers(Class serviceType) - throws IllegalArgumentException { - return Collections.emptySet(); - } + @Override + public Set getControllerServiceIdentifiers(Class serviceType) + throws IllegalArgumentException { + return Collections.emptySet(); + } } diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockProcessorInitializationContext.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockProcessorInitializationContext.java index 48ffecb1ce..d77d7dde0f 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockProcessorInitializationContext.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockProcessorInitializationContext.java @@ -23,23 +23,23 @@ import org.apache.nifi.processor.ProcessorInitializationContext; /** * A Mock ProcessorInitializationContext that can be used so that Processors can * be initialized for the purpose of generating documentation. - * + * * */ public class MockProcessorInitializationContext implements ProcessorInitializationContext { - @Override - public String getIdentifier() { - return ""; - } + @Override + public String getIdentifier() { + return ""; + } - @Override - public ProcessorLog getLogger() { - return null; - } + @Override + public ProcessorLog getLogger() { + return null; + } - @Override - public ControllerServiceLookup getControllerServiceLookup() { - return new MockControllerServiceLookup(); - } + @Override + public ControllerServiceLookup getControllerServiceLookup() { + return new MockControllerServiceLookup(); + } } diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockReportingInitializationContext.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockReportingInitializationContext.java index 9782077bc9..910ce5a5e2 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockReportingInitializationContext.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/mock/MockReportingInitializationContext.java @@ -25,39 +25,39 @@ import org.apache.nifi.scheduling.SchedulingStrategy; /** * A Mock ReportingInitializationContext that can be used to initialize a * ReportingTask for the purposes of documentation generation. - * + * * @author Alligator * */ public class MockReportingInitializationContext implements ReportingInitializationContext { - @Override - public String getIdentifier() { - return ""; - } + @Override + public String getIdentifier() { + return ""; + } - @Override - public String getName() { - return ""; - } + @Override + public String getName() { + return ""; + } - @Override - public long getSchedulingPeriod(TimeUnit timeUnit) { - return 0; - } + @Override + public long getSchedulingPeriod(TimeUnit timeUnit) { + return 0; + } - @Override - public ControllerServiceLookup getControllerServiceLookup() { - return new MockControllerServiceLookup(); - } + @Override + public ControllerServiceLookup getControllerServiceLookup() { + return new MockControllerServiceLookup(); + } - @Override - public String getSchedulingPeriod() { - return ""; - } + @Override + public String getSchedulingPeriod() { + return ""; + } - @Override - public SchedulingStrategy getSchedulingStrategy() { - return SchedulingStrategy.TIMER_DRIVEN; - } + @Override + public SchedulingStrategy getSchedulingStrategy() { + return SchedulingStrategy.TIMER_DRIVEN; + } } diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/example/NakedProcessor.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/example/NakedProcessor.java index 6fce1e1386..ee7f315931 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/example/NakedProcessor.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/example/NakedProcessor.java @@ -1,3 +1,19 @@ +/* + * 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. + */ package org.apache.nifi.documentation.example; import org.apache.nifi.processor.AbstractProcessor; @@ -9,7 +25,6 @@ public class NakedProcessor extends AbstractProcessor { @Override public void onTrigger(ProcessContext arg0, ProcessSession arg1) throws ProcessException { - // TODO Auto-generated method stub } diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/pom.xml b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/pom.xml index b0ed5c1969..c0b4ab9af0 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/pom.xml @@ -39,7 +39,7 @@ nifi-administration nifi-web nifi-resources - nifi-documentation + nifi-documentation diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/pom.xml b/nifi/nifi-nar-bundles/nifi-framework-bundle/pom.xml index 4c07d7562c..074821a7fb 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/pom.xml @@ -111,7 +111,7 @@ org.apache.nifi nifi-documentation - 0.0.2-incubating-SNAPSHOT + 0.1.0-incubating-SNAPSHOT diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/DistributeLoad.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/DistributeLoad.java index 8fb8ad485d..c78251c5b4 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/DistributeLoad.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/DistributeLoad.java @@ -151,7 +151,7 @@ public class DistributeLoad extends AbstractProcessor { } private static Relationship createRelationship(final int num) { - return new Relationship.Builder().name(String.valueOf(num)).build(); + return new Relationship.Builder().name(String.valueOf(num)).description("Where to route flowfiles for this relationship index").build(); } @Override diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpRequest.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpRequest.java index 575bf95027..4386100515 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpRequest.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpRequest.java @@ -79,9 +79,9 @@ public class HandleHttpRequest extends AbstractProcessor { private static final Pattern URL_QUERY_PARAM_DELIMITER = Pattern.compile("&"); // Allowable values for client auth - public static final AllowableValue CLIENT_NONE = new AllowableValue("No Authentication", "Processor will not authenticate clients. Anyone can communicate with this Processor anonymously"); - public static final AllowableValue CLIENT_WANT = new AllowableValue("Want Authentication", "Processor will try to verify the client but if unable to verify will allow the client to communicate anonymously"); - public static final AllowableValue CLIENT_NEED = new AllowableValue("Need Authentication", "Processor will reject communications from any client unless the client provides a certificate that is trusted by the TrustStore specified in the SSL Context Service"); + public static final AllowableValue CLIENT_NONE = new AllowableValue("No Authentication", "No Authentication", "Processor will not authenticate clients. Anyone can communicate with this Processor anonymously"); + public static final AllowableValue CLIENT_WANT = new AllowableValue("Want Authentication", "Want Authentication", "Processor will try to verify the client but if unable to verify will allow the client to communicate anonymously"); + public static final AllowableValue CLIENT_NEED = new AllowableValue("Need Authentication", "Need Authentication", "Processor will reject communications from any client unless the client provides a certificate that is trusted by the TrustStore specified in the SSL Context Service"); public static final PropertyDescriptor PORT = new PropertyDescriptor.Builder() @@ -208,6 +208,7 @@ public class HandleHttpRequest extends AbstractProcessor { descriptors.add(ALLOW_HEAD); descriptors.add(ALLOW_OPTIONS); descriptors.add(ADDITIONAL_METHODS); + descriptors.add(CLIENT_AUTH); return descriptors; } diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.DistributeLoad/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.DistributeLoad/additionalDetails.html index 0c16e4fc7f..f593bed4b4 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.DistributeLoad/additionalDetails.html +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.DistributeLoad/additionalDetails.html @@ -22,39 +22,19 @@ -

Description:

-

This processor distributes FlowFiles to downstream - processors based on a distribution strategy. The user may select the strategy "round robin", the - strategy "next available", or "load distribution service". If using the round robin - strategy, the default is to assign each destination (i.e., relationship) a weighting of 1 - (evenly distributed). However, the user may add optional properties to change this weighting. When - adding a property, the name must be a positive integer between 1 and the number of relationships (inclusive). - For example, if Number of Relationships has a value of 8 and a property is added with the name 5 - and the value 10, then relationship 5 (among the 8) will receive 10 - FlowFiles in each iteration instead of 1. All other relationships will receive 1 FlowFile in each iteration. -

- Properties: -

In the list below, the names of required properties appear - in bold. Any other properties (not in bold) are considered optional. - If a property has a default value, it is indicated. If a property - supports the use of the NiFi Expression Language (or simply, - "expression language"), that is also indicated.

- -

- Relationships: -

-
    -
  • 1 -
      -
    • By default, there is one relationship, named 1. The number - of relationships is determined by the value of the <Number of - Relationships> property.
    • -
    -
  • -
+ Relationships +
    +
  • 1 +
      +
    • By default, there is one relationship, named 1. The number + of relationships is determined by the value of the <Number of + Relationships> property.
    • +
    +
  • +
- + diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.EvaluateJsonPath/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.EvaluateJsonPath/additionalDetails.html new file mode 100644 index 0000000000..c1d80aa43d --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.EvaluateJsonPath/additionalDetails.html @@ -0,0 +1,58 @@ + + + + + + EvaluateJsonPath + + + + + +

+ Note: The underlying JsonPath library loads the entirety of the streamed content into and performs + result evaluations in memory. Accordingly, it is important to consider the anticipated profile of content being + evaluated by this processor and the hardware supporting it especially when working against large JSON documents. +

+ +

+ Modifies Attributes: +

+ +

+ This processor adds user-defined attributes if the <Destination> property is set to + flowfile-attribute. +

+ + +

+ Properties +

+
    +
  • + user-defined properties +
      +
    • The name of the attribute to put the JsonPath result into if + flowfile-attribute is used as the value for the Destination + property; if using flowfile-content as the value for the + Destination property, this value is ignored. +
    • +
    • Supports expression language: false
    • +
    +
  • +
+ + diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.EvaluateJsonPath/index.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.EvaluateJsonPath/index.html deleted file mode 100644 index 82f9614a37..0000000000 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.EvaluateJsonPath/index.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - EvaluateJsonPath - - - - - -

Description:

- -

- Evaluates one or more JsonPath expressions against the content of a FlowFile. The results of those expressions are - assigned to FlowFile Attributes or are written to the content of the FlowFile itself, depending on configuration of - the Processor. JsonPaths are entered by adding user-defined properties; the name of the property maps to the - Attribute Name into which the result will be placed (if the Destination is flowfile-attribute; otherwise, the - property name is ignored). The value of the property must be a valid JsonPath expression. If the JsonPath evaluates - to a JSON array or JSON object and the Return Type is set to 'scalar' the FlowFile will be unmodified and will be - routed to failure. A Return Type of JSON can return scalar values if the provided JsonPath evaluates to the - specified value and will be routed as a match. If Destination is 'flowfile-content' and the JsonPath does not - evaluate to a defined path, the FlowFile will be routed to 'unmatched' without having its contents modified. If - Destination is flowfile-attribute and the expression matches nothing, attributes will be created with empty - strings as the value, and the FlowFile will always be routed to 'matched.' -

- -

- Note: The underlying JsonPath library loads the entirety of the streamed content into and performs - result evaluations in memory. Accordingly, it is important to consider the anticipated profile of content being - evaluated by this processor and the hardware supporting it especially when working against large JSON documents. -

- -

- Properties: -

- -

- In the list below, the names of required properties appear in bold. - Any other properties (not in bold) are considered optional. If a - property has a default value, it is indicated. If a property - supports the use of the NiFi Expression Language (or simply, - "expression language"), that is also indicated. -

- -

- Modifies Attributes: -

- -

- This processor adds user-defined attributes if the <Destination> property is set to - flowfile-attribute. -

- - -
    -
  • - Destination -
      -
    • Indicates whether the results of the JsonPath evaluation are - written to the FlowFile content or a FlowFile attribute; if using - attribute, the attribute's name must be specified in the value of - the Attribute Name property. -
    • -
    • - Valid values are: -
        -
      • flowfile-content
      • -
      • flowfile-attribute
      • -
      -
    • -
    • Default value: flowfile-content
    • -
    • Supports expression language: false
    • -
    -
  • -
  • - Return Type -
      -
    • Indicates the desired return type of the JsonPath expressions. - Selecting 'auto-detect' will set the return type to 'json' for a - Destination of 'flowfile-content', and 'scalar' for a Destination of - 'flowfile-attribute'.") -
    • -
    • - Valid values are: -
        -
      • auto-detect
      • -
      • json
      • -
      • scalar
      • -
      -
    • -
    • Default value: auto-detect
    • -
    • Supports expression language: false
    • -
    -
  • -
  • - user-defined properties -
      -
    • The name of the attribute to put the JsonPath result into if - flowfile-attribute is used as the value for the Destination - property; if using flowfile-content as the value for the - Destination property, this value is ignored. -
    • -
    • Supports expression language: false
    • -
    -
  • -
- -

- Relationships: -

-
    -
  • - failure -
      -
    • If the JsonPath cannot be evaluated against the content of the - FlowFile, then the FlowFile follows this relationship. For - example, if the FlowFile does not contain valid JSON. -
    • -
    -
  • -
  • - matched -
      -
    • If the JsonPath is successfully evaluated and the FlowFile is - modified as a result, then the FlowFile follows this - relationship. -
    • -
    -
  • -
  • - unmatched -
      -
    • If the JsonPath does not match the content of the FlowFile, then - the FlowFile follows this relationship. -
    • -
    -
  • -
-

- - diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.EvaluateXQuery/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.EvaluateXQuery/additionalDetails.html index 3d120a45b7..ae9e6ff3f7 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.EvaluateXQuery/additionalDetails.html +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.EvaluateXQuery/additionalDetails.html @@ -1,55 +1,55 @@ - - - -EvaluateXQuery - - + + + EvaluateXQuery + + - + - + -

- Modifies Attributes: -

+

+ Modifies Attributes: +

-

- This processor adds user-defined attributes if the <Destination> - property is set to - flowfile-attribute - . -

+

+ This processor adds user-defined attributes if the <Destination> + property is set to + flowfile-attribute + . +

-

- Examples: -

+

+ Examples: +

-

This processor produces one attribute or FlowFile per - XQueryResult. If only one attribute or FlowFile is desired, the - following examples demonstrate how this can be achieved using the - XQuery language. The examples below reference the following sample - XML:

+

This processor produces one attribute or FlowFile per + XQueryResult. If only one attribute or FlowFile is desired, the + following examples demonstrate how this can be achieved using the + XQuery language. The examples below reference the following sample + XML:

-
+        
 		
   <?xml version="1.0" encoding="UTF-8"?>
   <?xml-stylesheet type="text/xsl" href="foo.xsl"?>
@@ -85,77 +85,77 @@
     </fruit>
   </ns:fruitbasket>
 
-	
+
-

-

    -
  • XQuery to return all "fruit" nodes individually (7 Results): -
      -
    • //fruit
    • -
    -
  • -
  • XQuery to return only the first "fruit" node (1 Result): -
      -
    • //fruit[1]
    • -
    -
  • -
  • XQuery to return only the last "fruit" node (1 Result): -
      -
    • //fruit[count(//fruit)]
    • -
    -
  • -
  • XQuery to return all "fruit" nodes, wrapped in a "basket" tag - (1 Result): -
      -
    • <basket>{//fruit}</basket>
    • -
    -
  • -
  • XQuery to return all "fruit" names individually (7 Results): -
      -
    • //fruit/text()
    • -
    -
  • -
  • XQuery to return only the first "fruit" name (1 Result): -
      -
    • //fruit[1]/text()
    • -
    -
  • -
  • XQuery to return only the last "fruit" name (1 Result): -
      -
    • //fruit[count(//fruit)]/text()
    • -
    -
  • -
  • XQuery to return all "fruit" names as a comma separated list - (1 Result): -
      -
    • string-join((for $x in //fruit return $x/name/text()), ', - ')
    • -
    -
  • -
  • XQuery to return all "fruit" colors and names as a comma - separated list (1 Result): -
      -
    • string-join((for $y in (for $x in //fruit return - string-join(($x/color/text() , $x/name/text()), ' ')) return $y), - ', ')
    • -
    -
  • -
  • XQuery to return all "fruit" colors and names as a comma - separated list (1 Result): -
      -
    • string-join((for $y in (for $x in //fruit return - string-join(($x/color/text() , $x/name/text()), ' ')) return $y), - ', ')
    • -
    -
  • -
  • XQuery to return all "fruit" colors and names as a new line - separated list (1 Result): -
      -
    • string-join((for $y in (for $x in //fruit return - string-join(($x/color/text() , $x/name/text()), ' ')) return $y), - '\n')
    • -
    -
  • -
- +

+

    +
  • XQuery to return all "fruit" nodes individually (7 Results): +
      +
    • //fruit
    • +
    +
  • +
  • XQuery to return only the first "fruit" node (1 Result): +
      +
    • //fruit[1]
    • +
    +
  • +
  • XQuery to return only the last "fruit" node (1 Result): +
      +
    • //fruit[count(//fruit)]
    • +
    +
  • +
  • XQuery to return all "fruit" nodes, wrapped in a "basket" tag + (1 Result): +
      +
    • <basket>{//fruit}</basket>
    • +
    +
  • +
  • XQuery to return all "fruit" names individually (7 Results): +
      +
    • //fruit/text()
    • +
    +
  • +
  • XQuery to return only the first "fruit" name (1 Result): +
      +
    • //fruit[1]/text()
    • +
    +
  • +
  • XQuery to return only the last "fruit" name (1 Result): +
      +
    • //fruit[count(//fruit)]/text()
    • +
    +
  • +
  • XQuery to return all "fruit" names as a comma separated list + (1 Result): +
      +
    • string-join((for $x in //fruit return $x/name/text()), ', + ')
    • +
    +
  • +
  • XQuery to return all "fruit" colors and names as a comma + separated list (1 Result): +
      +
    • string-join((for $y in (for $x in //fruit return + string-join(($x/color/text() , $x/name/text()), ' ')) return $y), + ', ')
    • +
    +
  • +
  • XQuery to return all "fruit" colors and names as a comma + separated list (1 Result): +
      +
    • string-join((for $y in (for $x in //fruit return + string-join(($x/color/text() , $x/name/text()), ' ')) return $y), + ', ')
    • +
    +
  • +
  • XQuery to return all "fruit" colors and names as a new line + separated list (1 Result): +
      +
    • string-join((for $y in (for $x in //fruit return + string-join(($x/color/text() , $x/name/text()), ' ')) return $y), + '\n')
    • +
    +
  • +
+ diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.ExecuteProcess/index.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.ExecuteProcess/index.html deleted file mode 100644 index 3526cd1526..0000000000 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.ExecuteProcess/index.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - ExecuteProcess - - - - - - -

Description:

-

- Runs an operating system command specified by the user and writes the output of that command to a FlowFile. If the command is expected - to be long-running, the Processor can output the partial data on a specified interval. When this option is used, the output is expected to be in textual - format, as it typically does not make sense to split binary data on arbitrary time-based intervals. -

- -

- Properties: -

-

In the list below, the names of required properties appear - in bold. Any other properties (not in bold) are considered optional. - If a property has a default value, it is indicated. If a property - supports the use of the NiFi Expression Language (or simply, - "expression language"), that is also indicated.

-
    -
  • Command -
      -
    • Specifies the command to be executed; if just the name of an executable is provided, it must be in the user's environment PATH.
    • -
    • Default value: none
    • -
    • Supports expression language: false
    • -
    -
  • -
  • Command Arguments -
      -
    • The arguments to supply to the executable delimited by white space. White space can be escaped by enclosing it in double-quotes.
    • -
    • Default value: none
    • -
    • Supports expression language: false
    • -
    -
  • -
  • Working Directory -
      -
    • The directory to use as the current working directory when executing the command
    • -
    • Default value: none (which means whatever NiFi's root installation directory is)
    • -
    • Supports expression language: false
    • -
    -
  • -
  • Batch Duration -
      -
    • - If the process is expected to be long-running and produce textual output, a batch duration can be specified so - that the output will be captured for this amount of time and a FlowFile will then be sent out with the results - and a new FlowFile will be started, rather than waiting for the process to finish before sending out the results. - If no value is provided, the process will run to completion and the entire output of the process will be written - to a single FlowFile. -
    • -
    • Default value: none
    • -
    • Supports expression language: false
    • -
    -
  • -
  • Redirect Error Stream -
      -
    • - If true will redirect any error stream output of the process to the output stream. - This is particularly helpful for processes which write extensively to the error stream or for troubleshooting. -
    • -
    • Default value: false
    • -
    • Allowed Values: true, false
    • -
    • Supports expression language: false
    • -
    -
  • -
- -

- Relationships: -

-
    -
  • success -
      -
    • All FlowFiles that are created are routed to this relationship.
    • -
    -
  • -
- - diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpRequest/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpRequest/additionalDetails.html new file mode 100644 index 0000000000..17378fb3cc --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpRequest/additionalDetails.html @@ -0,0 +1,127 @@ + + + + + + HandleHttpRequest + + + + +

Usage Description

+

+ The pairing of this Processor with a HandleHttpResponse Processor + provides the ability to use NiFi to visually construct a web server that can carry out any functionality that is available + through the existing Processors. For example, one could construct a Web-based front end to an SFTP Server by constructing a + flow such as: +

+ +

+ HandleHttpRequest -> + PutSFTP -> + HandleHttpResponse +

+ +

+ The HandleHttpRequest Processor provides several Properties to configure which methods are supported, the paths that are + supported, and SSL configuration. The FlowFiles that are generated by this Processor have the following attributes added to + them, providing powerful routing capabilities and traceability of all data: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Attribute NameAttribute Description
http.context.identifierAn identifier that allows the HandleHttpRequest and HandleHttpResponse to coordinate which FlowFile belongs + to which HTTP Request/Response.
mime.typeThe MIME Type of the data, according to the HTTP Header "Content-Type"
http.servlet.pathThe part of the request URL that is considered the Servlet Path
http.context.pathThe part of the request URL that is considered to be the Context Path
http.methodThe HTTP Method that was used for the request, such as GET or POST
http.query.stringThe query string portion of hte Request URL
http.remote.hostThe hostname of the requestor
http.remote.addrThe hostname:port combination of the requestor
http.remote.userThe username of the requestor
http.request.uriThe full Request URL
http.auth.typeThe type of HTTP Authorization used
http.principal.nameThe name of the authenticated user making the request
http.subject.dnThe Distinguished Name of the requestor. This value will not be populated unless the Processor is + configured to use an SSLContext Service
http.issuer.dnThe Distinguished Name of the entity that issued the Subject's certificate. This value will not be + populated unless the Processor is configured to use an SSLContext Service
http.headers.XXXEach of the HTTP Headers that is received in the request will be added as an attribute, prefixed + with "http.headers." For example, if the request contains an HTTP Header named "x-my-header", + then the value will be added to an attribute named "http.headers.x-my-header"
+

+ See Also:
+ HandleHttpResponse
+ StandardHttpContextMap
+ StandardSSLContextService
+

+ + + diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpRequest/index.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpRequest/index.html deleted file mode 100644 index d3da666686..0000000000 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpRequest/index.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - HandleHttpRequest - - - - - -

Description:

-

- This processor starts an HTTP server and creates a FlowFile for each HTTP Request that it receives. The Processor leaves - the HTTP Connection open and is intended to be used in conjunction with a - HandleHttpResponse Processor. -

- -

- The pairing of this Processor with a HandleHttpResponse Processor - provides the ability to use NiFi to visually construct a web server that can carry out any functionality that is available - through the existing Processors. For example, one could construct a Web-based front end to an SFTP Server by constructing a - flow such as: -

- -

- HandleHttpRequest -> - PutSFTP -> - HandleHttpResponse -

- -

- The HandleHttpRequest Processor provides several Properties to configure which methods are supported, the paths that are - supported, and SSL configuration. The FlowFiles that are generated by this Processor have the following attributes added to - them, providing powerful routing capabilities and traceability of all data: -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Attribute NameAttribute Description
http.context.identifierAn identifier that allows the HandleHttpRequest and HandleHttpResponse to coordinate which FlowFile belongs - to which HTTP Request/Response.
mime.typeThe MIME Type of the data, according to the HTTP Header "Content-Type"
http.servlet.pathThe part of the request URL that is considered the Servlet Path
http.context.pathThe part of the request URL that is considered to be the Context Path
http.methodThe HTTP Method that was used for the request, such as GET or POST
http.query.stringThe query string portion of hte Request URL
http.remote.hostThe hostname of the requestor
http.remote.addrThe hostname:port combination of the requestor
http.remote.userThe username of the requestor
http.request.uriThe full Request URL
http.auth.typeThe type of HTTP Authorization used
http.principal.nameThe name of the authenticated user making the request
http.subject.dnThe Distinguished Name of the requestor. This value will not be populated unless the Processor is - configured to use an SSLContext Service
http.issuer.dnThe Distinguished Name of the entity that issued the Subject's certificate. This value will not be - populated unless the Processor is configured to use an SSLContext Service
http.headers.XXXEach of the HTTP Headers that is received in the request will be added as an attribute, prefixed - with "http.headers." For example, if the request contains an HTTP Header named "x-my-header", - then the value will be added to an attribute named "http.headers.x-my-header"
- - -

- Properties: -

-

- In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. If a property has a default value, it is indicated. If a property supports the use of the NiFi Expression Language (or simply, "expression language"), that is also indicated. -

-
    -
  • Listening Port -
      -
    • The port to listen on for incoming HTTP Requests
    • -
    • Default value: no default
    • -
    • Supports expression language: false
    • -
    -
  • -
  • Hostname -
      -
    • The Hostname to bind to. If not specified, will bind to all hosts
    • -
    • Default value: no default
    • -
    • Supports expression language: false
    • -
    -
  • -
  • HTTP Context Map -
      -
    • The HTTP Context Map Controller Service to use for caching the HTTP Request Information
    • -
    • Default value: no default
    • -
    • Supports expression language: false
    • -
    -
  • -
  • SSL Context Service -
      -
    • The Controller Service to use for obtaining an SSL Context. The SSL Context controller service is a mechanism for providing all the security properties that allow for secure communications between NiFi extensions and other systems. See the User Guide or the Controller Services documentation via the "help" link in the upper-right corner of the GUI for more information about the StandardSSLContextService. The value for this property is the identifier name that is configured in the StandardSSLContextService.
    • -
    • Default value: no default
    • -
    • Supports expression language: false
    • -
    -
  • - -
  • Allowed Paths -
      -
    • A Regular Expression that specifies the valid HTTP Paths that are allowed in the incoming URL Requests. If this value is specified and the path of the HTTP Requests does not match this Regular Expression, the Processor will respond with a 404: NotFound
    • -
    • Default value: no default
    • -
    • Supports expression language: false
    • -
    -
  • -
  • Allow GET -
      -
    • Specifies whether or not to allow HTTP GET Method
    • -
    • Default value: true
    • -
    • Supports expression language: false
    • -
    -
  • -
  • Allow POST -
      -
    • Specifies whether or not to allow HTTP POST Method
    • -
    • Default value: true
    • -
    • Supports expression language: false
    • -
    -
  • -
  • Allow PUT -
      -
    • Specifies whether or not to allow HTTP PUT Method
    • -
    • Default value: true
    • -
    • Supports expression language: false
    • -
    -
  • -
  • Allow DELETE -
      -
    • Specifies whether or not to allow HTTP DELETE Method
    • -
    • Default value: true
    • -
    • Supports expression language: false
    • -
    -
  • -
  • Allow HEAD -
      -
    • Specifies whether or not to allow HTTP HEAD Method
    • -
    • Default value: false
    • -
    • Supports expression language: false
    • -
    -
  • -
  • Allow OPTIONS -
      -
    • Specifies whether or not to allow HTTP OPTIONS Method
    • -
    • Default value: false
    • -
    • Supports expression language: false
    • -
    -
  • -
  • Additional HTTP Methods -
      -
    • A comma-separated list of non-standard HTTP Methods that should be allowed
    • -
    • Default value: no default
    • -
    • Supports expression language: false
    • -
    -
  • -
  • Client Authentication -
      -
    • Specifies whether or not the Processor should authenticate clients. This value is ignored if the <SSL Context Service> Property is not specified or the SSL Context provided uses only a KeyStore and not a TrustStore.
    • -
    • - The following values are allowed: -
        -
      • No Authentication - Processor will not authenticate clients. Anyone can communicate with this Processor anonymously
      • -
      • Want Authentication - Processor will try to verify the client but if unable to verify will allow the client to communicate anonymously
      • -
      • Need Authentication - Processor will reject communications from any client unless the client provides a certificate that is trusted by the TrustStore specified in the SSL Context Service
      • -
      -
    • -
    • Default value: No Authentication
    • -
    • Supports expression language: false
    • -
    -
  • -
- -

- Relationships: -

-
    -
  • success -
      -
    • All FlowFiles that are created are routed to this relationship.
    • -
    -
  • -
- - -

- See Also:
- HandleHttpResponse
- StandardHttpContextMap
- StandardSSLContextService
-

- - - diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpResponse/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpResponse/additionalDetails.html new file mode 100644 index 0000000000..5d8993e6c7 --- /dev/null +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpResponse/additionalDetails.html @@ -0,0 +1,57 @@ + + + + + + HandleHttpResponse + + + + + +

Usage Description:

+

+ The pairing of this Processor with a HandleHttpRequest Processor + provides the ability to use NiFi to visually construct a web server that can carry out any functionality that is available + through the existing Processors. For example, one could construct a Web-based front end to an SFTP Server by constructing a + flow such as: +

+ +

+ HandleHttpRequest -> + PutSFTP -> + HandleHttpResponse +

+ +

+ This Processor must be configured with the same <HTTP Context Map> service as the corresponding HandleHttpRequest Processor. + Otherwise, all FlowFiles will be routed to the 'failure' relationship. +

+ +

+ All FlowFiles must have an attribute named http.context.identifier. The value of this attribute is used to lookup + the HTTP Response so that the proper message can be sent back to the requestor. If this attribute is missing, the FlowFile + will be routed to 'failure.' +

+

+ See Also:
+ HandleHttpRequest
+ StandardHttpContextMap
+ StandardSSLContextService
+

+ + + diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpResponse/index.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpResponse/index.html deleted file mode 100644 index 70d76a6684..0000000000 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.HandleHttpResponse/index.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - HandleHttpResponse - - - - - -

Description:

-

- This processor responds to an HTTP request that was received by the - HandleHttpRequest Processor. -

- -

- The pairing of this Processor with a HandleHttpRequest Processor - provides the ability to use NiFi to visually construct a web server that can carry out any functionality that is available - through the existing Processors. For example, one could construct a Web-based front end to an SFTP Server by constructing a - flow such as: -

- -

- HandleHttpRequest -> - PutSFTP -> - HandleHttpResponse -

- -

- This Processor must be configured with the same <HTTP Context Map> service as the corresponding HandleHttpRequest Processor. - Otherwise, all FlowFiles will be routed to the 'failure' relationship. -

- -

- All FlowFiles must have an attribute named http.context.identifier. The value of this attribute is used to lookup - the HTTP Response so that the proper message can be sent back to the requestor. If this attribute is missing, the FlowFile - will be routed to 'failure.' -

- - -

- Properties: -

-

- In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. If a property has a default value, it is indicated. If a property supports the use of the NiFi Expression Language (or simply, "expression language"), that is also indicated. -

-
    -
  • HTTP Status Code -
      -
    • The HTTP Status Code to use when responding to the HTTP Request. See Section 10 of RFC 2616 for more information.
    • -
    • Default value: no default
    • -
    • Supports expression language: true
    • -
    -
  • -
  • HTTP Context Map -
      -
    • The HTTP Context Map Controller Service to use for caching the HTTP Request Information
    • -
    • Default value: no default
    • -
    • Supports expression language: false
    • -
    -
  • -
- -

- Relationships: -

-
    -
  • success -
      -
    • If a message is successfully sent back to the requestor, the FlowFile is routed to this relationship.
    • -
    -
  • - -
  • failure -
      -
    • - A FlowFile will be routed to failure under the following conditions: -
        -
      • The FlowFile does not have an http.context.identifier attribute
      • -
      • The http.context.identifier attribute has a value that cannot be found in the HTTP Context Map
      • -
      • The HTTP Status Code is not a number
      • -
      • There was a communications failure when attempting to write the response to the requestor
      • -
      -
    • -
    -
  • -
- -

- See Also:
- HandleHttpRequest
- StandardHttpContextMap
- StandardSSLContextService
-

- - - diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.IdentifyMimeType/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.IdentifyMimeType/additionalDetails.html index 22ebd1db03..f993fee963 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.IdentifyMimeType/additionalDetails.html +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.IdentifyMimeType/additionalDetails.html @@ -22,77 +22,23 @@ - -

Description:

- This processor attempts to identify the MIME type used for a - FlowFile. If the MIME type can be identified, an attribute with the - name - mime.type - is added to the FlowFile, and its value is the detected MIME type. - Some MIME - types require the processor to read a significant amount of data; for - these MIME types, their identification is optional. (See the - properties Identify ZIP and Identify TAR.) The algorithm may have to - read the entire contents of a file for each type of identification. If - the MIME Type cannot be determined, its mime.type attribute will be - set to - application/octet-stream - . + Modifies Attributes:

- -

The following MIME Types are detected: -

-
    -
  • application/gzip
  • -
  • application/bzip2
  • -
  • application/flowfile-v3
  • -
  • application/flowfile-v1 (requires Identify TAR be set to true)
  • -
  • application/xml
  • -
  • video/mp4
  • -
  • video/x-m4v
  • -
  • video/mp4a-latm
  • -
  • video/quicktime
  • -
  • video/mpeg
  • -
  • audio/wav
  • -
  • audio/mp3
  • -
  • image/bmp
  • -
  • image/png
  • -
  • image/jpg
  • -
  • image/gif
  • -
  • image/tif
  • -
  • application/vnd.ms-works
  • -
  • application/msexcel
  • -
  • application/mspowerpoint
  • -
  • application/msaccess
  • -
  • application/x-ms-wmv
  • -
  • application/pdf
  • -
  • application/x-rpm
  • -
  • application/tar
  • -
  • application/x-7z-compressed
  • -
  • application/java-archive
  • -
  • application/zip
  • -
  • application/x-lzh
  • -
- - -

- Modifies Attributes: -

- - - - - - - - - - - - - -
Attribute NameDescription
mime.typeThis Processor sets the FlowFile's mime.type attribute to the detected MIME Type. If unable to detect - the MIME Type, the attribute's value will be set to application/octet-stream.
- + + + + + + + + + + + + + +
Attribute NameDescription
mime.typeThis Processor sets the FlowFile's mime.type attribute to the detected MIME Type. If unable to detect + the MIME Type, the attribute's value will be set to application/octet-stream.
+ diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.InvokeHTTP/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.InvokeHTTP/additionalDetails.html index 1c33360d26..9a18355b11 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.InvokeHTTP/additionalDetails.html +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.InvokeHTTP/additionalDetails.html @@ -21,7 +21,7 @@ - +

Adds Attributes:

diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.MonitorActivity/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.MonitorActivity/additionalDetails.html index 0a3b66537e..d55fcec4d8 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.MonitorActivity/additionalDetails.html +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.MonitorActivity/additionalDetails.html @@ -23,7 +23,7 @@ - +

Modifies Attributes:

diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.PostHTTP/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.PostHTTP/additionalDetails.html index f8b15f91c5..d193e93be9 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.PostHTTP/additionalDetails.html +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.PostHTTP/additionalDetails.html @@ -25,7 +25,7 @@ - +

Uses Attributes:

diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.PutFTP/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.PutFTP/additionalDetails.html index fbece63817..d8afa01da0 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.PutFTP/additionalDetails.html +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.PutFTP/additionalDetails.html @@ -22,7 +22,7 @@ - +

Optional User-Defined Properties:

@@ -37,30 +37,12 @@ essentially the same as sending quote commands to an FTP server from the command line.
  • NOTE: While this is the same as sending a quote command, it is very important that - you leave off the “quote” part of the command from the text value you enter in. For example, if you want - to mimic the command line ftp command quote stat you would give the text value of stat. You have the - option of sending a number of commands to the FTP server before the file is sent. If you have only one - command, then the name of the optional parameter will be pre.cmd.1. If you have a second command, then - the next optional parameter you give is pre.cmd.2, and so on. There is no limit to the number of pre - commands you can send. The commands will be sent in the order of their number, so pre.cmd.1 will be sent - first, pre.cmd.2 will be sent next, etc. This is true regardless of what order they are added to the - processor properties. The property names determine the order.
  • -
  • NOTE: If the optional property name does not follow the pattern pre.cmd.integer - - then the command will not be sent. If a command is given which is not recognized by the server, then - that will be logged.
  • -
  • Supports expression language: true. FlowFile attributes can be used in commands using the expression language
  • - - -
  • post.cmd.# -
      -
    • Optional properties of this type can be added by the user and should be used for VERY - RARE cases only. You will know when you need to use it when the recipient specifies that you must - send FTP commands after the transfer. Otherwise, do not use it. These are the same as the pre commands. + you leave off the . (See pre commands above) except that these commands are sent after the file transfer.
    • Supports expression language: true. FlowFile attributes can be used in commands using the expression language
  • - + diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.PutSFTP/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.PutSFTP/additionalDetails.html index 656e150ebc..93876b62e7 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.PutSFTP/additionalDetails.html +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.PutSFTP/additionalDetails.html @@ -24,11 +24,11 @@

    See Also: -

    +

    - + diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.RouteOnAttribute/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.RouteOnAttribute/additionalDetails.html index 9bd3c383f9..92f9f46b30 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.RouteOnAttribute/additionalDetails.html +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.RouteOnAttribute/additionalDetails.html @@ -22,7 +22,7 @@ -

    Description:

    +

    Usage Example

    This processor routes FlowFiles based on their attributes using the NiFi Expression Language. Users add properties with diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.ScanContent/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.ScanContent/additionalDetails.html index f8560f2d0f..aff65491d3 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.ScanContent/additionalDetails.html +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.ScanContent/additionalDetails.html @@ -23,7 +23,7 @@ - +

    Modifies Attributes:

    diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.SegmentContent/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.SegmentContent/additionalDetails.html index 64dd7baec3..957913f0e5 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.SegmentContent/additionalDetails.html +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.SegmentContent/additionalDetails.html @@ -23,7 +23,7 @@ - +

    Adds or Modifies Attributes:

    diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.SplitContent/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.SplitContent/additionalDetails.html index 64d8d7dce3..683b0fa5a1 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.SplitContent/additionalDetails.html +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.SplitContent/additionalDetails.html @@ -23,7 +23,7 @@ - +

    Modifies Attributes:

    diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.SplitJson/index.html b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.SplitJson/index.html deleted file mode 100644 index e3a4b14e66..0000000000 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/resources/docs/org.apache.nifi.processors.standard.SplitJson/index.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - SplitJson - - - - - - -

    Description:

    - -

    - This processor splits a JSON File into multiple, separate FlowFiles for an array element specified by a JsonPath - expression. - Each generated FlowFile is comprised of an element of the specified array and transferred to relationship 'split,' - with the original file transferred to the 'original' relationship. If the specified JsonPath is not found or - does not evaluate to an array element, the original file is routed to 'failure' and no files are generated. -

    - -

    - Note: The underlying JsonPath library loads the entirety of the streamed content into and performs - result evaluations in memory. Accordingly, it is important to consider the anticipated profile of content being - evaluated by this processor and the hardware supporting it especially when working against large JSON documents. -

    - -Properties: -

    - -

    - In the list below, the names of required properties appear in bold. Any other properties (not in bold) are - considered optional. If a property has a default value, it is indicated. If a property supports the use of the NiFi - Expression Language (or simply, "expression language"), that is also indicated. -

    -
      -
    • JsonPath Expression -
        -
      • A JsonPath expression that indicates the array element to split into JSON/scalar fragments.
      • -
      • Supports expression language: false
      • -
      -
    • -
    - -

    - Relationships: -

    -
      -
    • failure -
        -
      • If a FlowFile fails processing for any reason (for example, the FlowFile is not valid JSON or the - specified path does not exist) and does not go down the original relationship. -
      • -
      -
    • -
    • original -
        -
      • If FlowFiles are successfully split, a copy of the original FlowFile follows this relationship.
      • -
      -
    • -
    • split -
        -
      • If FlowFiles are successfully split into one or more files, those split files follow this - relationship. -
      • -
      -
    • -
    - - -