You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by al...@apache.org on 2015/04/22 23:13:07 UTC
[17/49] incubator-nifi git commit: NIFI-271 got through nifi-api
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/QuerySubmission.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/QuerySubmission.java b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/QuerySubmission.java
index 6c3e1ad..4716d2d 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/QuerySubmission.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/QuerySubmission.java
@@ -21,32 +21,24 @@ import java.util.Date;
public interface QuerySubmission {
/**
- * Returns the query that this submission pertains to
- *
- * @return
+ * @return the query that this submission pertains to
*/
Query getQuery();
/**
- * Returns the {@link QueryResult} for this query. Note that the result is
+ * @return the {@link QueryResult} for this query. Note that the result is
* only a partial result if the result of calling
- * {@link QueryResult#isFinished()} is <code>false</code>.
- *
- * @return
+ * {@link QueryResult#isFinished()} is <code>false</code>
*/
QueryResult getResult();
/**
- * Returns the date at which this query was submitted
- *
- * @return
+ * @return the date at which this query was submitted
*/
Date getSubmissionTime();
/**
- * Returns the generated identifier for this query result
- *
- * @return
+ * @return the generated identifier for this query result
*/
String getQueryIdentifier();
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/SearchableField.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/SearchableField.java b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/SearchableField.java
index fa3bfe3..85c6154 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/SearchableField.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/SearchableField.java
@@ -23,40 +23,30 @@ package org.apache.nifi.provenance.search;
public interface SearchableField {
/**
- * Returns the identifier that is used to refer to this field
- *
- * @return
+ * @return the identifier that is used to refer to this field
*/
String getIdentifier();
/**
- * Returns the name of the field that is used when searching the repository.
- *
- * @return
+ * @return the name of the field that is used when searching the repository
*/
String getSearchableFieldName();
/**
- * Returns the "friendly" name or "display name" of the field, which may be
+ * @return the "friendly" name or "display name" of the field, which may be
* more human-readable than the searchable field name
- *
- * @return
*/
String getFriendlyName();
/**
- * Returns the type of the data stored in this field
- *
- * @return
+ * @return the type of the data stored in this field
*/
SearchableFieldType getFieldType();
/**
- * Returns <code>true</code> if this field represents a FlowFile attribute,
+ * @return <code>true</code> if this field represents a FlowFile attribute,
* <code>false</code> if the field represents a Provenance Event detail,
* such as Source System URI
- *
- * @return
*/
boolean isAttribute();
}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/remote/RemoteDestination.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/remote/RemoteDestination.java b/nifi/nifi-api/src/main/java/org/apache/nifi/remote/RemoteDestination.java
index 508ab37..c3a34b2 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/remote/RemoteDestination.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/remote/RemoteDestination.java
@@ -18,36 +18,33 @@ package org.apache.nifi.remote;
import java.util.concurrent.TimeUnit;
-
/**
- * A model object for referring to a remote destination (i.e., a Port) for site-to-site communications
+ * A model object for referring to a remote destination (i.e., a Port) for
+ * site-to-site communications
*/
public interface RemoteDestination {
+
/**
- * Returns the identifier of the remote destination
- *
- * @return
+ * @return the identifier of the remote destination
*/
- String getIdentifier();
+ String getIdentifier();
- /**
- * Returns the human-readable name of the remote destination
- * @return
- */
- String getName();
+ /**
+ * @return the human-readable name of the remote destination
+ */
+ String getName();
- /**
- * Returns the amount of time that system should pause sending to a particular node if unable to
- * send data to or receive data from this endpoint
- * @param timeUnit
- * @return
- */
- long getYieldPeriod(TimeUnit timeUnit);
-
- /**
- * Returns whether or not compression should be used when transferring data to or receiving
- * data from the remote endpoint
- * @return
- */
- boolean isUseCompression();
+ /**
+ * @param timeUnit to yield
+ * @return the amount of time that system should pause sending to a
+ * particular node if unable to send data to or receive data from this
+ * endpoint
+ */
+ long getYieldPeriod(TimeUnit timeUnit);
+
+ /**
+ * @return whether or not compression should be used when transferring data
+ * to or receiving data from the remote endpoint
+ */
+ boolean isUseCompression();
}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/AbstractReportingTask.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/AbstractReportingTask.java b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/AbstractReportingTask.java
index efcf2a3..b5afe17 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/AbstractReportingTask.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/AbstractReportingTask.java
@@ -43,19 +43,15 @@ public abstract class AbstractReportingTask extends AbstractConfigurableComponen
}
/**
- * Returns the {@link ControllerServiceLookup} that was passed to the
+ * @return the {@link ControllerServiceLookup} that was passed to the
* {@link #init(ProcessorInitializationContext)} method
- *
- * @return
*/
protected final ControllerServiceLookup getControllerServiceLookup() {
return serviceLookup;
}
/**
- * Returns the identifier of this Reporting Task
- *
- * @return
+ * @return the identifier of this Reporting Task
*/
@Override
public String getIdentifier() {
@@ -63,22 +59,18 @@ public abstract class AbstractReportingTask extends AbstractConfigurableComponen
}
/**
- * Returns the name of this Reporting Task
- *
- * @return
+ * @return the name of this Reporting Task
*/
protected String getName() {
return name;
}
/**
- * Returns the amount of times that elapses between the moment that this
+ * @param timeUnit of scheduling period
+ * @return the amount of times that elapses between the moment that this
* ReportingTask finishes its invocation of
* {@link #onTrigger(ReportingContext)} and the next time that
* {@link #onTrigger(ReportingContext)} is called.
- *
- * @param timeUnit
- * @return
*/
protected long getSchedulingPeriod(final TimeUnit timeUnit) {
return timeUnit.convert(schedulingNanos, TimeUnit.NANOSECONDS);
@@ -88,15 +80,15 @@ public abstract class AbstractReportingTask extends AbstractConfigurableComponen
* Provides a mechanism by which subclasses can perform initialization of
* the Reporting Task before it is scheduled to be run
*
- * @param config
- * @throws InitializationException
+ * @param config context
+ * @throws InitializationException if failure to init
*/
protected void init(final ReportingInitializationContext config) throws InitializationException {
}
/**
- * Returns the logger that has been provided to the component by the framework in its initialize method.
- * @return
+ * @return the logger that has been provided to the component by the
+ * framework in its initialize method
*/
protected ComponentLog getLogger() {
return logger;
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/BulletinRepository.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/BulletinRepository.java b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/BulletinRepository.java
index 4d32d40..2679099 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/BulletinRepository.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/BulletinRepository.java
@@ -28,61 +28,55 @@ public interface BulletinRepository {
/**
* Adds a Bulletin to the repository.
*
- * @param bulletin
+ * @param bulletin to add
*/
void addBulletin(Bulletin bulletin);
/**
- * Returns the capacity for the number of bulletins for the controller.
- *
- * @return
+ * @return the capacity for the number of bulletins for the controller
*/
int getControllerBulletinCapacity();
/**
- * Returns the capacity for the number of bulletins per component.
- *
- * @return
+ * @return the capacity for the number of bulletins per component
*/
int getComponentBulletinCapacity();
/**
* Finds Bulletin's that meet the specified query.
*
- * @param bulletinQuery
- * @return
+ * @param bulletinQuery indicates which bulletins are of interest
+ * @return bulletins that met the query
*/
List<Bulletin> findBulletins(BulletinQuery bulletinQuery);
/**
* Finds all bulletins for the specified group.
*
- * @param groupId
- * @return
+ * @param groupId id of the group
+ * @return bulletins for the given group
*/
List<Bulletin> findBulletinsForGroupBySource(String groupId);
/**
* Finds all bulletins for the specified group.
*
- * @param groupId
- * @param maxPerComponent
- * @return
+ * @param groupId id of the group
+ * @param maxPerComponent max responses wanted
+ * @return bulletins found
*/
List<Bulletin> findBulletinsForGroupBySource(String groupId, int maxPerComponent);
/**
- * Finds all bulletins for the controller;
- *
- * @return
+ * @return all bulletins for the controller
*/
List<Bulletin> findBulletinsForController();
/**
* Finds all bulletins for the controller;
*
- * @param max
- * @return
+ * @param max limits the number of responses
+ * @return all bulletins for the controller
*/
List<Bulletin> findBulletinsForController(int max);
}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/EventAccess.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/EventAccess.java b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/EventAccess.java
index f043efd..bdc23c2 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/EventAccess.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/EventAccess.java
@@ -26,9 +26,7 @@ import java.util.List;
public interface EventAccess {
/**
- * Gets the status for all components in this Controller.
- *
- * @return
+ * @return the status for all components in this Controller
*/
ProcessGroupStatus getControllerStatus();
@@ -39,15 +37,13 @@ public interface EventAccess {
*
* @param firstEventId the ID of the first event to obtain
* @param maxRecords the maximum number of records to obtain
- * @return
- * @throws java.io.IOException
+ * @return event records matching query
+ * @throws java.io.IOException if unable to get records
*/
List<ProvenanceEventRecord> getProvenanceEvents(long firstEventId, final int maxRecords) throws IOException;
/**
- * Returns the Provenance Event Repository
- *
- * @return
+ * @return the Provenance Event Repository
*/
ProvenanceEventRepository getProvenanceRepository();
}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingContext.java
index ad4090c..281194c 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingContext.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingContext.java
@@ -31,37 +31,29 @@ import org.apache.nifi.controller.ControllerServiceLookup;
public interface ReportingContext {
/**
- * Returns a Map of all known {@link PropertyDescriptor}s to their
+ * @return a Map of all known {@link PropertyDescriptor}s to their
* configured properties. This Map will contain a <code>null</code> for any
* Property that has not been configured by the user, even if the
- * PropertyDescriptor has a default value.
- *
- * @return
+ * PropertyDescriptor has a default value
*/
Map<PropertyDescriptor, String> getProperties();
/**
- * A PropertyValue that represents the user-configured value for the given
- * {@link PropertyDescriptor}.
- *
- * @param propertyName
- * @return
+ * @param propertyName descriptor of property to lookup the value of
+ * @return PropertyValue that represents the user-configured value for the given
+ * {@link PropertyDescriptor}
*/
PropertyValue getProperty(PropertyDescriptor propertyName);
/**
- * Returns the {@link EventAccess} object that can be used to obtain
+ * @return the {@link EventAccess} object that can be used to obtain
* information about specific events and reports that have happened
- *
- * @return
*/
EventAccess getEventAccess();
/**
- * Returns the {@link BulletinRepository} that can be used to analyze
+ * @return the {@link BulletinRepository} that can be used to analyze
* Bulletins that have been emitted and register new Bulletins
- *
- * @return
*/
BulletinRepository getBulletinRepository();
@@ -70,10 +62,10 @@ public interface ReportingContext {
* level, and message, so that the Bulletin can be added to the
* {@link BulletinRepository}.
*
- * @param category
- * @param severity
- * @param message
- * @return
+ * @param category of bulletin
+ * @param severity of bulletin
+ * @param message of bulletin
+ * @return new bulletin
*/
Bulletin createBulletin(String category, Severity severity, String message);
@@ -85,15 +77,13 @@ public interface ReportingContext {
* @param category the name of the bulletin's category
* @param severity the severity level of the bulletin
* @param message the bulletin's message
- * @return
+ * @return new bulletin
*/
Bulletin createBulletin(String componentId, String category, Severity severity, String message);
/**
- * Returns the {@link ControllerServiceLookup} which can be used to obtain
+ * @return the {@link ControllerServiceLookup} which can be used to obtain
* Controller Services
- *
- * @return
*/
ControllerServiceLookup getControllerServiceLookup();
}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingInitializationContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingInitializationContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingInitializationContext.java
index 6b84589..d014b26 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingInitializationContext.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingInitializationContext.java
@@ -29,16 +29,12 @@ import org.apache.nifi.scheduling.SchedulingStrategy;
public interface ReportingInitializationContext {
/**
- * Returns the identifier for this ReportingTask
- *
- * @return
+ * @return the identifier for this ReportingTask
*/
String getIdentifier();
/**
- * Returns the configured name for this ReportingTask
- *
- * @return
+ * @return the configured name for this ReportingTask
*/
String getName();
@@ -51,40 +47,31 @@ public interface ReportingInitializationContext {
* <code>-1L</code> if the Scheduling Strategy is not set to
* {@link SchedulingStrategy#TIMER_DRIVEN}
*
- * @param timeUnit
- * @return
+ * @param timeUnit unit of time for scheduling
+ * @return period of time
*/
long getSchedulingPeriod(TimeUnit timeUnit);
/**
- * Returns the {@link ControllerServiceLookup} which can be used to obtain
+ * @return the {@link ControllerServiceLookup} which can be used to obtain
* Controller Services
- *
- * @return
*/
ControllerServiceLookup getControllerServiceLookup();
/**
- * Returns a String representation of the scheduling period.
- *
- * @return
+ * @return a String representation of the scheduling period
*/
String getSchedulingPeriod();
/**
- * Returns the {@link SchedulingStrategy} that is used to trigger the task
+ * @return the {@link SchedulingStrategy} that is used to trigger the task
* to run
- *
- * @return
*/
SchedulingStrategy getSchedulingStrategy();
-
-
+
/**
- * Returns a logger that can be used to log important events in a standard way and generate
- * bulletins when appropriate
- *
- * @return
+ * @return a logger that can be used to log important events in a standard
+ * way and generate bulletins when appropriate
*/
ComponentLog getLogger();
}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingTask.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingTask.java b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingTask.java
index 3f77796..3de9b93 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingTask.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/reporting/ReportingTask.java
@@ -60,8 +60,8 @@ public interface ReportingTask extends ConfigurableComponent {
* Provides the Reporting Task with access to objects that may be of use
* throughout the life of the service
*
- * @param config
- * @throws org.apache.nifi.reporting.InitializationException
+ * @param config of initialization context
+ * @throws org.apache.nifi.reporting.InitializationException if unable to init
*/
void initialize(ReportingInitializationContext config) throws InitializationException;
@@ -69,7 +69,7 @@ public interface ReportingTask extends ConfigurableComponent {
* This method is called on a scheduled interval to allow the Reporting Task
* to perform its tasks.
*
- * @param context
+ * @param context reporting context
*/
void onTrigger(ReportingContext context);
}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/search/SearchContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/search/SearchContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/search/SearchContext.java
index 77865bf..1da8c90 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/search/SearchContext.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/search/SearchContext.java
@@ -26,32 +26,24 @@ import org.apache.nifi.components.PropertyValue;
public interface SearchContext {
/**
- * Gets the search term.
- *
- * @return
+ * @return the search term
*/
String getSearchTerm();
/**
- * Gets the annotation data.
- *
- * @return
+ * @return the annotation data
*/
String getAnnotationData();
/**
- * Returns a PropertyValue that encapsulates the value configured for the
+ * @param property to get value of
+ * @return a PropertyValue that encapsulates the value configured for the
* given PropertyDescriptor
- *
- * @param property
- * @return
*/
PropertyValue getProperty(PropertyDescriptor property);
/**
- * Returns a Map of all configured Properties.
- *
- * @return
+ * @return a Map of all configured Properties
*/
Map<PropertyDescriptor, String> getProperties();
}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/search/SearchResult.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/search/SearchResult.java b/nifi/nifi-api/src/main/java/org/apache/nifi/search/SearchResult.java
index 7ed7d82..29e490a 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/search/SearchResult.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/search/SearchResult.java
@@ -30,18 +30,14 @@ public class SearchResult {
}
/**
- * Get the label for this search result.
- *
- * @return
+ * @return the label for this search result
*/
public String getLabel() {
return label;
}
/**
- * Get the matching string for this search result.
- *
- * @return
+ * @return the matching string for this search result
*/
public String getMatch() {
return match;
@@ -55,8 +51,8 @@ public class SearchResult {
/**
* Set the label for the search result.
*
- * @param label
- * @return
+ * @param label to set
+ * @return the builder
*/
public Builder label(final String label) {
this.label = label;
@@ -66,8 +62,8 @@ public class SearchResult {
/**
* Set the matching string for the search result.
*
- * @param match
- * @return
+ * @param match string
+ * @return the builder
*/
public Builder match(final String match) {
this.match = match;
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/web/ComponentDetails.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ComponentDetails.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ComponentDetails.java
index 0b68ed9..5614fc2 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ComponentDetails.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ComponentDetails.java
@@ -20,7 +20,8 @@ import java.util.Collection;
import java.util.Map;
/**
- * Details about a given component. Contains configuration and current validation errors.
+ * Details about a given component. Contains configuration and current
+ * validation errors.
*/
public class ComponentDetails {
@@ -43,63 +44,49 @@ public class ComponentDetails {
}
/**
- * The component id.
- *
- * @return
+ * @return component id
*/
public String getId() {
return id;
}
/**
- * The component name.
- *
- * @return
+ * @return component name
*/
public String getName() {
return name;
}
/**
- * The component type.
- *
- * @return
+ * @return component type
*/
public String getType() {
return type;
}
-
+
/**
- * The component state.
- *
- * @return
+ * @return component state
*/
public String getState() {
return state;
}
/**
- * The component's annotation data.
- *
- * @return
+ * @return component's annotation data
*/
public String getAnnotationData() {
return annotationData;
}
/**
- * Mapping of component properties.
- *
- * @return
+ * @return Mapping of component properties
*/
public Map<String, String> getProperties() {
return properties;
}
/**
- * Current validation errors for the component.
- *
- * @return
+ * @return Current validation errors for the component
*/
public Collection<String> getValidationErrors() {
return validationErrors;
@@ -124,7 +111,7 @@ public class ComponentDetails {
this.name = name;
return this;
}
-
+
public Builder type(final String type) {
this.type = type;
return this;
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/web/ConfigurationAction.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ConfigurationAction.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ConfigurationAction.java
index 066e772..96f2abf 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ConfigurationAction.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ConfigurationAction.java
@@ -38,54 +38,42 @@ public class ConfigurationAction {
}
/**
- * The id of the component being modified.
- *
- * @return
+ * @return id of the component being modified
*/
public String getId() {
return id;
}
/**
- * The name of the component being modified.
- *
- * @return
+ * @return name of the component being modified
*/
public String getName() {
return name;
}
/**
- * The type of the component being modified.
- *
- * @return
+ * @return type of the component being modified
*/
public String getType() {
return type;
}
/**
- * Gets the name of the field, property, etc that has been modified.
- *
- * @return
+ * @return the name of the field, property, etc that has been modified
*/
public String getField() {
return field;
}
/**
- * Gets the previous value.
- *
- * @return
+ * @return the previous value
*/
public String getPreviousValue() {
return previousValue;
}
/**
- * Gets the new value.
- *
- * @return
+ * @return the new value
*/
public String getValue() {
return value;
@@ -104,17 +92,17 @@ public class ConfigurationAction {
this.id = id;
return this;
}
-
+
public Builder name(final String name) {
this.name = name;
return this;
}
-
+
public Builder type(final String type) {
this.type = type;
return this;
}
-
+
public Builder field(final String field) {
this.field = field;
return this;
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationContext.java
index 50f0ca3..ae32b10 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationContext.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationContext.java
@@ -25,15 +25,13 @@ import org.apache.nifi.controller.ControllerService;
* component custom UIs.
*/
public interface NiFiWebConfigurationContext {
-
+
/**
- * Gets the ControllerService for the specified identifier. If a
+ * @param serviceIdentifier of the controller service
+ * @return the ControllerService for the specified identifier. If a
* corresponding service cannot be found, null is returned. If this NiFi is
- * clustered, the only services available will be those those
- * availability is NCM only.
- *
- * @param serviceIdentifier
- * @return
+ * clustered, the only services available will be those those availability
+ * is NCM only
*/
ControllerService getControllerService(String serviceIdentifier);
@@ -48,55 +46,55 @@ public interface NiFiWebConfigurationContext {
* been applied to the flow, we cannot revert them because of a failure to
* insert an audit record.
*
- * @param requestContext
- * @param actions
- * @throws IllegalArgumentException When the requestContext isn't fully populated or
- * isn't appropriate for the given request
+ * @param requestContext context of the request
+ * @param actions to save
+ * @throws IllegalArgumentException When the requestContext isn't fully
+ * populated or isn't appropriate for the given request
*/
void saveActions(NiFiWebRequestContext requestContext, Collection<ConfigurationAction> actions);
/**
- * Gets the current user dn. Returns null if no user is found.
- *
- * @return
+ * @return the current user dn. Returns null if no user is found
*/
String getCurrentUserDn();
/**
- * Gets the current user name. Returns null if no user is found.
- *
- * @return
+ * @return the current user name. Returns null if no user is found
*/
String getCurrentUserName();
/**
* Sets the annotation data for the underlying component.
- *
- * @param configurationContext
- * @param annotationData
+ *
+ * @param configurationContext config context
+ * @param annotationData the data
* @return the configuration for the underlying component
- * @throws ResourceNotFoundException if the underlying component does not exit
+ * @throws ResourceNotFoundException if the underlying component does not
+ * exit
* @throws InvalidRevisionException if a revision other than the current
* revision is given
* @throws ClusterRequestException if the annotation data was unable to be
- * set for the underlying component. This exception will only be thrown when operating
- * in a cluster.
- * @throws IllegalArgumentException When the requestContext isn't fully populated or
- * isn't appropriate for the given request
+ * set for the underlying component. This exception will only be thrown when
+ * operating in a cluster.
+ * @throws IllegalArgumentException When the requestContext isn't fully
+ * populated or isn't appropriate for the given request
*/
- ComponentDetails setAnnotationData(NiFiWebConfigurationRequestContext configurationContext, String annotationData) throws ResourceNotFoundException, InvalidRevisionException, ClusterRequestException;
-
+ ComponentDetails setAnnotationData(NiFiWebConfigurationRequestContext configurationContext, String annotationData)
+ throws ResourceNotFoundException, InvalidRevisionException, ClusterRequestException;
+
/**
- * Gets the details for the underlying component (including configuration, validation errors, and annotation data).
- *
- * @param requestContext
+ * Gets the details for the underlying component (including configuration,
+ * validation errors, and annotation data).
+ *
+ * @param requestContext context of request
* @return the configuration for the underlying component
- * @throws ResourceNotFoundException if the underlying component does not exit
- * @throws ClusterRequestException if the underlying component was unable to be
- * retrieved from the cluster. This exception will only be thrown when
+ * @throws ResourceNotFoundException if the underlying component does not
+ * exit
+ * @throws ClusterRequestException if the underlying component was unable to
+ * be retrieved from the cluster. This exception will only be thrown when
* operating in a cluster.
- * @throws IllegalArgumentException When the requestContext isn't fully populated or
- * isn't appropriate for the given request
+ * @throws IllegalArgumentException When the requestContext isn't fully
+ * populated or isn't appropriate for the given request
*/
ComponentDetails getComponentDetails(NiFiWebRequestContext requestContext) throws ResourceNotFoundException, ClusterRequestException;
}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationRequestContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationRequestContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationRequestContext.java
index 7912241..c75d9dc 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationRequestContext.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebConfigurationRequestContext.java
@@ -17,13 +17,14 @@
package org.apache.nifi.web;
/**
- * Contextual details required to make a configuration request from a UI extension.
+ * Contextual details required to make a configuration request from a UI
+ * extension.
*/
public interface NiFiWebConfigurationRequestContext extends NiFiWebRequestContext {
/**
* The revision to include in the request.
- *
+ *
* @return the revision
*/
Revision getRevision();
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebContext.java
index 01702ad..55e90e8 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebContext.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebContext.java
@@ -28,12 +28,10 @@ import org.apache.nifi.controller.ControllerService;
public interface NiFiWebContext {
/**
- * Gets the ControllerService for the specified identifier. If a
+ * @param serviceIdentifier identifier of the service
+ * @return the ControllerService for the specified identifier. If a
* corresponding service cannot be found, null is returned. If this NiFi is
- * clustered, the ControllerService is loaded from the NCM.
- *
- * @param serviceIdentifier
- * @return
+ * clustered, the ControllerService is loaded from the NCM
*/
ControllerService getControllerService(String serviceIdentifier);
@@ -48,21 +46,17 @@ public interface NiFiWebContext {
* been applied to the flow, we cannot revert them because of a failure to
* insert an audit record.
*
- * @param actions
+ * @param actions to save
*/
void saveActions(Collection<ProcessorConfigurationAction> actions);
/**
- * Gets the current user dn. Returns null if no user is found.
- *
- * @return
+ * @return the current user dn. Returns null if no user is found
*/
String getCurrentUserDn();
/**
- * Gets the current user name. Returns null if no user is found.
- *
- * @return
+ * @return the current user name. Returns null if no user is found
*/
String getCurrentUserName();
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebRequestContext.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebRequestContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebRequestContext.java
index ac38221..9dd44ab 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebRequestContext.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/NiFiWebRequestContext.java
@@ -22,12 +22,10 @@ package org.apache.nifi.web;
public interface NiFiWebRequestContext {
/**
- * Returns the type of UI extension is making the request.
- *
- * @return
+ * @return the type of UI extension is making the request
*/
UiExtensionType getExtensionType();
-
+
/**
* The request protocol scheme (http or https). When scheme is https, the
* X509Certificate can be used for subsequent remote requests.
@@ -38,7 +36,7 @@ public interface NiFiWebRequestContext {
/**
* The id of the component.
- *
+ *
* @return the ID
*/
String getId();
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/web/ProcessorConfigurationAction.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ProcessorConfigurationAction.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ProcessorConfigurationAction.java
index ce5e069..f42063f 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ProcessorConfigurationAction.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ProcessorConfigurationAction.java
@@ -39,54 +39,42 @@ public class ProcessorConfigurationAction {
}
/**
- * Gets the id of the processor.
- *
- * @return
+ * @return the id of the processor
*/
public String getProcessorId() {
return processorId;
}
/**
- * Gets the name of the processor being modified.
- *
- * @return
+ * @return the name of the processor being modified
*/
public String getProcessorName() {
return processorName;
}
/**
- * Gets the type of the processor being modified.
- *
- * @return
+ * @return the type of the processor being modified
*/
public String getProcessorType() {
return processorType;
}
/**
- * Gets the name of the field, property, etc that has been modified.
- *
- * @return
+ * @return the name of the field, property, etc that has been modified.
*/
public String getName() {
return name;
}
/**
- * Gets the previous value.
- *
- * @return
+ * @return the previous value
*/
public String getPreviousValue() {
return previousValue;
}
/**
- * Gets the new value.
- *
- * @return
+ * @return the new value
*/
public String getValue() {
return value;
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/web/Revision.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/Revision.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/Revision.java
index 8a6275e..6fcdcaf 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/Revision.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/Revision.java
@@ -37,12 +37,12 @@ public class Revision implements Serializable {
* the client ID
*/
private final String clientId;
-
+
public Revision(Long revision, String clientId) {
this.version = revision;
this.clientId = clientId;
}
-
+
public String getClientId() {
return clientId;
}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/web/UiExtensionType.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/UiExtensionType.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/UiExtensionType.java
index 0bbda16..e3b0f8a 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/UiExtensionType.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/UiExtensionType.java
@@ -17,13 +17,14 @@
package org.apache.nifi.web;
/**
- * Types of UI extensions. Since a UI extension could support multiple
- * types of custom UIs it will need to include the type so the framework
- * can appropriate understand and process the request (recording actions
- * in the audit database, replicating a request throughout the cluster to
- * the appropriate endpoints, etc).
+ * Types of UI extensions. Since a UI extension could support multiple types of
+ * custom UIs it will need to include the type so the framework can appropriate
+ * understand and process the request (recording actions in the audit database,
+ * replicating a request throughout the cluster to the appropriate endpoints,
+ * etc).
*/
public enum UiExtensionType {
+
ContentViewer,
ProcessorConfiguration,
ControllerServiceConfiguration,
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/main/java/org/apache/nifi/web/ViewableContent.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ViewableContent.java b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ViewableContent.java
index f90221e..180385e 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/web/ViewableContent.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/web/ViewableContent.java
@@ -25,50 +25,41 @@ import java.io.InputStream;
public interface ViewableContent {
public static final String CONTENT_REQUEST_ATTRIBUTE = "org.apache.nifi.web.content";
-
+
public enum DisplayMode {
+
Original,
Formatted,
Hex;
}
-
+
/**
- * The stream to the viewable content. The data stream can only be read once so
- * an extension can call this method or getContent.
- *
- * @return
+ * @return stream to the viewable content. The data stream can only be read once
+ * so an extension can call this method or getContent
*/
InputStream getContentStream();
/**
- * Gets the content as a string. The data stream can only be read once so
- * an extension can call this method or getContentStream.
- *
- * @return
- * @throws java.io.IOException
+ * @return the content as a string. The data stream can only be read once so an
+ * extension can call this method or getContentStream
+ * @throws java.io.IOException if unable to read content
*/
String getContent() throws IOException;
-
+
/**
- * Returns the desired play mode. If the mode is Hex the
- * framework will handle generating the mark up. The only
- * values that an extension will see is Original or Formatted.
- *
- * @return
+ * @return the desired display mode. If the mode is Hex the framework will
+ * handle generating the mark up. The only values that an extension will see
+ * is Original or Formatted
*/
DisplayMode getDisplayMode();
-
+
/**
- * The contents file name.
- *
- * @return
+ * @return contents file name
*/
String getFileName();
-
+
/**
- * The mime type of the content.
- *
- * @return
+ * @return mime type of the content
*/
String getContentType();
}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/bcb3ca8f/nifi/nifi-api/src/test/java/org/apache/nifi/components/TestPropertyDescriptor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/test/java/org/apache/nifi/components/TestPropertyDescriptor.java b/nifi/nifi-api/src/test/java/org/apache/nifi/components/TestPropertyDescriptor.java
index 82b8111..e3043be 100644
--- a/nifi/nifi-api/src/test/java/org/apache/nifi/components/TestPropertyDescriptor.java
+++ b/nifi/nifi-api/src/test/java/org/apache/nifi/components/TestPropertyDescriptor.java
@@ -24,34 +24,34 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-
/**
- * Regression test for issue NIFI-49, to ensure that if a Processor's Property's Default Value is not allowed,
- * the Exception thrown should indicate what the default value is
+ * Regression test for issue NIFI-49, to ensure that if a Processor's Property's
+ * Default Value is not allowed, the Exception thrown should indicate what the
+ * default value is
*/
public class TestPropertyDescriptor {
private static Builder invalidDescriptorBuilder;
private static Builder validDescriptorBuilder;
private static String DEFAULT_VALUE = "Default Value";
-
+
@Rule
public ExpectedException thrown = ExpectedException.none();
-
+
@BeforeClass
public static void setUp() {
validDescriptorBuilder = new PropertyDescriptor.Builder().name("").allowableValues("Allowable Value", "Another Allowable Value").defaultValue("Allowable Value");
invalidDescriptorBuilder = new PropertyDescriptor.Builder().name("").allowableValues("Allowable Value", "Another Allowable Value").defaultValue(DEFAULT_VALUE);
}
-
+
@Test
public void testExceptionThrownByDescriptorWithInvalidDefaultValue() {
thrown.expect(IllegalStateException.class);
- thrown.expectMessage("["+ DEFAULT_VALUE +"]");
-
+ thrown.expectMessage("[" + DEFAULT_VALUE + "]");
+
invalidDescriptorBuilder.build();
}
-
+
@Test
public void testNoExceptionThrownByPropertyDescriptorWithValidDefaultValue() {
assertNotNull(validDescriptorBuilder.build());