NIFI-271 checkpoint push because there are so many changes. Long way to go but got through dto library

This commit is contained in:
joewitt 2015-04-21 02:15:46 -04:00
parent 8a296aacc9
commit 9faaef8cfa
242 changed files with 4434 additions and 5534 deletions

View File

@ -198,6 +198,13 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.15</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>6.5</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
@ -310,7 +317,6 @@
<property name="allowSamelineMultipleAnnotations" value="true" />
</module>
<module name="NonEmptyAtclauseDescription" />
<module name="JavadocTagContinuationIndentation" />
<module name="JavadocMethod">
<property name="allowMissingJavadoc" value="true" />
<property name="allowMissingParamTags" value="true" />
@ -325,15 +331,8 @@
</checkstyleRules>
<violationSeverity>warning</violationSeverity>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<excludes>**/HelpMojo.java</excludes>
<excludes>**/HelpMojo.java,**/generated-sources</excludes>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>6.3</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>check-style</id>
@ -379,7 +378,7 @@
<plugin>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-nar-maven-plugin</artifactId>
<version>1.0.0-incubating</version>
<version>1.0.1-incubating-SNAPSHOT</version>
<extensions>true</extensions>
</plugin>
</plugins>

View File

@ -27,8 +27,8 @@ import java.util.Arrays;
import org.apache.nifi.bootstrap.exception.InvalidCommandException;
public class BootstrapCodec {
private final RunNiFi runner;
private final BufferedReader reader;
private final BufferedWriter writer;

View File

@ -28,6 +28,7 @@ import java.util.concurrent.TimeUnit;
import org.apache.nifi.bootstrap.util.LimitingInputStream;
public class NiFiListener {
private ServerSocket serverSocket;
private volatile Listener listener;
@ -53,6 +54,7 @@ public class NiFiListener {
}
private class Listener implements Runnable {
private final ServerSocket serverSocket;
private final ExecutorService executor;
private final RunNiFi runner;

View File

@ -49,20 +49,24 @@ import java.util.logging.ConsoleHandler;
import java.util.logging.Handler;
import java.util.logging.Level;
/**
* Bootstrap class to run Apache NiFi.
*
* This class looks for the bootstrap.conf file by looking in the following places (in order):
* <p>
* The class which bootstraps Apache NiFi. This class looks for the
* bootstrap.conf file by looking in the following places (in order):</p>
* <ol>
* <li>Java System Property named {@code org.apache.nifi.bootstrap.config.file}</li>
* <li>${NIFI_HOME}/./conf/bootstrap.conf, where ${NIFI_HOME} references an environment variable {@code NIFI_HOME}</li>
* <li>./conf/bootstrap.conf, where {@code .} represents the working directory.
* <li>Java System Property named
* {@code org.apache.nifi.bootstrap.config.file}</li>
* <li>${NIFI_HOME}/./conf/bootstrap.conf, where ${NIFI_HOME} references an
* environment variable {@code NIFI_HOME}</li>
* <li>./conf/bootstrap.conf, where {@code ./} represents the working
* directory.</li>
* </ol>
*
* If the {@code bootstrap.conf} file cannot be found, throws a {@code FileNotFoundException].
* If the {@code bootstrap.conf} file cannot be found, throws a {@code FileNotFoundException}.
*/
public class RunNiFi {
public static final String DEFAULT_CONFIG_FILE = "./conf/bootstrap.conf";
public static final String DEFAULT_NIFI_PROPS_FILE = "./conf/nifi.properties";
public static final String DEFAULT_JAVA_CMD = "java";
@ -202,14 +206,13 @@ public class RunNiFi {
}
}
public File getStatusFile() {
final File confDir = bootstrapConfigFile.getParentFile();
final File nifiHome = confDir.getParentFile();
final File bin = new File(nifiHome, "bin");
final File statusFile = new File(bin, "nifi.pid");
logger.fine("Status File: " + statusFile);
logger.log(Level.FINE, "Status File: {0}", statusFile);
return statusFile;
}
@ -226,14 +229,14 @@ public class RunNiFi {
props.load(fis);
}
logger.fine("Properties: " + props);
logger.log(Level.FINE, "Properties: {0}", props);
return props;
}
private synchronized void saveProperties(final Properties nifiProps) throws IOException {
final File statusFile = getStatusFile();
if (statusFile.exists() && !statusFile.delete()) {
logger.warning("Failed to delete " + statusFile);
logger.log(Level.WARNING, "Failed to delete {0}", statusFile);
}
if (!statusFile.createNewFile()) {
@ -246,7 +249,9 @@ public class RunNiFi {
perms.add(PosixFilePermission.OWNER_WRITE);
Files.setPosixFilePermissions(statusFile.toPath(), perms);
} catch (final Exception e) {
logger.warning("Failed to set permissions so that only the owner can read status file " + statusFile + "; this may allows others to have access to the key needed to communicate with NiFi. Permissions should be changed so that only the owner can read this file");
logger.log(Level.WARNING, "Failed to set permissions so that only the owner can read status file {0}; "
+ "this may allows others to have access to the key needed to communicate with NiFi. "
+ "Permissions should be changed so that only the owner can read this file", statusFile);
}
try (final FileOutputStream fos = new FileOutputStream(statusFile)) {
@ -254,11 +259,11 @@ public class RunNiFi {
fos.getFD().sync();
}
logger.fine("Saved Properties " + nifiProps + " to " + statusFile);
logger.log(Level.FINE, "Saved Properties {0} to {1}", new Object[]{nifiProps, statusFile});
}
private boolean isPingSuccessful(final int port, final String secretKey) {
logger.fine("Pinging " + port);
logger.log(Level.FINE, "Pinging {0}", port);
try (final Socket socket = new Socket("localhost", port)) {
final OutputStream out = socket.getOutputStream();
@ -270,7 +275,7 @@ public class RunNiFi {
final InputStream in = socket.getInputStream();
final BufferedReader reader = new BufferedReader(new InputStreamReader(in));
final String response = reader.readLine();
logger.fine("PING response: " + response);
logger.log(Level.FINE, "PING response: {0}", response);
return PING_CMD.equals(response);
} catch (final IOException ioe) {
@ -285,18 +290,18 @@ public class RunNiFi {
logger.fine("No Port found in status file");
return null;
} else {
logger.fine("Port defined in status file: " + portVal);
logger.log(Level.FINE, "Port defined in status file: {0}", portVal);
}
final int port = Integer.parseInt(portVal);
final boolean success = isPingSuccessful(port, props.getProperty("secret.key"));
if (success) {
logger.fine("Successful PING on port " + port);
logger.log(Level.FINE, "Successful PING on port {0}", port);
return port;
}
final String pid = props.getProperty("pid");
logger.fine("PID in status file is " + pid);
logger.log(Level.FINE, "PID in status file is {0}", pid);
if (pid != null) {
final boolean procRunning = isProcessRunning(pid);
if (procRunning) {
@ -309,7 +314,6 @@ public class RunNiFi {
return null;
}
private boolean isProcessRunning(final String pid) {
try {
// We use the "ps" command to check if the process is still running.
@ -334,9 +338,9 @@ public class RunNiFi {
// If output of the ps command had our PID, the process is running.
if (running) {
logger.fine("Process with PID " + pid + " is running");
logger.log(Level.FINE, "Process with PID {0} is running", pid);
} else {
logger.fine("Process with PID " + pid + " is not running");
logger.log(Level.FINE, "Process with PID {0} is not running", pid);
}
return running;
@ -346,7 +350,6 @@ public class RunNiFi {
}
}
private Status getStatus() {
final Properties props;
try {
@ -389,13 +392,13 @@ public class RunNiFi {
public void status() throws IOException {
final Status status = getStatus();
if (status.isRespondingToPing()) {
logger.info("Apache NiFi is currently running, listening to Bootstrap on port " + status.getPort() +
", PID=" + (status.getPid() == null ? "unknkown" : status.getPid()));
logger.log(Level.INFO, "Apache NiFi is currently running, listening to Bootstrap on port {0}, PID={1}",
new Object[]{status.getPort(), status.getPid() == null ? "unknkown" : status.getPid()});
return;
}
if (status.isProcessRunning()) {
logger.info("Apache NiFi is running at PID " + status.getPid() + " but is not responding to ping requests");
logger.log(Level.INFO, "Apache NiFi is running at PID {0} but is not responding to ping requests", status.getPid());
return;
}
@ -411,12 +414,12 @@ public class RunNiFi {
}
}
/**
* Writes a NiFi thread dump to the given file; if file is null, logs at INFO level instead.
* @param dumpFile
* @return
* @throws IOException
* Writes a NiFi thread dump to the given file; if file is null, logs at
* INFO level instead.
*
* @param dumpFile the file to write the dump content to
* @throws IOException if any issues occur while writing the dump file
*/
public void dump(final File dumpFile) throws IOException {
final Integer port = getCurrentPort();
@ -435,7 +438,7 @@ public class RunNiFi {
logger.fine("Established connection to NiFi instance.");
socket.setSoTimeout(60000);
logger.fine("Sending DUMP Command to port " + port);
logger.log(Level.FINE, "Sending DUMP Command to port {0}", port);
final OutputStream out = socket.getOutputStream();
out.write((DUMP_CMD + " " + secretKey + "\n").getBytes(StandardCharsets.UTF_8));
out.flush();
@ -455,7 +458,7 @@ public class RunNiFi {
try (final FileOutputStream fos = new FileOutputStream(dumpFile)) {
fos.write(dump.getBytes(StandardCharsets.UTF_8));
}
logger.info("Successfully wrote thread dump to " + dumpFile.getAbsolutePath());
logger.log(Level.INFO, "Successfully wrote thread dump to {0}", dumpFile.getAbsolutePath());
}
}
@ -476,7 +479,7 @@ public class RunNiFi {
logger.fine("Established connection to NiFi instance.");
socket.setSoTimeout(60000);
logger.fine("Sending SHUTDOWN Command to port " + port);
logger.log(Level.FINE, "Sending SHUTDOWN Command to port {0}", port);
final OutputStream out = socket.getOutputStream();
out.write((SHUTDOWN_CMD + " " + secretKey + "\n").getBytes(StandardCharsets.UTF_8));
out.flush();
@ -485,7 +488,7 @@ public class RunNiFi {
final BufferedReader reader = new BufferedReader(new InputStreamReader(in));
final String response = reader.readLine();
logger.fine("Received response to SHUTDOWN command: " + response);
logger.log(Level.FINE, "Received response to SHUTDOWN command: {0}", response);
if (SHUTDOWN_CMD.equals(response)) {
logger.info("Apache NiFi has accepted the Shutdown Command and is shutting down now");
@ -512,18 +515,19 @@ public class RunNiFi {
final long waitSeconds = TimeUnit.NANOSECONDS.toSeconds(waitNanos);
if (waitSeconds >= gracefulShutdownSeconds && gracefulShutdownSeconds > 0) {
if (isProcessRunning(pid)) {
logger.warning("NiFi has not finished shutting down after " + gracefulShutdownSeconds + " seconds. Killing process.");
logger.log(Level.WARNING, "NiFi has not finished shutting down after {0} seconds. Killing process.", gracefulShutdownSeconds);
try {
killProcessTree(pid);
} catch (final IOException ioe) {
logger.severe("Failed to kill Process with PID " + pid);
logger.log(Level.SEVERE, "Failed to kill Process with PID {0}", pid);
}
}
break;
} else {
try {
Thread.sleep(2000L);
} catch (final InterruptedException ie) {}
} catch (final InterruptedException ie) {
}
}
}
@ -532,18 +536,16 @@ public class RunNiFi {
final File statusFile = getStatusFile();
if (!statusFile.delete()) {
logger.severe("Failed to delete status file " + statusFile + "; this file should be cleaned up manually");
logger.log(Level.SEVERE, "Failed to delete status file {0}; this file should be cleaned up manually", statusFile);
}
} else {
logger.severe("When sending SHUTDOWN command to NiFi, got unexpected response " + response);
logger.log(Level.SEVERE, "When sending SHUTDOWN command to NiFi, got unexpected response {0}", response);
}
} catch (final IOException ioe) {
logger.severe("Failed to send shutdown command to port " + port + " due to " + ioe);
return;
logger.log(Level.SEVERE, "Failed to send shutdown command to port {0} due to {1}", new Object[]{port, ioe});
}
}
private static List<String> getChildProcesses(final String ppid) throws IOException {
final Process proc = Runtime.getRuntime().exec(new String[]{"ps", "-o", "pid", "--no-headers", "--ppid", ppid});
final List<String> childPids = new ArrayList<>();
@ -560,10 +562,10 @@ public class RunNiFi {
}
private void killProcessTree(final String pid) throws IOException {
logger.fine("Killing Process Tree for PID " + pid);
logger.log(Level.FINE, "Killing Process Tree for PID {0}", pid);
final List<String> children = getChildProcesses(pid);
logger.fine("Children of PID " + pid + ": " + children);
logger.log(Level.FINE, "Children of PID {0}: {1}", new Object[]{pid, children});
for (final String childPid : children) {
killProcessTree(childPid);
@ -725,8 +727,8 @@ public class RunNiFi {
}
logger.info("Starting Apache NiFi...");
logger.info("Working Directory: " + workingDir.getAbsolutePath());
logger.info("Command: " + cmdBuilder.toString());
logger.log(Level.INFO, "Working Directory: {0}", workingDir.getAbsolutePath());
logger.log(Level.INFO, "Command: {0}", cmdBuilder.toString());
if (monitor) {
String gracefulShutdown = props.get(GRACEFUL_SHUTDOWN_PROP);
@ -738,11 +740,13 @@ public class RunNiFi {
try {
gracefulShutdownSeconds = Integer.parseInt(gracefulShutdown);
} catch (final NumberFormatException nfe) {
throw new NumberFormatException("The '" + GRACEFUL_SHUTDOWN_PROP + "' property in Bootstrap Config File " + bootstrapConfigAbsoluteFile.getAbsolutePath() + " has an invalid value. Must be a non-negative integer");
throw new NumberFormatException("The '" + GRACEFUL_SHUTDOWN_PROP + "' property in Bootstrap Config File "
+ bootstrapConfigAbsoluteFile.getAbsolutePath() + " has an invalid value. Must be a non-negative integer");
}
if (gracefulShutdownSeconds < 0) {
throw new NumberFormatException("The '" + GRACEFUL_SHUTDOWN_PROP + "' property in Bootstrap Config File " + bootstrapConfigAbsoluteFile.getAbsolutePath() + " has an invalid value. Must be a non-negative integer");
throw new NumberFormatException("The '" + GRACEFUL_SHUTDOWN_PROP + "' property in Bootstrap Config File "
+ bootstrapConfigAbsoluteFile.getAbsolutePath() + " has an invalid value. Must be a non-negative integer");
}
Process process = builder.start();
@ -791,7 +795,7 @@ public class RunNiFi {
final boolean started = waitForStart();
if (started) {
logger.info("Successfully started Apache NiFi" + (pid == null ? "" : " with PID " + pid));
logger.log(Level.INFO, "Successfully started Apache NiFi{0}", (pid == null ? "" : " with PID " + pid));
} else {
logger.severe("Apache NiFi does not appear to have started");
}
@ -814,7 +818,7 @@ public class RunNiFi {
boolean started = waitForStart();
if (started) {
logger.info("Successfully started Apache NiFi" + (pid == null ? "" : " with PID " + pid));
logger.log(Level.INFO, "Successfully started Apache NiFi{0}", (pid == null ? "" : " with PID " + pid));
} else {
logger.severe("Apache NiFi does not appear to have started");
}
@ -823,7 +827,6 @@ public class RunNiFi {
}
}
private Long getPid(final Process process) {
try {
final Class<?> procClass = process.getClass();
@ -831,14 +834,14 @@ public class RunNiFi {
pidField.setAccessible(true);
final Object pidObject = pidField.get(process);
logger.fine("PID Object = " + pidObject);
logger.log(Level.FINE, "PID Object = {0}", pidObject);
if (pidObject instanceof Number) {
return ((Number) pidObject).longValue();
}
return null;
} catch (final IllegalAccessException | NoSuchFieldException nsfe) {
logger.fine("Could not find PID for child process due to " + nsfe);
logger.log(Level.FINE, "Could not find PID for child process due to {0}", nsfe);
return null;
}
}
@ -909,18 +912,18 @@ public class RunNiFi {
try {
saveProperties(nifiProps);
} catch (final IOException ioe) {
logger.warning("Apache NiFi has started but failed to persist NiFi Port information to " + statusFile.getAbsolutePath() + " due to " + ioe);
logger.log(Level.WARNING, "Apache NiFi has started but failed to persist NiFi Port information to {0} due to {1}", new Object[]{statusFile.getAbsolutePath(), ioe});
}
logger.info("Apache NiFi now running and listening for Bootstrap requests on port " + port);
logger.log(Level.INFO, "Apache NiFi now running and listening for Bootstrap requests on port {0}", port);
}
int getNiFiCommandControlPort() {
return this.ccPort;
}
private static class Status {
private final Integer port;
private final String pid;

View File

@ -24,6 +24,7 @@ import java.nio.charset.StandardCharsets;
import java.util.concurrent.TimeUnit;
public class ShutdownHook extends Thread {
private final Process nifiProcess;
private final RunNiFi runner;
private final int gracefulShutdownSeconds;
@ -74,7 +75,8 @@ public class ShutdownHook extends Thread {
} else {
try {
Thread.sleep(1000L);
} catch (final InterruptedException ie) {}
} catch (final InterruptedException ie) {
}
}
}

View File

@ -17,6 +17,7 @@
package org.apache.nifi.bootstrap.exception;
public class InvalidCommandException extends Exception {
private static final long serialVersionUID = 1L;
public InvalidCommandException() {

View File

@ -55,6 +55,13 @@
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<excludes>**/HL7QueryParser.java,**/HL7QueryLexer.java</excludes>
</configuration>
</plugin>
</plugins>
</build>
@ -62,7 +69,6 @@
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
<version>3.5.2</version>
</dependency>
<!-- HAPI to parse v2 messages -->

View File

@ -0,0 +1,22 @@
<?xml version="1.0"?>
<!--
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.
-->
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<suppress files="[/\\]target[/\\]" checks=".*"/>
</suppressions>

View File

@ -32,6 +32,7 @@ import ca.uhn.hl7v2.parser.EncodingCharacters;
import ca.uhn.hl7v2.parser.PipeParser;
public class HapiField implements HL7Field, HL7Component {
private final String value;
private final List<HL7Component> components;

View File

@ -32,6 +32,7 @@ import ca.uhn.hl7v2.model.Segment;
import ca.uhn.hl7v2.model.Structure;
public class HapiMessage implements HL7Message {
private final Message message;
private final List<HL7Segment> allSegments;
private final Map<String, List<HL7Segment>> segmentMap;

View File

@ -28,6 +28,7 @@ import ca.uhn.hl7v2.model.Segment;
import ca.uhn.hl7v2.model.Type;
public class HapiSegment implements HL7Segment {
private final Segment segment;
private final List<HL7Field> fields;
@ -51,7 +52,6 @@ public class HapiSegment implements HL7Segment {
this.fields = Collections.unmodifiableList(fieldList);
}
@Override
public String getName() {
return segment.getName();

View File

@ -23,6 +23,7 @@ import org.apache.nifi.hl7.model.HL7Component;
import org.apache.nifi.hl7.model.HL7Field;
public class SingleValueField implements HL7Field {
private final String value;
public SingleValueField(final String value) {

View File

@ -19,6 +19,7 @@ package org.apache.nifi.hl7.io.exception;
import java.io.IOException;
public class InvalidHL7Exception extends IOException {
private static final long serialVersionUID = -5675416667224562441L;
public InvalidHL7Exception() {

View File

@ -19,6 +19,8 @@ package org.apache.nifi.hl7.model;
import java.util.List;
public interface HL7Component {
String getValue();
List<HL7Component> getComponents();
}

View File

@ -16,6 +16,5 @@
*/
package org.apache.nifi.hl7.model;
public interface HL7Field extends HL7Component {
}

View File

@ -16,8 +16,6 @@
*/
package org.apache.nifi.hl7.query;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@ -58,9 +56,30 @@ import org.apache.nifi.hl7.query.result.StandardQueryResult;
import org.apache.nifi.hl7.query.antlr.HL7QueryLexer;
import org.apache.nifi.hl7.query.antlr.HL7QueryParser;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.AND;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.DECLARE;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.DOT;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.EQUALS;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.GE;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.GT;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.IDENTIFIER;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.IS_NULL;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.LE;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.LT;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.MESSAGE;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.NOT;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.NOT_EQUALS;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.NOT_NULL;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.NUMBER;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.OR;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.REQUIRED;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.SEGMENT_NAME;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.SELECT;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.STRING_LITERAL;
import static org.apache.nifi.hl7.query.antlr.HL7QueryParser.WHERE;
public class HL7Query {
private final Tree tree;
private final String query;
private final Set<Declaration> declarations = new HashSet<>();
@ -146,7 +165,6 @@ public class HL7Query {
return selections;
}
private String getSelectedName(final Tree selectable) {
if (selectable.getChildCount() == 0) {
return selectable.getText();
@ -157,12 +175,10 @@ public class HL7Query {
}
}
private BooleanEvaluator processWhere(final Tree where) {
return buildBooleanEvaluator(where.getChild(0));
}
private Evaluator<?> buildReferenceEvaluator(final Tree tree) {
switch (tree.getType()) {
case MESSAGE:
@ -184,7 +200,6 @@ public class HL7Query {
}
}
private IntegerEvaluator buildIntegerEvaluator(final Tree tree) {
switch (tree.getType()) {
case NUMBER:
@ -194,7 +209,6 @@ public class HL7Query {
}
}
private BooleanEvaluator buildBooleanEvaluator(final Tree tree) {
// TODO: add Date comparisons
// LT/GT/GE/GE should allow for dates based on Field's Type
@ -232,7 +246,6 @@ public class HL7Query {
}
}
Tree getTree() {
return tree;
}
@ -322,56 +335,15 @@ public class HL7Query {
}
}
// for ( final Declaration declaration : declarations ) {
// final Object value = declaration.getDeclaredValue(message);
// if ( value == null && declaration.isRequired() ) {
// return new MissedResult(selections);
// }
// objectMap.put(declaration.getAlias(), value);
// }
//
// if (whereEvaluator == null || Boolean.TRUE.equals(whereEvaluator.evaluate(objectMap))) {
// for ( final Selection selection : selections ) {
// final Object value = selection.getEvaluator().evaluate(objectMap);
// resultMap.put(selection.getName(), value);
// }
// } else {
// return new MissedResult(selections);
// }
return new StandardQueryResult(selections, resultSet);
}
// assigns one of the possible values to each alias, based on which iteration this is.
// require LinkedHashMap just to be very clear and explicit that the order of the Map MUST be guaranteed
// between multiple invocations of this method.
// package protected for testing visibility
// static Map<String, Object> assignAliases(final LinkedHashMap<String, List<Object>> possibleValues, final int iteration) {
// final Map<String, Object> aliasMap = new HashMap<>();
//
// int aliasIndex = possibleValues.size() - 1;
// for ( final Map.Entry<String, List<Object>> entry : possibleValues.entrySet() ) {
// final String alias = entry.getKey();
// final List<Object> validValues = entry.getValue();
//
// final int validValueIndex;
// if (aliasIndex > 0) {
// validValueIndex = iteration / aliasIndex;
// } else {
// validValueIndex = iteration;
// }
//
// final Object obj = validValues.get(validValueIndex % validValues.size());
// aliasMap.put(alias, obj);
//
// aliasIndex--;
// }
//
// return aliasMap;
// }
//
/**
* assigns one of the possible values to each alias, based on which iteration this is.
* require LinkedHashMap just to be very clear and explicit that the order of the Map MUST be guaranteed
* between multiple invocations of this method.
* package protected for testing visibility
*/
static Map<String, Object> assignAliases(final LinkedHashMap<String, List<Object>> possibleValues, final int iteration) {
final Map<String, Object> aliasMap = new HashMap<>();

View File

@ -19,6 +19,7 @@ package org.apache.nifi.hl7.query;
import java.util.List;
public interface QueryResult {
boolean isMatch();
List<String> getLabels();

View File

@ -19,6 +19,7 @@ package org.apache.nifi.hl7.query;
import java.util.Map;
public interface ResultHit {
Object getValue(String label);
Map<String, Object> getSelectedValues();

View File

@ -19,6 +19,7 @@ package org.apache.nifi.hl7.query;
import org.apache.nifi.hl7.query.evaluator.Evaluator;
public class Selection {
private final Evaluator<?> evaluator;
private final String name;

View File

@ -19,6 +19,7 @@ package org.apache.nifi.hl7.query.evaluator;
import java.util.Map;
public interface Evaluator<T> {
public static final String MESSAGE_KEY = "message";
T evaluate(Map<String, Object> objectMap);

View File

@ -16,7 +16,6 @@
*/
package org.apache.nifi.hl7.query.evaluator;
public abstract class IntegerEvaluator implements Evaluator<Integer> {
public Class<? extends Integer> getType() {

View File

@ -24,6 +24,7 @@ import org.apache.nifi.hl7.query.evaluator.BooleanEvaluator;
import org.apache.nifi.hl7.query.evaluator.Evaluator;
public abstract class AbstractComparisonEvaluator extends BooleanEvaluator {
private final Evaluator<?> lhs;
private final Evaluator<?> rhs;
@ -32,6 +33,7 @@ public abstract class AbstractComparisonEvaluator extends BooleanEvaluator {
this.rhs = rhs;
}
@Override
public final Boolean evaluate(final Map<String, Object> objectMap) {
final Object lhsValue = lhs.evaluate(objectMap);
if (lhsValue == null) {
@ -46,7 +48,6 @@ public abstract class AbstractComparisonEvaluator extends BooleanEvaluator {
return compareRaw(lhsValue, rhsValue);
}
private Boolean compareRaw(Object lhsValue, Object rhsValue) {
if (lhsValue == null || rhsValue == null) {
return false;
@ -64,17 +65,21 @@ public abstract class AbstractComparisonEvaluator extends BooleanEvaluator {
return false;
}
// both are collections, and compare(lhsValue, rhsValue) is false.
// this would be the case, for instance, if we compared field 1 of one segment to
// a field in another segment, and both fields had components.
/**
* both are collections, and compare(lhsValue, rhsValue) is false.
* this would be the case, for instance, if we compared field 1 of one segment to
* a field in another segment, and both fields had components.
*/
if (lhsValue instanceof Collection && rhsValue instanceof Collection) {
return false;
}
// if one side is a collection but the other is not, check if any element in that
// collection compares to the other element in a way that satisfies the condition.
// this would happen, for instance, if we check Segment1.Field5 = 'X' and field 5 repeats
// with a value "A~B~C~X~Y~Z"; in this case we do want to consider Field 5 = X as true.
/**
* if one side is a collection but the other is not, check if any element in that
* collection compares to the other element in a way that satisfies the condition.
* this would happen, for instance, if we check Segment1.Field5 = 'X' and field 5 repeats
* with a value "A~B~C~X~Y~Z"; in this case we do want to consider Field 5 = X as true.
*/
if (lhsValue instanceof Collection) {
for (final Object lhsObject : (Collection<?>) lhsValue) {
if (compareRaw(lhsObject, rhsValue)) {

View File

@ -21,6 +21,7 @@ import java.util.regex.Pattern;
import org.apache.nifi.hl7.query.evaluator.Evaluator;
public abstract class AbstractNumericComparison extends AbstractComparisonEvaluator {
private static final Pattern NUMERIC_PATTERN = Pattern.compile("\\d+(\\.\\d+)?");
public AbstractNumericComparison(final Evaluator<?> lhs, final Evaluator<?> rhs) {

View File

@ -18,7 +18,6 @@ package org.apache.nifi.hl7.query.evaluator.comparison;
import org.apache.nifi.hl7.query.evaluator.Evaluator;
public class GreaterThanEvaluator extends AbstractNumericComparison {
public GreaterThanEvaluator(final Evaluator<?> lhs, final Evaluator<?> rhs) {
@ -30,5 +29,4 @@ public class GreaterThanEvaluator extends AbstractNumericComparison {
return lhs > rhs;
}
}

View File

@ -18,7 +18,6 @@ package org.apache.nifi.hl7.query.evaluator.comparison;
import org.apache.nifi.hl7.query.evaluator.Evaluator;
public class GreaterThanOrEqualEvaluator extends AbstractNumericComparison {
public GreaterThanOrEqualEvaluator(final Evaluator<?> lhs, final Evaluator<?> rhs) {
@ -30,5 +29,4 @@ public class GreaterThanOrEqualEvaluator extends AbstractNumericComparison {
return lhs >= rhs;
}
}

View File

@ -24,6 +24,7 @@ import org.apache.nifi.hl7.query.evaluator.BooleanEvaluator;
import org.apache.nifi.hl7.query.evaluator.Evaluator;
public class IsNullEvaluator extends BooleanEvaluator {
private final Evaluator<?> subjectEvaluator;
public IsNullEvaluator(final Evaluator<?> subjectEvaluator) {

View File

@ -19,6 +19,7 @@ package org.apache.nifi.hl7.query.evaluator.comparison;
import org.apache.nifi.hl7.query.evaluator.Evaluator;
public class LessThanEvaluator extends AbstractNumericComparison {
public LessThanEvaluator(final Evaluator<?> lhs, final Evaluator<?> rhs) {
super(lhs, rhs);
}

View File

@ -19,6 +19,7 @@ package org.apache.nifi.hl7.query.evaluator.comparison;
import org.apache.nifi.hl7.query.evaluator.Evaluator;
public class LessThanOrEqualEvaluator extends AbstractNumericComparison {
public LessThanOrEqualEvaluator(final Evaluator<?> lhs, final Evaluator<?> rhs) {
super(lhs, rhs);
}

View File

@ -21,6 +21,7 @@ import java.util.Map;
import org.apache.nifi.hl7.query.evaluator.BooleanEvaluator;
public class NotEvaluator extends BooleanEvaluator {
private final BooleanEvaluator subjectEvaluator;
public NotEvaluator(final BooleanEvaluator subjectEvaluator) {

View File

@ -24,6 +24,7 @@ import org.apache.nifi.hl7.query.evaluator.BooleanEvaluator;
import org.apache.nifi.hl7.query.evaluator.Evaluator;
public class NotNullEvaluator extends BooleanEvaluator {
private final Evaluator<?> subjectEvaluator;
public NotNullEvaluator(final Evaluator<?> subjectEvaluator) {

View File

@ -21,13 +21,13 @@ import java.util.Map;
import org.apache.nifi.hl7.query.evaluator.IntegerEvaluator;
public class IntegerLiteralEvaluator extends IntegerEvaluator {
private final Integer value;
public IntegerLiteralEvaluator(final Integer value) {
this.value = value;
}
@Override
public Integer evaluate(final Map<String, Object> objectMap) {
return value;

View File

@ -21,6 +21,7 @@ import java.util.Map;
import org.apache.nifi.hl7.query.evaluator.StringEvaluator;
public class StringLiteralEvaluator extends StringEvaluator {
private final String value;
public StringLiteralEvaluator(final String value) {

View File

@ -21,6 +21,7 @@ import java.util.Map;
import org.apache.nifi.hl7.query.evaluator.BooleanEvaluator;
public class AndEvaluator extends BooleanEvaluator {
private final BooleanEvaluator lhs;
private final BooleanEvaluator rhs;

View File

@ -21,6 +21,7 @@ import java.util.Map;
import org.apache.nifi.hl7.query.evaluator.BooleanEvaluator;
public class OrEvaluator extends BooleanEvaluator {
private final BooleanEvaluator lhs;
private final BooleanEvaluator rhs;

View File

@ -22,6 +22,7 @@ import org.apache.nifi.hl7.query.evaluator.Evaluator;
import org.apache.nifi.hl7.query.evaluator.StringEvaluator;
public class DeclaredReferenceEvaluator implements Evaluator<Object> {
private final StringEvaluator referenceNameEvaluator;
public DeclaredReferenceEvaluator(final StringEvaluator referenceNameEvaluator) {

View File

@ -28,6 +28,7 @@ import org.apache.nifi.hl7.query.evaluator.Evaluator;
import org.apache.nifi.hl7.query.evaluator.IntegerEvaluator;
public class DotEvaluator implements Evaluator<Object> {
private final Evaluator<?> lhs;
private final IntegerEvaluator rhs;

View File

@ -28,6 +28,7 @@ import org.apache.nifi.hl7.query.evaluator.IntegerEvaluator;
@SuppressWarnings("rawtypes")
public class FieldEvaluator implements Evaluator<List> {
private final SegmentEvaluator segmentEvaluator;
private final IntegerEvaluator indexEvaluator;

View File

@ -27,6 +27,7 @@ import org.apache.nifi.hl7.query.evaluator.StringEvaluator;
@SuppressWarnings("rawtypes")
public class SegmentEvaluator implements Evaluator<List> {
private final StringEvaluator segmentTypeEvaluator;
public SegmentEvaluator(final StringEvaluator segmentTypeEvaluator) {

View File

@ -17,6 +17,7 @@
package org.apache.nifi.hl7.query.exception;
public class HL7QueryParsingException extends RuntimeException {
private static final long serialVersionUID = 1L;
public HL7QueryParsingException() {

View File

@ -24,6 +24,7 @@ import org.apache.nifi.hl7.query.ResultHit;
import org.apache.nifi.hl7.query.Selection;
public class MissedResult implements QueryResult {
private final List<Selection> selections;
public MissedResult(final List<Selection> selections) {

View File

@ -27,6 +27,7 @@ import org.apache.nifi.hl7.query.ResultHit;
import org.apache.nifi.hl7.query.Selection;
public class StandardQueryResult implements QueryResult {
private final List<Selection> selections;
private final Set<Map<String, Object>> hits;
private final Iterator<Map<String, Object>> hitIterator;

View File

@ -22,6 +22,7 @@ import java.util.Map;
import org.apache.nifi.hl7.query.ResultHit;
public class StandardResultHit implements ResultHit {
private final Map<String, Object> values;
public StandardResultHit(final Map<String, Object> values) {

View File

@ -135,7 +135,6 @@ public class TestHL7Query {
assertTrue(result.isMatch());
}
@Test
public void testFieldEqualsString() throws HL7Exception, IOException {
HL7Query hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.7 = 'L'");
@ -214,7 +213,6 @@ public class TestHL7Query {
assertFalse(result.isMatch());
}
@Test
public void testDistinctValuesReturned() throws HL7Exception, IOException {
HL7Query hl7Query = HL7Query.compile("DECLARE result1 AS REQUIRED OBX, result2 AS REQUIRED OBX SELECT MESSAGE WHERE result1.7 = 'L' OR result2.7 != 'H'");
@ -255,7 +253,6 @@ public class TestHL7Query {
}
@Test
public void testIsNull() throws HL7Exception, IOException {
HL7Query hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.999 IS NULL");
@ -275,7 +272,6 @@ public class TestHL7Query {
assertFalse(result.isMatch());
}
@Test
public void testNotNull() throws HL7Exception, IOException {
HL7Query hl7Query = HL7Query.compile("DECLARE result AS REQUIRED OBX SELECT MESSAGE WHERE result.999 NOT NULL");

View File

@ -360,7 +360,7 @@ public class NiFiProperties extends Properties {
/**
* The socket port to listen on for a Remote Input Port.
*
* @return
* @return the remote input port
*/
public Integer getRemoteInputPort() {
return getPropertyAsPort(REMOTE_INPUT_PORT, DEFAULT_REMOTE_INPUT_PORT);
@ -383,7 +383,7 @@ public class NiFiProperties extends Properties {
/**
* Returns the directory to which Templates are to be persisted
*
* @return
* @return the template directory
*/
public Path getTemplateDirectory() {
final String strVal = getProperty(TEMPLATE_DIRECTORY);
@ -414,7 +414,7 @@ public class NiFiProperties extends Properties {
* Returns the number of partitions that should be used for the FlowFile
* Repository
*
* @return
* @return the number of partitions
*/
public int getFlowFileRepositoryPartitions() {
final String rawProperty = getProperty(FLOWFILE_REPOSITORY_PARTITIONS, DEFAULT_FLOWFILE_REPO_PARTITIONS);
@ -425,7 +425,7 @@ public class NiFiProperties extends Properties {
* Returns the number of milliseconds between FlowFileRepository
* checkpointing
*
* @return
* @return the number of milliseconds between checkpoint events
*/
public String getFlowFileRepositoryCheckpointInterval() {
return getProperty(FLOWFILE_REPOSITORY_CHECKPOINT_INTERVAL, DEFAULT_FLOWFILE_CHECKPOINT_INTERVAL);
@ -551,7 +551,7 @@ public class NiFiProperties extends Properties {
/**
* Returns the auto refresh interval in seconds.
*
* @return
* @return the interval over which the properties should auto refresh
*/
public String getAutoRefreshInterval() {
return getProperty(UI_AUTO_REFRESH_INTERVAL);
@ -829,7 +829,7 @@ public class NiFiProperties extends Properties {
* values configured. No directories will be created as a result of this
* operation.
*
* @return
* @return the name and paths of all provenance repository locations
*/
public Map<String, Path> getProvenanceRepositoryPaths() {
final Map<String, Path> provenanceRepositoryPaths = new HashMap<>();

View File

@ -36,10 +36,11 @@ public final class CertificateUtils {
/**
* Returns true if the given keystore can be loaded using the given keystore
* type and password. Returns false otherwise.
* @param keystore
* @param keystoreType
* @param password
* @return
*
* @param keystore the keystore to validate
* @param keystoreType the type of the keystore
* @param password the password to access the keystore
* @return true if valid; false otherwise
*/
public static boolean isStoreValid(final URL keystore, final KeystoreType keystoreType, final char[] password) {
@ -81,8 +82,8 @@ public final class CertificateUtils {
* returned. If the CN cannot be extracted because the DN is in an
* unrecognized format, the entire DN is returned.
*
* @param dn
* @return
* @param dn the dn to extract the username from
* @return the exatracted username
*/
public static String extractUsername(String dn) {
String username = dn;
@ -135,7 +136,7 @@ public final class CertificateUtils {
final List<String> result = new ArrayList<>();
for (final List<?> generalName : altNames) {
/*
/**
* generalName has the name type as the first element a String or
* byte array for the second element. We return any general names
* that are String types.

View File

@ -100,12 +100,12 @@ public enum SecurityStoreTypes {
/**
* Creates an instance.
*
* @param storeProperty the Java system property for setting the keystore (
* or truststore) path
* @param storeProperty the Java system property for setting the keystore or
* truststore path
* @param storePasswordProperty the Java system property for setting the
* keystore (or truststore) password
* keystore or truststore path
* @param storeTypeProperty the Java system property for setting the
* keystore (or truststore) type
* keystore or truststore type
*/
SecurityStoreTypes(final String storeProperty,
final String storePasswordProperty,

View File

@ -60,12 +60,12 @@ public final class SslContextFactory {
* @param clientAuth the type of client authentication
*
* @return a SSLContext instance
* @throws java.security.KeyStoreException
* @throws java.io.IOException
* @throws java.security.NoSuchAlgorithmException
* @throws java.security.cert.CertificateException
* @throws java.security.UnrecoverableKeyException
* @throws java.security.KeyManagementException
* @throws java.security.KeyStoreException if any issues accessing the keystore
* @throws java.io.IOException for any problems loading the keystores
* @throws java.security.NoSuchAlgorithmException if an algorithm is found to be used but is unknown
* @throws java.security.cert.CertificateException if there is an issue with the certificate
* @throws java.security.UnrecoverableKeyException if the key is insufficient
* @throws java.security.KeyManagementException if unable to manage the key
*/
public static SSLContext createSslContext(
final String keystore, final char[] keystorePasswd, final String keystoreType,
@ -113,12 +113,12 @@ public final class SslContextFactory {
* @param keystoreType the type of keystore (e.g., PKCS12, JKS)
*
* @return a SSLContext instance
* @throws java.security.KeyStoreException
* @throws java.io.IOException
* @throws java.security.NoSuchAlgorithmException
* @throws java.security.cert.CertificateException
* @throws java.security.UnrecoverableKeyException
* @throws java.security.KeyManagementException
* @throws java.security.KeyStoreException if any issues accessing the keystore
* @throws java.io.IOException for any problems loading the keystores
* @throws java.security.NoSuchAlgorithmException if an algorithm is found to be used but is unknown
* @throws java.security.cert.CertificateException if there is an issue with the certificate
* @throws java.security.UnrecoverableKeyException if the key is insufficient
* @throws java.security.KeyManagementException if unable to manage the key
*/
public static SSLContext createSslContext(
final String keystore, final char[] keystorePasswd, final String keystoreType)
@ -149,12 +149,12 @@ public final class SslContextFactory {
* @param truststoreType the type of truststore (e.g., PKCS12, JKS)
*
* @return a SSLContext instance
* @throws java.security.KeyStoreException
* @throws java.io.IOException
* @throws java.security.NoSuchAlgorithmException
* @throws java.security.cert.CertificateException
* @throws java.security.UnrecoverableKeyException
* @throws java.security.KeyManagementException
* @throws java.security.KeyStoreException if any issues accessing the keystore
* @throws java.io.IOException for any problems loading the keystores
* @throws java.security.NoSuchAlgorithmException if an algorithm is found to be used but is unknown
* @throws java.security.cert.CertificateException if there is an issue with the certificate
* @throws java.security.UnrecoverableKeyException if the key is insufficient
* @throws java.security.KeyManagementException if unable to manage the key
*/
public static SSLContext createTrustSslContext(
final String truststore, final char[] truststorePasswd, final String truststoreType)

View File

@ -17,49 +17,46 @@
package org.apache.nifi.flowfile.attributes;
public enum CoreAttributes implements FlowFileAttributeKey {
/**
* The flowfile's path indicates the relative directory to which a FlowFile belongs and does not
* contain the filename
* The flowfile's path indicates the relative directory to which a FlowFile
* belongs and does not contain the filename
*/
PATH("path"),
/**
* The flowfile's absolute path indicates the absolute directory to which a FlowFile belongs and does not
* contain the filename
* The flowfile's absolute path indicates the absolute directory to which a
* FlowFile belongs and does not contain the filename
*/
ABSOLUTE_PATH("absolute.path"),
/**
* The filename of the FlowFile. The filename should not contain any directory structure.
* The filename of the FlowFile. The filename should not contain any
* directory structure.
*/
FILENAME("filename"),
/**
* A unique UUID assigned to this FlowFile
*/
UUID("uuid"),
/**
* A numeric value indicating the FlowFile priority
*/
PRIORITY("priority"),
/**
* The MIME Type of this FlowFile
*/
MIME_TYPE("mime.type"),
/**
* Specifies the reason that a FlowFile is being discarded
*/
DISCARD_REASON("discard.reason"),
/**
* Indicates an identifier other than the FlowFile's UUID that is known to refer to this FlowFile.
* Indicates an identifier other than the FlowFile's UUID that is known to
* refer to this FlowFile.
*/
ALTERNATE_IDENTIFIER("alternate.identifier");
private final String key;
private CoreAttributes(final String key) {
this.key = key;
}

View File

@ -17,5 +17,6 @@
package org.apache.nifi.flowfile.attributes;
public interface FlowFileAttributeKey {
String key();
}

View File

@ -29,7 +29,7 @@ public interface VersionNegotiator {
* Sets the version of this resource to the specified version. Only the
* lower byte of the version is relevant.
*
* @param version
* @param version the version to set
* @throws IllegalArgumentException if the given Version is not supported by
* this resource, as is indicated by the {@link #isVersionSupported(int)}
* method
@ -47,8 +47,8 @@ public interface VersionNegotiator {
* given maxVersion. If no acceptable version exists that is less than
* <code>maxVersion</code>, then <code>null</code> is returned
*
* @param maxVersion
* @return
* @param maxVersion the maximum version desired
* @return the preferred version if found; null otherwise
*/
Integer getPreferredVersion(int maxVersion);
@ -56,8 +56,8 @@ public interface VersionNegotiator {
* Indicates whether or not the specified version is supported by this
* resource
*
* @param version
* @return
* @param version the version to test
* @return true if supported; false otherwise
*/
boolean isVersionSupported(int version);

View File

@ -175,7 +175,8 @@ public class CompressionInputStream extends InputStream {
/**
* Does nothing. Does NOT close underlying InputStream
* @throws java.io.IOException
*
* @throws java.io.IOException for any issues closing underlying stream
*/
@Override
public void close() throws IOException {

View File

@ -61,7 +61,7 @@ public class CompressionOutputStream extends OutputStream {
* Compresses the currently buffered chunk of data and sends it to the
* output stream
*
* @throws IOException
* @throws IOException if issues occur writing to stream
*/
protected void compressAndWrite() throws IOException {
if (bufferIndex <= 0) {

View File

@ -42,7 +42,7 @@ public class BufferStateManager {
* resizing the buffer if necessary. This operation MAY change the direction
* of the buffer.
*
* @param requiredSize
* @param requiredSize the desired size of the buffer
*/
public void ensureSize(final int requiredSize) {
if (buffer.capacity() < requiredSize) {

View File

@ -160,7 +160,8 @@ public class SocketChannelInputStream extends InputStream {
/**
* Closes the underlying socket channel.
* @throws java.io.IOException
*
* @throws java.io.IOException for issues closing underlying stream
*/
@Override
public void close() throws IOException {

View File

@ -104,7 +104,8 @@ public class SocketChannelOutputStream extends OutputStream {
/**
* Closes the underlying SocketChannel
* @throws java.io.IOException
*
* @throws java.io.IOException if issues closing underlying stream
*/
@Override
public void close() throws IOException {

View File

@ -98,8 +98,7 @@ public class ByteArrayOutputStream extends OutputStream {
newCapacity = minCapacity;
}
if (newCapacity < 0) {
if (minCapacity < 0) // overflow
{
if (minCapacity < 0) { // overflow
throw new OutOfMemoryError();
}
newCapacity = Integer.MAX_VALUE;
@ -170,8 +169,7 @@ public class ByteArrayOutputStream extends OutputStream {
* @return the current contents of this output stream, as a byte array.
* @see java.io.ByteArrayOutputStream#size()
*/
public byte toByteArray ()
[] {
public byte[] toByteArray() {
return Arrays.copyOf(buf, count);
}

View File

@ -39,8 +39,6 @@ public class ByteCountingOutputStream extends OutputStream {
write(b, 0, b.length);
}
;
@Override
public void write(byte[] b, int off, int len) throws IOException {
out.write(b, off, len);

View File

@ -22,8 +22,8 @@ import java.io.IOException;
import java.io.InputStream;
/**
* An InputStream that will throw EOFException if the underlying InputStream runs out of data before reaching the
* configured minimum amount of data
* An InputStream that will throw EOFException if the underlying InputStream
* runs out of data before reaching the configured minimum amount of data
*/
public class MinimumLengthInputStream extends FilterInputStream {
@ -35,7 +35,6 @@ public class MinimumLengthInputStream extends FilterInputStream {
this.minLength = minLength;
}
@Override
public int read() throws IOException {
final int b = super.read();

View File

@ -44,10 +44,10 @@ public class StreamUtils {
* <code>destination</code>. If <code>numBytes</code> are not available from
* <code>source</code>, throws EOFException
*
* @param source
* @param destination
* @param numBytes
* @throws IOException
* @param source the source of bytes to copy
* @param destination the destination to copy bytes to
* @param numBytes the number of bytes to copy
* @throws IOException if any issues occur while copying
*/
public static void copy(final InputStream source, final OutputStream destination, final long numBytes) throws IOException {
final byte[] buffer = new byte[8192];
@ -68,9 +68,9 @@ public class StreamUtils {
* byte array. If the InputStream has less data than the given byte array,
* throws an EOFException
*
* @param source
* @param destination
* @throws IOException
* @param source the source to copy bytes from
* @param destination the destination to fill
* @throws IOException if any issues occur reading bytes
*/
public static void fillBuffer(final InputStream source, final byte[] destination) throws IOException {
fillBuffer(source, destination, true);
@ -82,12 +82,12 @@ public class StreamUtils {
* throws an EOFException if <code>ensureCapacity</code> is true and
* otherwise returns the number of bytes copied
*
* @param source
* @param destination
* @param source the source to read bytes from
* @param destination the destination to fill
* @param ensureCapacity whether or not to enforce that the InputStream have
* at least as much data as the capacity of the destination byte array
* @return
* @throws IOException
* @return the number of bytes actually filled
* @throws IOException if unable to read from the underlying stream
*/
public static int fillBuffer(final InputStream source, final byte[] destination, final boolean ensureCapacity) throws IOException {
int bytesRead = 0;
@ -114,19 +114,19 @@ public class StreamUtils {
* <code>stoppers</code> parameter (returns the byte pattern matched). The
* bytes in the stopper will be copied.
*
* @param in
* @param out
* @param maxBytes
* @param stoppers
* @param in the source to read bytes from
* @param out the destination to write bytes to
* @param maxBytes the max bytes to copy
* @param stoppers patterns of bytes which if seen will cause the copy to stop
* @return the byte array matched, or null if end of stream was reached
* @throws IOException
* @throws IOException if issues occur reading or writing bytes to the underlying streams
*/
public static byte[] copyInclusive(final InputStream in, final OutputStream out, final int maxBytes, final byte[]... stoppers) throws IOException {
if (stoppers.length == 0) {
return null;
}
final List<NonThreadSafeCircularBuffer> circularBuffers = new ArrayList<NonThreadSafeCircularBuffer>();
final List<NonThreadSafeCircularBuffer> circularBuffers = new ArrayList<>();
for (final byte[] stopper : stoppers) {
circularBuffers.add(new NonThreadSafeCircularBuffer(stopper));
}
@ -157,12 +157,12 @@ public class StreamUtils {
* byte pattern matched will NOT be copied to the output and will be un-read
* from the input.
*
* @param in
* @param out
* @param maxBytes
* @param stoppers
* @param in the source to read bytes from
* @param out the destination to write bytes to
* @param maxBytes the maximum number of bytes to copy
* @param stoppers byte patterns which will cause the copy to stop if found
* @return the byte array matched, or null if end of stream was reached
* @throws IOException
* @throws IOException for issues reading or writing to underlying streams
*/
public static byte[] copyExclusive(final InputStream in, final OutputStream out, final int maxBytes, final byte[]... stoppers) throws IOException {
if (stoppers.length == 0) {
@ -171,7 +171,7 @@ public class StreamUtils {
int longest = 0;
NonThreadSafeCircularBuffer longestBuffer = null;
final List<NonThreadSafeCircularBuffer> circularBuffers = new ArrayList<NonThreadSafeCircularBuffer>();
final List<NonThreadSafeCircularBuffer> circularBuffers = new ArrayList<>();
for (final byte[] stopper : stoppers) {
final NonThreadSafeCircularBuffer circularBuffer = new NonThreadSafeCircularBuffer(stopper);
if (stopper.length > longest) {
@ -220,9 +220,9 @@ public class StreamUtils {
*
* If unable to skip that number of bytes, throws EOFException
*
* @param stream
* @param bytesToSkip
* @throws IOException
* @param stream the stream to skip over
* @param bytesToSkip the number of bytes to skip
* @throws IOException if any issues reading or skipping underlying stream
*/
public static void skip(final InputStream stream, final long bytesToSkip) throws IOException {
if (bytesToSkip <= 0) {

View File

@ -38,7 +38,7 @@ public class NonThreadSafeCircularBuffer {
/**
* Returns the oldest byte in the buffer
*
* @return
* @return the oldest byte
*/
public int getOldestByte() {
return buffer[insertionPointer];

View File

@ -19,11 +19,12 @@ package org.apache.nifi.util;
public class EscapeUtils {
/**
* Escapes the specified html by replacing &amp;, &lt;, &gt;, &quot;, &#39;, &#x2f;
* with their corresponding html entity. If html is null, null is returned.
* Escapes the specified html by replacing &amp;, &lt;, &gt;, &quot;, &#39;,
* &#x2f; with their corresponding html entity. If html is null, null is
* returned.
*
* @param html
* @return
* @param html to escape
* @return escaped html
*/
public static String escapeHtml(String html) {
if (html == null) {

View File

@ -49,8 +49,8 @@ public class FormatUtils {
/**
* Formats the specified count by adding commas.
*
* @param count
* @return
* @param count the value to add commas to
* @return the string representation of the given value with commas included
*/
public static String formatCount(final long count) {
return NumberFormat.getIntegerInstance().format(count);
@ -59,9 +59,9 @@ public class FormatUtils {
/**
* Formats the specified duration in 'mm:ss.SSS' format.
*
* @param sourceDuration
* @param sourceUnit
* @return
* @param sourceDuration the duration to format
* @param sourceUnit the unit to interpret the duration
* @return representation of the given time data in minutes/seconds
*/
public static String formatMinutesSeconds(final long sourceDuration, final TimeUnit sourceUnit) {
final long millis = TimeUnit.MILLISECONDS.convert(sourceDuration, sourceUnit);
@ -72,9 +72,9 @@ public class FormatUtils {
/**
* Formats the specified duration in 'HH:mm:ss.SSS' format.
*
* @param sourceDuration
* @param sourceUnit
* @return
* @param sourceDuration the duration to format
* @param sourceUnit the unit to interpret the duration
* @return representation of the given time data in hours/minutes/seconds
*/
public static String formatHoursMinutesSeconds(final long sourceDuration, final TimeUnit sourceUnit) {
final long millis = TimeUnit.MILLISECONDS.convert(sourceDuration, sourceUnit);

View File

@ -60,12 +60,10 @@ public class NaiveSearchRingBuffer {
}
/**
* Returns the contents of the internal buffer, which represents the last X
* @return the contents of the internal buffer, which represents the last X
* bytes added to the buffer, where X is the minimum of the number of bytes
* added to the buffer or the length of the byte sequence for which we are
* looking
*
* @return
*/
public byte[] getBufferContents() {
final int contentLength = Math.min(lookingFor.length, bufferSize);
@ -78,20 +76,16 @@ public class NaiveSearchRingBuffer {
}
/**
* Returns the oldest byte in the buffer
*
* @return
* @return the oldest byte in the buffer
*/
public int getOldestByte() {
return buffer[insertionPointer];
}
/**
* Returns <code>true</code> if the number of bytes that have been added to
* @return <code>true</code> if the number of bytes that have been added to
* the buffer is at least equal to the length of the byte sequence for which
* we are searching
*
* @return
*/
public boolean isFilled() {
return bufferSize >= buffer.length;
@ -110,7 +104,7 @@ public class NaiveSearchRingBuffer {
* Add the given byte to the buffer and notify whether or not the byte
* completes the desired byte sequence.
*
* @param data
* @param data the data to add to the buffer
* @return <code>true</code> if this byte completes the byte sequence,
* <code>false</code> otherwise.
*/

View File

@ -19,7 +19,6 @@ package org.apache.nifi.util;
/**
* A bean that holds a single value of type T.
*
* @param <T>
*/
public class ObjectHolder<T> {

View File

@ -26,7 +26,6 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
/**
* Thread-safe implementation of a RingBuffer
*
* @param <T>
*/
public class RingBuffer<T> {
@ -46,8 +45,8 @@ public class RingBuffer<T> {
* Adds the given value to the RingBuffer and returns the value that was
* removed in order to make room.
*
* @param value
* @return
* @param value the new value to add
* @return value previously in the buffer
*/
@SuppressWarnings("unchecked")
public T add(final T value) {
@ -135,8 +134,8 @@ public class RingBuffer<T> {
/**
* Removes all elements from the RingBuffer that match the given filter
*
* @param filter
* @return
* @param filter to use for deciding what is removed
* @return always zero
*/
public int removeSelectedElements(final Filter<T> filter) {
int count = 0;
@ -209,7 +208,7 @@ public class RingBuffer<T> {
* will skip all remaining elements in the RingBuffer; otherwise, the next
* element will be evaluated until all elements have been evaluated.
*
* @param evaluator
* @param evaluator used to evaluate each item in the ring buffer
*/
public void forEach(final ForEachEvaluator<T> evaluator) {
forEach(evaluator, IterationDirection.FORWARD);
@ -222,7 +221,7 @@ public class RingBuffer<T> {
* will skip all remaining elements in the RingBuffer; otherwise, the next
* element will be evaluated until all elements have been evaluated.
*
* @param evaluator
* @param evaluator the evaluator
* @param iterationDirection the order in which to iterate over the elements
* in the RingBuffer
*/
@ -270,7 +269,7 @@ public class RingBuffer<T> {
* Defines an interface that can be used to iterate over all of the elements
* in the RingBuffer via the {@link #forEach} method
*
* @param <S>
* @param <S> the type to evaluate
*/
public static interface ForEachEvaluator<S> {
@ -278,8 +277,8 @@ public class RingBuffer<T> {
* Evaluates the given element and returns {@code true} if the next
* element should be evaluated, {@code false} otherwise
*
* @param value
* @return
* @param value the value to evaluate
* @return true if should continue evaluating; false otherwise
*/
boolean evaluate(S value);
}

View File

@ -55,8 +55,8 @@ public final class StopWatch {
/**
* Returns the amount of time that the StopWatch was running.
*
* @param timeUnit
* @return
* @param timeUnit the unit for which the duration should be reported
* @return the duration of the stopwatch in the specified unit
*
* @throws IllegalStateException if the StopWatch has not been stopped via
* {@link #stop()}
@ -71,8 +71,8 @@ public final class StopWatch {
/**
* Returns the amount of time that has elapsed since the timer was started.
*
* @param timeUnit
* @return
* @param timeUnit the unit for which the elapsed time should be computed
* @return the elapsed time in the specified unit
*/
public long getElapsed(final TimeUnit timeUnit) {
return timeUnit.convert(System.nanoTime() - startNanos, TimeUnit.NANOSECONDS);

View File

@ -16,12 +16,6 @@
*/
package org.apache.nifi.util;
/**
*
* @author unattrib
* @param <A>
* @param <B>
*/
public class Tuple<A, B> {
final A key;

View File

@ -29,7 +29,7 @@ public class DebugDisabledTimedLock implements DebuggableTimedLock {
/**
*
* @return
* @return true if lock obtained; false otherwise
*/
@Override
public boolean tryLock() {
@ -38,9 +38,9 @@ public class DebugDisabledTimedLock implements DebuggableTimedLock {
/**
*
* @param timeout
* @param timeUnit
* @return
* @param timeout the duration of time to wait for the lock
* @param timeUnit the unit which provides meaning to the duration
* @return true if obtained lock in time; false otherwise
*/
@Override
public boolean tryLock(final long timeout, final TimeUnit timeUnit) {
@ -51,9 +51,6 @@ public class DebugDisabledTimedLock implements DebuggableTimedLock {
}
}
/**
*
*/
@Override
public void lock() {
lock.lock();

View File

@ -44,8 +44,7 @@ public class DebugEnabledTimedLock implements DebuggableTimedLock {
}
/**
*
* @return
* @return true if lock obtained; false otherwise
*/
@Override
public boolean tryLock() {
@ -61,10 +60,9 @@ public class DebugEnabledTimedLock implements DebuggableTimedLock {
}
/**
*
* @param timeout
* @param timeUnit
* @return
* @param timeout duration to wait for lock
* @param timeUnit unit to understand given duration
* @return true if lock obtained in time; false otherwise
*/
@Override
public boolean tryLock(final long timeout, final TimeUnit timeUnit) {
@ -84,9 +82,6 @@ public class DebugEnabledTimedLock implements DebuggableTimedLock {
return true;
}
/**
*
*/
@Override
public void lock() {
logger.trace("Obtaining Lock {}", name);
@ -96,8 +91,7 @@ public class DebugEnabledTimedLock implements DebuggableTimedLock {
}
/**
*
* @param task
* @param task to release the lock for
*/
@Override
public void unlock(final String task) {

View File

@ -16,7 +16,6 @@
*/
package org.apache.nifi.util.file;
import java.io.BufferedInputStream;
import java.io.Closeable;
import java.io.File;
import java.io.FileInputStream;
@ -53,7 +52,7 @@ public class FileUtils {
/**
* Closes the given closeable quietly - no logging, no exceptions...
*
* @param closeable
* @param closeable the thing to close
*/
public static void closeQuietly(final Closeable closeable) {
if (null != closeable) {
@ -66,9 +65,9 @@ public class FileUtils {
}
/**
* Releases the given lock quietly - no logging, no exception
* Releases the given lock quietly no logging, no exception
*
* @param lock
* @param lock the lock to release
*/
public static void releaseQuietly(final FileLock lock) {
if (null != lock) {
@ -98,9 +97,10 @@ public class FileUtils {
* Deletes the given file. If the given file exists but could not be deleted
* this will be printed as a warning to the given logger
*
* @param file
* @param logger
* @return
* @param file the file to delete
* @param logger the logger to provide logging information to about the
* operation
* @return true if given file no longer exists
*/
public static boolean deleteFile(final File file, final Logger logger) {
return FileUtils.deleteFile(file, logger, 1);
@ -110,8 +110,8 @@ public class FileUtils {
* Deletes the given file. If the given file exists but could not be deleted
* this will be printed as a warning to the given logger
*
* @param file
* @param logger
* @param file the file to delete
* @param logger the logger to write to
* @param attempts indicates how many times an attempt to delete should be
* made
* @return true if given file no longer exists
@ -192,9 +192,9 @@ public class FileUtils {
* recursive) that match the given filename filter. If any file cannot be
* deleted then this is printed at warn to the given logger.
*
* @param directory
* @param directory the directory to scan for files to delete
* @param filter if null then no filter is used
* @param logger
* @param logger the logger to use
*/
public static void deleteFilesInDir(final File directory, final FilenameFilter filter, final Logger logger) {
FileUtils.deleteFilesInDir(directory, filter, logger, false);
@ -205,10 +205,10 @@ public class FileUtils {
* that match the given filename filter. If any file cannot be deleted then
* this is printed at warn to the given logger.
*
* @param directory
* @param directory the directory to scan
* @param filter if null then no filter is used
* @param logger
* @param recurse
* @param logger the logger to use
* @param recurse indicates whether to recurse subdirectories
*/
public static void deleteFilesInDir(final File directory, final FilenameFilter filter, final Logger logger, final boolean recurse) {
FileUtils.deleteFilesInDir(directory, filter, logger, recurse, false);
@ -219,10 +219,10 @@ public class FileUtils {
* that match the given filename filter. If any file cannot be deleted then
* this is printed at warn to the given logger.
*
* @param directory
* @param directory the directory to scan
* @param filter if null then no filter is used
* @param logger
* @param recurse
* @param logger the logger
* @param recurse whether to recurse subdirectories or not
* @param deleteEmptyDirectories default is false; if true will delete
* directories found that are empty
*/
@ -248,9 +248,9 @@ public class FileUtils {
/**
* Deletes given files.
*
* @param files
* @param recurse will recurse
* @throws IOException
* @param files the files to delete
* @param recurse will recurse if true; false otherwise
* @throws IOException if any issues deleting specified files
*/
public static void deleteFiles(final Collection<File> files, final boolean recurse) throws IOException {
for (final File file : files) {
@ -352,8 +352,8 @@ public class FileUtils {
* Copies the given source file to the given destination file. The given
* destination will be overwritten if it already exists.
*
* @param source
* @param destination
* @param source the file to copy
* @param destination the file to copy to
* @param lockInputFile if true will lock input file during copy; if false
* will not
* @param lockOutputFile if true will lock output file during copy; if false
@ -369,11 +369,12 @@ public class FileUtils {
* indicating the problem.
* @return long number of bytes copied
* @throws FileNotFoundException if the source file could not be found
* @throws IOException
* @throws IOException if unable to read or write the underlying streams
* @throws SecurityException if a security manager denies the needed file
* operations
*/
public static long copyFile(final File source, final File destination, final boolean lockInputFile, final boolean lockOutputFile, final boolean move, final Logger logger) throws FileNotFoundException, IOException {
public static long copyFile(final File source, final File destination, final boolean lockInputFile, final boolean lockOutputFile, final boolean move, final Logger logger)
throws FileNotFoundException, IOException {
FileInputStream fis = null;
FileOutputStream fos = null;
@ -436,16 +437,16 @@ public class FileUtils {
* Copies the given source file to the given destination file. The given
* destination will be overwritten if it already exists.
*
* @param source
* @param destination
* @param source the file to copy from
* @param destination the file to copy to
* @param lockInputFile if true will lock input file during copy; if false
* will not
* @param lockOutputFile if true will lock output file during copy; if false
* will not
* @param logger
* @param logger the logger to use
* @return long number of bytes copied
* @throws FileNotFoundException if the source file could not be found
* @throws IOException
* @throws IOException if unable to read or write to file
* @throws SecurityException if a security manager denies the needed file
* operations
*/

View File

@ -61,8 +61,8 @@ public class SynchronousFileWatcher {
* Checks if the file has been updated according to the configured
* {@link UpdateMonitor} and resets the state
*
* @return
* @throws IOException
* @return true if updated; false otherwise
* @throws IOException if failure occurs checking for changes
*/
public boolean checkAndReset() throws IOException {
if (checkUpdateMillis <= 0) { // if checkUpdateMillis <= 0, always check

View File

@ -26,8 +26,6 @@ import org.apache.nifi.util.search.ahocorasick.SearchState;
* Defines an interface to search for content given a set of search terms. Any
* implementation of search must be thread safe.
*
* @author
* @param <T>
*/
public interface Search<T> {
@ -35,7 +33,7 @@ public interface Search<T> {
* Establishes the dictionary of terms which will be searched in subsequent
* search calls. This can be called only once
*
* @param terms
* @param terms the terms to create a dictionary of
*/
void initializeDictionary(Set<SearchTerm<T>> terms);
@ -43,7 +41,7 @@ public interface Search<T> {
* Searches the given input stream for matches between the already specified
* dictionary and the contents scanned.
*
* @param haystack
* @param haystack the source data to scan for hits
* @param findAll if true will find all matches if false will find only the
* first match
* @return SearchState containing results Map might be empty which indicates

View File

@ -22,8 +22,6 @@ import java.util.Arrays;
/**
* This is an immutable thread safe object representing a search term
*
* @author
* @param <T>
*/
public class SearchTerm<T> {
@ -34,8 +32,8 @@ public class SearchTerm<T> {
/**
* Constructs a SearchTerm. Defensively copies the given byte array
*
* @param bytes
* @throws IllegalArgument exception if given bytes are null or 0 length
* @param bytes the bytes of the search term
* @throws IllegalArgumentException if given bytes are null or 0 length
*/
public SearchTerm(final byte[] bytes) {
this(bytes, true, null);
@ -46,9 +44,9 @@ public class SearchTerm<T> {
* given byte array. If the caller indicates a defensive copy is not
* necessary then they must not change the given arrays state any longer
*
* @param bytes
* @param defensiveCopy
* @param reference
* @param bytes the bytes of the new search term
* @param defensiveCopy if true will make a defensive copy; false otherwise
* @param reference a holder for an object which can be retrieved when this search term hits
*/
public SearchTerm(final byte[] bytes, final boolean defensiveCopy, final T reference) {
if (bytes == null || bytes.length == 0) {
@ -84,7 +82,7 @@ public class SearchTerm<T> {
/**
* Determines if the given window starts with the same bytes as this term
*
* @param window Current window of bytes from the haystack being evaluated.
* @param window bytes from the haystack being evaluated
* @param windowLength The length of the window to consider
* @return true if this term starts with the same bytes of the given window
*/

View File

@ -27,7 +27,6 @@ import java.io.OutputStream;
import java.nio.file.Path;
import java.util.UUID;
import org.junit.Test;
public class TestCompoundUpdateMonitor {

View File

@ -30,7 +30,6 @@ import java.nio.file.StandardCopyOption;
import org.junit.Test;
public class TestSynchronousFileWatcher {
@Test

View File

@ -40,10 +40,10 @@ public class ClientUtils {
/**
* Gets the content at the specified URI.
*
* @param uri
* @return
* @throws ClientHandlerException
* @throws UniformInterfaceException
* @param uri the URI to get the content of
* @return the client response resulting from getting the content of the URI
* @throws ClientHandlerException if issues occur handling the request
* @throws UniformInterfaceException if any interface violations occur
*/
public ClientResponse get(final URI uri) throws ClientHandlerException, UniformInterfaceException {
return get(uri, null);
@ -52,11 +52,11 @@ public class ClientUtils {
/**
* Gets the content at the specified URI using the given query parameters.
*
* @param uri
* @param queryParams
* @return
* @throws ClientHandlerException
* @throws UniformInterfaceException
* @param uri the URI to get the content of
* @param queryParams the query parameters to use in the request
* @return the client response resulting from getting the content of the URI
* @throws ClientHandlerException if issues occur handling the request
* @throws UniformInterfaceException if any interface violations occur
*/
public ClientResponse get(final URI uri, final Map<String, String> queryParams) throws ClientHandlerException, UniformInterfaceException {
// perform the request
@ -73,9 +73,9 @@ public class ClientUtils {
/**
* Performs a POST using the specified url and entity body.
*
* @param uri
* @param entity
* @return
* @param uri the URI to post to
* @param entity the item to post
* @return the client response of the request
*/
public ClientResponse post(URI uri, Object entity) throws ClientHandlerException, UniformInterfaceException {
// get the resource
@ -93,9 +93,9 @@ public class ClientUtils {
/**
* Performs a POST using the specified url and form data.
*
* @param uri
* @param formData
* @return
* @param uri the uri to post to
* @param formData the data to post
* @return the client reponse of the post
*/
public ClientResponse post(URI uri, Map<String, String> formData) throws ClientHandlerException, UniformInterfaceException {
// convert the form data
@ -119,10 +119,10 @@ public class ClientUtils {
/**
* Performs a HEAD request to the specified URI.
*
* @param uri
* @return
* @throws ClientHandlerException
* @throws UniformInterfaceException
* @param uri the uri to request the head of
* @return the client response of the request
* @throws ClientHandlerException for issues handling the request
* @throws UniformInterfaceException for issues with the request
*/
public ClientResponse head(final URI uri) throws ClientHandlerException, UniformInterfaceException {
// perform the request

View File

@ -103,6 +103,15 @@
</value>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludes>
<exclude>src/main/asciidoc/asciidoc-mod.css</exclude> <!-- MIT license confirmed. Excluding due to parse error-->
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>

View File

@ -34,9 +34,7 @@ public class BulletinBoardDTO {
private Date generated;
/**
* The bulletins to populate in the bulletin board.
*
* @return
* @return bulletins to populate in the bulletin board
*/
public List<BulletinDTO> getBulletins() {
return bulletins;
@ -47,9 +45,7 @@ public class BulletinBoardDTO {
}
/**
* When this bulletin board was generated.
*
* @return
* @return when this bulletin board was generated
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
public Date getGenerated() {

View File

@ -40,9 +40,7 @@ public class BulletinDTO {
private Date timestamp;
/**
* The id of this message.
*
* @return
* @return id of this message
*/
public Long getId() {
return id;
@ -53,10 +51,8 @@ public class BulletinDTO {
}
/**
* When clustered, the address of the node from which this bulletin
* originated.
*
* @return
* @return When clustered, the address of the node from which this bulletin
* originated
*/
public String getNodeAddress() {
return nodeAddress;
@ -67,9 +63,7 @@ public class BulletinDTO {
}
/**
* The group id of the source component.
*
* @return
* @return group id of the source component
*/
public String getGroupId() {
return groupId;
@ -80,9 +74,7 @@ public class BulletinDTO {
}
/**
* The category of this message.
*
* @return
* @return category of this message
*/
public String getCategory() {
return category;
@ -93,9 +85,7 @@ public class BulletinDTO {
}
/**
* The actual message.
*
* @return
* @return actual message
*/
public String getMessage() {
return message;
@ -106,9 +96,7 @@ public class BulletinDTO {
}
/**
* The id of the source of this message.
*
* @return
* @return id of the source of this message
*/
public String getSourceId() {
return sourceId;
@ -119,9 +107,7 @@ public class BulletinDTO {
}
/**
* The name of the source of this message.
*
* @return
* @return name of the source of this message
*/
public String getSourceName() {
return sourceName;
@ -132,9 +118,7 @@ public class BulletinDTO {
}
/**
* The level of this bulletin.
*
* @return
* @return level of this bulletin
*/
public String getLevel() {
return level;
@ -145,9 +129,7 @@ public class BulletinDTO {
}
/**
* When this bulletin was generated as a formatted string.
*
* @return
* @return When this bulletin was generated as a formatted string
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
public Date getTimestamp() {

View File

@ -33,9 +33,7 @@ public class BulletinQueryDTO {
private Integer limit;
/**
* Include bulletins after this id.
*
* @return
* @return Include bulletins after this id
*/
public Long getAfter() {
return after;
@ -46,9 +44,7 @@ public class BulletinQueryDTO {
}
/**
* Include bulletin within this group. Supports a regular expression.
*
* @return
* @return Include bulletin within this group. Supports a regular expression
*/
public String getGroupId() {
return groupId;
@ -59,9 +55,7 @@ public class BulletinQueryDTO {
}
/**
* Include bulletins that match this message. Supports a regular expression.
*
* @return
* @return Include bulletins that match this message. Supports a regular expression
*/
public String getMessage() {
return message;
@ -72,9 +66,7 @@ public class BulletinQueryDTO {
}
/**
* Include bulletins that match this name. Supports a regular expression.
*
* @return
* @return Include bulletins that match this name. Supports a regular expression
*/
public String getName() {
return name;
@ -85,9 +77,7 @@ public class BulletinQueryDTO {
}
/**
* Include bulletins that match this id. Supports a source id.
*
* @return
* @return Include bulletins that match this id. Supports a source id
*/
public String getSourceId() {
return sourceId;
@ -98,9 +88,7 @@ public class BulletinQueryDTO {
}
/**
* The maximum number of bulletins to return.
*
* @return
* @return The maximum number of bulletins to return
*/
public Integer getLimit() {
return limit;

View File

@ -33,9 +33,7 @@ public class ClusterDTO {
private Date generated;
/**
* The collection of the node DTOs.
*
* @return
* @return collection of the node DTOs
*/
public Collection<NodeDTO> getNodes() {
return nodes;
@ -46,9 +44,7 @@ public class ClusterDTO {
}
/**
* Gets the date/time that this report was generated.
*
* @return
* @return the date/time that this report was generated
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
public Date getGenerated() {

View File

@ -29,9 +29,7 @@ public class ComponentHistoryDTO {
private Map<String, PropertyHistoryDTO> propertyHistory;
/**
* The component id.
*
* @return
* @return component id
*/
public String getComponentId() {
return componentId;
@ -42,9 +40,7 @@ public class ComponentHistoryDTO {
}
/**
* The history for this components properties.
*
* @return
* @return history for this components properties
*/
public Map<String, PropertyHistoryDTO> getPropertyHistory() {
return propertyHistory;

View File

@ -34,9 +34,7 @@ public class ConnectableDTO {
private String comments;
/**
* The id of this connectable component.
*
* @return
* @return id of this connectable component
*/
public String getId() {
return id;
@ -47,9 +45,7 @@ public class ConnectableDTO {
}
/**
* The type of this connectable component.
*
* @return
* @return type of this connectable component
*/
public String getType() {
return type;
@ -60,9 +56,7 @@ public class ConnectableDTO {
}
/**
* The id of the group that this connectable component resides in.
*
* @return
* @return id of the group that this connectable component resides in
*/
public String getGroupId() {
return groupId;
@ -73,9 +67,7 @@ public class ConnectableDTO {
}
/**
* The name of this connectable component.
*
* @return
* @return name of this connectable component
*/
public String getName() {
return name;
@ -86,9 +78,7 @@ public class ConnectableDTO {
}
/**
* Used to reflect the current state of this Connectable.
*
* @return
* @return Used to reflect the current state of this Connectable
*/
public Boolean isRunning() {
return running;
@ -99,10 +89,8 @@ public class ConnectableDTO {
}
/**
* If this represents a remote port it is used to indicate whether the
* target exists.
*
* @return
* @return If this represents a remote port it is used to indicate whether the
* target exists
*/
public Boolean getExists() {
return exists;
@ -113,10 +101,8 @@ public class ConnectableDTO {
}
/**
* If this represents a remote port it is used to indicate whether is it
* configured to transmit.
*
* @return
* @return If this represents a remote port it is used to indicate whether is it
* configured to transmit
*/
public Boolean getTransmitting() {
return transmitting;
@ -127,9 +113,7 @@ public class ConnectableDTO {
}
/**
* The comments from this Connectable.
*
* @return
* @return The comments from this Connectable
*/
public String getComments() {
return comments;

View File

@ -67,9 +67,7 @@ public class ConnectionDTO extends NiFiComponentDTO {
}
/**
* The name of the connection.
*
* @return
* @return name of the connection
*/
public String getName() {
return name;
@ -80,9 +78,7 @@ public class ConnectionDTO extends NiFiComponentDTO {
}
/**
* The position of the bend points on this connection.
*
* @return
* @return position of the bend points on this connection
*/
public List<PositionDTO> getBends() {
return bends;
@ -93,10 +89,8 @@ public class ConnectionDTO extends NiFiComponentDTO {
}
/**
* The index of control point that the connection label should be placed
* over.
*
* @return
* @return The index of control point that the connection label should be placed
* over
*/
public Integer getLabelIndex() {
return labelIndex;
@ -107,9 +101,7 @@ public class ConnectionDTO extends NiFiComponentDTO {
}
/**
* The z index for this connection.
*
* @return
* @return z index for this connection
*/
public Long getzIndex() {
return zIndex;
@ -133,10 +125,8 @@ public class ConnectionDTO extends NiFiComponentDTO {
}
/**
* The relationships that the source of the connection currently supports.
* This property is read only.
*
* @return
* @return relationships that the source of the connection currently supports.
* This property is read only
*/
public Set<String> getAvailableRelationships() {
return availableRelationships;

View File

@ -42,9 +42,7 @@ public class ControllerConfigurationDTO {
private String uri;
/**
* The maximum number of timer driven threads this NiFi has available.
*
* @return The maximum number of threads
* @return maximum number of timer driven threads this NiFi has available
*/
public Integer getMaxTimerDrivenThreadCount() {
return maxTimerDrivenThreadCount;
@ -55,9 +53,7 @@ public class ControllerConfigurationDTO {
}
/**
* The maximum number of event driven thread this NiFi has available.
*
* @return
* @return maximum number of event driven thread this NiFi has available
*/
public Integer getMaxEventDrivenThreadCount() {
return maxEventDrivenThreadCount;
@ -68,9 +64,7 @@ public class ControllerConfigurationDTO {
}
/**
* The name of this NiFi.
*
* @return The name
* @return name of this NiFi
*/
public String getName() {
return name;
@ -81,9 +75,7 @@ public class ControllerConfigurationDTO {
}
/**
* The comments for this NiFi.
*
* @return
* @return comments for this NiFi
*/
public String getComments() {
return comments;
@ -94,10 +86,8 @@ public class ControllerConfigurationDTO {
}
/**
* The interval in seconds between the automatic NiFi refresh requests. This
* value is read only.
*
* @return The interval in seconds
* @return interval in seconds between the automatic NiFi refresh requests. This
* value is read only
*/
public Long getAutoRefreshIntervalSeconds() {
return autoRefreshIntervalSeconds;
@ -108,10 +98,8 @@ public class ControllerConfigurationDTO {
}
/**
* Indicates whether or not Site-to-Site communications with this instance
* is secure (2-way authentication). This value is read only.
*
* @return
* @return Indicates whether or not Site-to-Site communications with this instance
* is secure (2-way authentication). This value is read only
*/
public Boolean isSiteToSiteSecure() {
return siteToSiteSecure;
@ -122,9 +110,7 @@ public class ControllerConfigurationDTO {
}
/**
* The current time on the server.
*
* @return
* @return current time on the server
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
public Date getCurrentTime() {
@ -136,9 +122,7 @@ public class ControllerConfigurationDTO {
}
/**
* The time offset of the server.
*
* @return
* @return time offset of the server
*/
public Integer getTimeOffset() {
return timeOffset;
@ -149,9 +133,7 @@ public class ControllerConfigurationDTO {
}
/**
* Returns the URL for the content viewer if configured.
*
* @return
* @return the URL for the content viewer if configured
*/
public String getContentViewerUrl() {
return contentViewerUrl;
@ -162,9 +144,7 @@ public class ControllerConfigurationDTO {
}
/**
* The URI for this NiFi controller.
*
* @return
* @return URI for this NiFi controller
*/
public String getUri() {
return uri;

View File

@ -48,9 +48,7 @@ public class ControllerDTO {
private Set<PortDTO> outputPorts;
/**
* The id of this NiFi controller.
*
* @return
* @return id of this NiFi controller
*/
public String getId() {
return id;
@ -74,9 +72,7 @@ public class ControllerDTO {
}
/**
* The comments of this NiFi controller.
*
* @return
* @return comments of this NiFi controller
*/
public String getComments() {
return comments;
@ -87,9 +83,7 @@ public class ControllerDTO {
}
/**
* The input ports available to send data to this NiFi controller.
*
* @return
* @return input ports available to send data to this NiFi controller
*/
public Set<PortDTO> getInputPorts() {
return inputPorts;
@ -100,9 +94,7 @@ public class ControllerDTO {
}
/**
* The output ports available to received data from this NiFi controller.
*
* @return
* @return output ports available to received data from this NiFi controller
*/
public Set<PortDTO> getOutputPorts() {
return outputPorts;
@ -113,10 +105,8 @@ public class ControllerDTO {
}
/**
* The Instance ID of the cluster, if this node is connected to a Cluster
* @return Instance ID of the cluster, if this node is connected to a Cluster
* Manager, or of this individual instance of in standalone mode
*
* @return
*/
public String getInstanceId() {
return instanceId;
@ -143,10 +133,8 @@ public class ControllerDTO {
}
/**
* Indicates whether or not Site-to-Site communications with this instance
* @return Indicates whether or not Site-to-Site communications with this instance
* is secure (2-way authentication)
*
* @return
*/
public Boolean isSiteToSiteSecure() {
return siteToSiteSecure;
@ -157,9 +145,7 @@ public class ControllerDTO {
}
/**
* The number of running components in this process group.
*
* @return
* @return number of running components in this process group
*/
public Integer getRunningCount() {
return runningCount;
@ -170,9 +156,7 @@ public class ControllerDTO {
}
/**
* The number of stopped components in this process group.
*
* @return
* @return number of stopped components in this process group
*/
public Integer getStoppedCount() {
return stoppedCount;
@ -183,9 +167,7 @@ public class ControllerDTO {
}
/**
* The number of active remote ports contained in this process group.
*
* @return
* @return number of active remote ports contained in this process group
*/
public Integer getActiveRemotePortCount() {
return activeRemotePortCount;
@ -196,9 +178,7 @@ public class ControllerDTO {
}
/**
* The number of inactive remote ports contained in this process group.
*
* @return
* @return number of inactive remote ports contained in this process group
*/
public Integer getInactiveRemotePortCount() {
return inactiveRemotePortCount;
@ -209,9 +189,7 @@ public class ControllerDTO {
}
/**
* The number of input ports contained in this process group.
*
* @return
* @return number of input ports contained in this process group
*/
public Integer getInputPortCount() {
return inputPortCount;
@ -222,9 +200,7 @@ public class ControllerDTO {
}
/**
* The number of invalid components in this process group.
*
* @return
* @return number of invalid components in this process group
*/
public Integer getInvalidCount() {
return invalidCount;
@ -235,9 +211,7 @@ public class ControllerDTO {
}
/**
* The number of disabled components in this process group.
*
* @return
* @return number of disabled components in this process group
*/
public Integer getDisabledCount() {
return disabledCount;
@ -248,9 +222,7 @@ public class ControllerDTO {
}
/**
* The number of output ports in this process group.
*
* @return
* @return number of output ports in this process group
*/
public Integer getOutputPortCount() {
return outputPortCount;

View File

@ -44,9 +44,7 @@ public class ControllerServiceDTO extends NiFiComponentDTO {
private Collection<String> validationErrors;
/**
* The controller service name.
*
* @return
* @return controller service name
*/
public String getName() {
return name;
@ -57,9 +55,7 @@ public class ControllerServiceDTO extends NiFiComponentDTO {
}
/**
* The controller service type.
*
* @return
* @return the controller service type
*/
public String getType() {
return type;
@ -69,10 +65,8 @@ public class ControllerServiceDTO extends NiFiComponentDTO {
this.type = type;
}
/**
* The comment for the Controller Service
* @return
* @return the comment for the Controller Service
*/
public String getComments() {
return comments;
@ -83,9 +77,7 @@ public class ControllerServiceDTO extends NiFiComponentDTO {
}
/**
* Where this service is available. Possible values are NCM, NODE.
*
* @return
* @return Where this service is available. Possible values are NCM, NODE
*/
public String getAvailability() {
return availability;
@ -96,8 +88,8 @@ public class ControllerServiceDTO extends NiFiComponentDTO {
}
/**
* The state of this controller service. Possible values are ENABLED, ENABLING, DISABLED, DISABLING.
* @return
* @return The state of this controller service. Possible values are ENABLED,
* ENABLING, DISABLED, DISABLING
*/
public String getState() {
return state;
@ -108,9 +100,7 @@ public class ControllerServiceDTO extends NiFiComponentDTO {
}
/**
* The controller service properties.
*
* @return
* @return controller service properties
*/
public Map<String, String> getProperties() {
return properties;
@ -121,9 +111,7 @@ public class ControllerServiceDTO extends NiFiComponentDTO {
}
/**
* The descriptors for the controller service properties.
*
* @return
* @return descriptors for the controller service properties
*/
public Map<String, PropertyDescriptorDTO> getDescriptors() {
return descriptors;
@ -134,10 +122,8 @@ public class ControllerServiceDTO extends NiFiComponentDTO {
}
/**
* Returns the URL for this controller services custom configuration UI
* if applicable. Null otherwise.
*
* @return
* @return the URL for this controller services custom configuration UI if
* applicable. Null otherwise
*/
public String getCustomUiUrl() {
return customUiUrl;
@ -148,9 +134,7 @@ public class ControllerServiceDTO extends NiFiComponentDTO {
}
/**
* The annotation data for this controller service.
*
* @return
* @return annotation data for this controller service
*/
public String getAnnotationData() {
return annotationData;
@ -161,9 +145,7 @@ public class ControllerServiceDTO extends NiFiComponentDTO {
}
/**
* All components referencing this controller service.
*
* @return
* @return all components referencing this controller service
*/
public Set<ControllerServiceReferencingComponentDTO> getReferencingComponents() {
return referencingComponents;
@ -174,9 +156,9 @@ public class ControllerServiceDTO extends NiFiComponentDTO {
}
/**
* Gets the validation errors from this controller service. These validation errors
* represent the problems with the controller service that must be resolved before it
* can be enabled.
* Gets the validation errors from this controller service. These validation
* errors represent the problems with the controller service that must be
* resolved before it can be enabled.
*
* @return The validation errors
*/

View File

@ -28,6 +28,7 @@ import javax.xml.bind.annotation.XmlType;
*/
@XmlType(name = "controllerServiceReferencingComponent")
public class ControllerServiceReferencingComponentDTO {
private String groupId;
private String id;
private String name;
@ -46,10 +47,8 @@ public class ControllerServiceReferencingComponentDTO {
private Set<ControllerServiceReferencingComponentDTO> referencingComponents;
/**
* Group id for this component referencing a controller service. If this
* component is another service, this field is blank.
*
* @return
* @return Group id for this component referencing a controller service. If this
* component is another service, this field is blank
*/
public String getGroupId() {
return groupId;
@ -60,9 +59,7 @@ public class ControllerServiceReferencingComponentDTO {
}
/**
* The id for this component referencing a controller service.
*
* @return
* @return id for this component referencing a controller service
*/
public String getId() {
return id;
@ -73,9 +70,7 @@ public class ControllerServiceReferencingComponentDTO {
}
/**
* The name for this component referencing a controller service.
*
* @return
* @return name for this component referencing a controller service
*/
public String getName() {
return name;
@ -86,9 +81,7 @@ public class ControllerServiceReferencingComponentDTO {
}
/**
* The type for this component referencing a controller service.
*
* @return
* @return type for this component referencing a controller service
*/
public String getType() {
return type;
@ -99,10 +92,8 @@ public class ControllerServiceReferencingComponentDTO {
}
/**
* The state of the processor referencing a controller service. If this
* component is another service, this field is blank.
*
* @return
* @return state of the processor referencing a controller service. If this
* component is another service, this field is blank
*/
public String getState() {
return state;
@ -113,8 +104,8 @@ public class ControllerServiceReferencingComponentDTO {
}
/**
* The type of reference this is (Processor, ControllerService, or ReportingTask).
* @return
* @return type of reference this is (Processor, ControllerService, or
* ReportingTask)
*/
public String getReferenceType() {
return referenceType;
@ -125,9 +116,7 @@ public class ControllerServiceReferencingComponentDTO {
}
/**
* The component properties.
*
* @return
* @return component properties
*/
public Map<String, String> getProperties() {
return properties;
@ -138,9 +127,7 @@ public class ControllerServiceReferencingComponentDTO {
}
/**
* The descriptors for the components properties.
*
* @return
* @return descriptors for the components properties
*/
public Map<String, PropertyDescriptorDTO> getDescriptors() {
return descriptors;
@ -151,9 +138,7 @@ public class ControllerServiceReferencingComponentDTO {
}
/**
* Any validation error associated with this component.
*
* @return
* @return Any validation error associated with this component
*/
public Collection<String> getValidationErrors() {
return validationErrors;
@ -164,9 +149,7 @@ public class ControllerServiceReferencingComponentDTO {
}
/**
* The active thread count for the referencing component.
*
* @return
* @return active thread count for the referencing component
*/
public Integer getActiveThreadCount() {
return activeThreadCount;
@ -177,10 +160,8 @@ public class ControllerServiceReferencingComponentDTO {
}
/**
* If this referencing component represents a ControllerService, these
* are the components that reference it.
*
* @return
* @return If this referencing component represents a ControllerService, these are
* the components that reference it
*/
public Set<ControllerServiceReferencingComponentDTO> getReferencingComponents() {
return referencingComponents;
@ -191,10 +172,8 @@ public class ControllerServiceReferencingComponentDTO {
}
/**
* If this referencing component represents a ControllerService, this indicates
* whether it has already been represented in this hierarchy.
*
* @return
* @return If this referencing component represents a ControllerService, this
* indicates whether it has already been represented in this hierarchy
*/
public Boolean getReferenceCycle() {
return referenceCycle;

View File

@ -32,9 +32,7 @@ public class CounterDTO {
private String value;
/**
* The context of the counter.
*
* @return
* @return context of the counter
*/
public String getContext() {
return context;
@ -45,9 +43,7 @@ public class CounterDTO {
}
/**
* The id of the counter.
*
* @return
* @return id of the counter
*/
public String getId() {
return id;
@ -58,9 +54,7 @@ public class CounterDTO {
}
/**
* The name of the counter
*
* @return
* @return name of the counter
*/
public String getName() {
return name;
@ -71,9 +65,7 @@ public class CounterDTO {
}
/**
* The value for the counter
*
* @return
* @return value for the counter
*/
public String getValue() {
return value;

View File

@ -33,9 +33,7 @@ public class CountersDTO {
private Collection<CounterDTO> counters;
/**
* Gets the collection of counters.
*
* @return
* @return the collection of counters
*/
public Collection<CounterDTO> getCounters() {
return counters;
@ -46,9 +44,7 @@ public class CountersDTO {
}
/**
* Gets the date/time that this report was generated.
*
* @return
* @return the date/time that this report was generated
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
public Date getGenerated() {

View File

@ -30,9 +30,7 @@ public class DocumentedTypeDTO {
private Set<String> tags;
/**
* An optional description of the corresponding type.
*
* @return
* @return An optional description of the corresponding type
*/
public String getDescription() {
return description;
@ -43,9 +41,7 @@ public class DocumentedTypeDTO {
}
/**
* The type is the fully-qualified name of a Java class.
*
* @return
* @return The type is the fully-qualified name of a Java class
*/
public String getType() {
return type;
@ -56,9 +52,7 @@ public class DocumentedTypeDTO {
}
/**
* The tags associated with this type.
*
* @return
* @return The tags associated with this type
*/
public Set<String> getTags() {
return tags;

View File

@ -37,9 +37,7 @@ public class FlowSnippetDTO {
private Set<ControllerServiceDTO> controllerServices = new LinkedHashSet<>();
/**
* The connections in this flow snippet.
*
* @return
* @return connections in this flow snippet
*/
public Set<ConnectionDTO> getConnections() {
return connections;
@ -50,9 +48,7 @@ public class FlowSnippetDTO {
}
/**
* The input ports in this flow snippet.
*
* @return
* @return input ports in this flow snippet
*/
public Set<PortDTO> getInputPorts() {
return inputPorts;
@ -63,9 +59,7 @@ public class FlowSnippetDTO {
}
/**
* The labels in this flow snippet.
*
* @return
* @return labels in this flow snippet
*/
public Set<LabelDTO> getLabels() {
return labels;
@ -76,9 +70,7 @@ public class FlowSnippetDTO {
}
/**
* The funnels in this flow snippet.
*
* @return
* @return funnels in this flow snippet
*/
public Set<FunnelDTO> getFunnels() {
return funnels;
@ -89,9 +81,7 @@ public class FlowSnippetDTO {
}
/**
* The output ports in this flow snippet.
*
* @return
* @return output ports in this flow snippet
*/
public Set<PortDTO> getOutputPorts() {
return outputPorts;
@ -102,9 +92,7 @@ public class FlowSnippetDTO {
}
/**
* The process groups in this flow snippet.
*
* @return
* @return process groups in this flow snippet
*/
public Set<ProcessGroupDTO> getProcessGroups() {
return processGroups;
@ -115,9 +103,7 @@ public class FlowSnippetDTO {
}
/**
* The processors in this flow group.
*
* @return
* @return processors in this flow group
*/
public Set<ProcessorDTO> getProcessors() {
return processors;
@ -128,9 +114,7 @@ public class FlowSnippetDTO {
}
/**
* The remote process groups in this flow snippet.
*
* @return
* @return remote process groups in this flow snippet
*/
public Set<RemoteProcessGroupDTO> getRemoteProcessGroups() {
return remoteProcessGroups;
@ -141,8 +125,7 @@ public class FlowSnippetDTO {
}
/**
* Returns the Controller Services in this flow snippet
* @return
* @return the Controller Services in this flow snippet
*/
public Set<ControllerServiceDTO> getControllerServices() {
return controllerServices;

View File

@ -53,9 +53,7 @@ public class LabelDTO extends NiFiComponentDTO {
}
/**
* The style for this label.
*
* @return
* @return style for this label
*/
public Map<String, String> getStyle() {
return style;
@ -66,9 +64,7 @@ public class LabelDTO extends NiFiComponentDTO {
}
/**
* The height of the label in pixels when at a 1:1 scale.
*
* @return
* @return height of the label in pixels when at a 1:1 scale
*/
public Double getHeight() {
return height;
@ -79,9 +75,7 @@ public class LabelDTO extends NiFiComponentDTO {
}
/**
* The width of the label in pixels when at a 1:1 scale.
*
* @return
* @return width of the label in pixels when at a 1:1 scale
*/
public Double getWidth() {
return width;

View File

@ -55,9 +55,8 @@ public class NiFiComponentDTO {
}
/**
* The id for the parent group of this component if applicable, null otherwise.
*
* @return
* @return id for the parent group of this component if applicable, null
* otherwise
*/
public String getParentGroupId() {
return parentGroupId;

View File

@ -41,9 +41,7 @@ public class NodeDTO {
private Date nodeStartTime;
/**
* The node's last heartbeat timestamp.
*
* @return
* @return node's last heartbeat timestamp
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
public Date getHeartbeat() {
@ -55,9 +53,7 @@ public class NodeDTO {
}
/**
* The time of the node's last connection request.
*
* @return
* @return time of the node's last connection request
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
public Date getConnectionRequested() {
@ -82,9 +78,7 @@ public class NodeDTO {
}
/**
* The queue for the controller.
*
* @return
* @return queue for the controller
*/
public String getQueued() {
return queued;
@ -95,9 +89,7 @@ public class NodeDTO {
}
/**
* The node's host/IP address.
*
* @return
* @return node's host/IP address
*/
public String getAddress() {
return address;
@ -108,9 +100,7 @@ public class NodeDTO {
}
/**
* The node ID.
*
* @return
* @return node ID
*/
public String getNodeId() {
return nodeId;
@ -121,9 +111,7 @@ public class NodeDTO {
}
/**
* The port the node is listening for API requests.
*
* @return
* @return port the node is listening for API requests
*/
public Integer getApiPort() {
return apiPort;
@ -134,9 +122,7 @@ public class NodeDTO {
}
/**
* The node's status.
*
* @return
* @return node's status
*/
public String getStatus() {
return status;
@ -147,9 +133,7 @@ public class NodeDTO {
}
/**
* The node's events.
*
* @return
* @return node's events
*/
public List<NodeEventDTO> getEvents() {
return events;
@ -160,9 +144,7 @@ public class NodeDTO {
}
/**
* Whether this node is the primary node within the cluster.
*
* @return
* @return whether this node is the primary node within the cluster
*/
public Boolean isPrimary() {
return primary;
@ -173,9 +155,7 @@ public class NodeDTO {
}
/**
* The time at which this Node was last restarted
*
* @return
* @return time at which this Node was last restarted
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
public Date getNodeStartTime() {

View File

@ -32,9 +32,7 @@ public class NodeEventDTO {
private String message;
/**
* The category of the node event.
*
* @return
* @return category of the node event
*/
public String getCategory() {
return category;
@ -45,9 +43,7 @@ public class NodeEventDTO {
}
/**
* The message of the node event.
*
* @return
* @return message of the node event
*/
public String getMessage() {
return message;
@ -58,9 +54,7 @@ public class NodeEventDTO {
}
/**
* The timestamp of the node event.
*
* @return
* @return timestamp of the node event
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
public Date getTimestamp() {

View File

@ -28,9 +28,7 @@ public class NodeSystemDiagnosticsDTO {
private SystemDiagnosticsDTO systemDiagnostics;
/**
* The node.
*
* @return
* @return the node
*/
public NodeDTO getNode() {
return node;
@ -41,9 +39,7 @@ public class NodeSystemDiagnosticsDTO {
}
/**
* The system diagnostics.
*
* @return
* @return the system diagnostics
*/
public SystemDiagnosticsDTO getSystemDiagnostics() {
return systemDiagnostics;

View File

@ -38,9 +38,7 @@ public class PortDTO extends NiFiComponentDTO {
private Collection<String> validationErrors;
/**
* The name of this port.
*
* @return
* @return name of this port
*/
public String getName() {
return name;
@ -51,10 +49,8 @@ public class PortDTO extends NiFiComponentDTO {
}
/**
* The state of this port. Possible states are 'RUNNING', 'STOPPED', and
* 'DISABLED'.
*
* @return
* @return The state of this port. Possible states are 'RUNNING', 'STOPPED', and
* 'DISABLED'
*/
public String getState() {
return state;
@ -67,7 +63,7 @@ public class PortDTO extends NiFiComponentDTO {
/**
* The type of port. Possible values are 'INPUT_PORT' or 'OUTPUT_PORT'.
*
* @return
* @return The type of port
*/
public String getType() {
return type;
@ -78,9 +74,7 @@ public class PortDTO extends NiFiComponentDTO {
}
/**
* The number of tasks that should be concurrently scheduled for this port.
*
* @return
* @return number of tasks that should be concurrently scheduled for this port
*/
public Integer getConcurrentlySchedulableTaskCount() {
return concurrentlySchedulableTaskCount;
@ -91,9 +85,7 @@ public class PortDTO extends NiFiComponentDTO {
}
/**
* The comments for this port.
*
* @return
* @return comments for this port
*/
public String getComments() {
return comments;
@ -104,10 +96,8 @@ public class PortDTO extends NiFiComponentDTO {
}
/**
* Whether this port has incoming or outgoing connections to a remote NiFi.
* This is only applicable when the port is running on the root group.
*
* @return
* @return whether this port has incoming or outgoing connections to a remote NiFi.
* This is only applicable when the port is running on the root group
*/
public Boolean isTransmitting() {
return transmitting;
@ -118,9 +108,7 @@ public class PortDTO extends NiFiComponentDTO {
}
/**
* Groups that are allowed to access this port.
*
* @return
* @return groups that are allowed to access this port
*/
public Set<String> getGroupAccessControl() {
return groupAccessControl;
@ -131,9 +119,7 @@ public class PortDTO extends NiFiComponentDTO {
}
/**
* Users that are allowed to access this port.
*
* @return
* @return users that are allowed to access this port
*/
public Set<String> getUserAccessControl() {
return userAccessControl;

View File

@ -37,9 +37,7 @@ public class PositionDTO {
/* getters / setters */
/**
* The x coordinate.
*
* @return
* @return the x coordinate
*/
public Double getX() {
return x;
@ -50,9 +48,7 @@ public class PositionDTO {
}
/**
* The y coordinate.
*
* @return
* @return the y coordinate
*/
public Double getY() {
return y;

View File

@ -32,9 +32,7 @@ public class PreviousValueDTO {
private String userName;
/**
* The previous value.
*
* @return
* @return previous value
*/
public String getPreviousValue() {
return previousValue;
@ -45,9 +43,7 @@ public class PreviousValueDTO {
}
/**
* When it was modified.
*
* @return
* @return when it was modified
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
public Date getTimestamp() {
@ -59,9 +55,7 @@ public class PreviousValueDTO {
}
/**
* The user who changed the previous value.
*
* @return
* @return user who changed the previous value
*/
public String getUserName() {
return userName;

Some files were not shown because too many files have changed in this diff Show More