diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/DynamicProperties.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/DynamicProperties.java index 6dbc86d792..902f5e9459 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/DynamicProperties.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/DynamicProperties.java @@ -25,18 +25,13 @@ import java.lang.annotation.Target; /** * Indicates that a component has more than one dynamic property - * - * @author * */ @Documented -@Target({ ElementType.TYPE }) +@Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Inherited public @interface DynamicProperties { - /** - * A list of the dynamic properties supported by a component - * @return A list of the dynamic properties supported by a component - */ + public DynamicProperty[] value(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/DynamicProperty.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/DynamicProperty.java index 07f349c388..dbb34b6b49 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/DynamicProperty.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/DynamicProperty.java @@ -28,40 +28,19 @@ import org.apache.nifi.components.ConfigurableComponent; /** * An annotation that may be placed on a {@link ConfigurableComponent} to * indicate that it supports a dynamic property. - * - * @author * */ @Documented -@Target({ ElementType.TYPE }) +@Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Inherited public @interface DynamicProperty { - /** - * A description of what the name of the dynamic property may be - * - * @return A description of what the name of the dynamic property may be - */ + public String name(); - /** - * Indicates whether or not the dynamic property supports expression - * language - * - * @return whether or not the dynamic property supports expression - * language - */ public boolean supportsExpressionLanguage() default false; - - /** - * A description of what the value of the dynamic property may be - * @return a description of what the value of the dynamic property may be - */ + public String value(); - - /** - * Provides a description of what the meaning of the property is, and what the expected values are - * @return a description of what the meaning of the property is, and what the expected values are - */ + public String description(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/DynamicRelationship.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/DynamicRelationship.java index df0799fb6a..4129201b79 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/DynamicRelationship.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/DynamicRelationship.java @@ -31,26 +31,15 @@ import org.apache.nifi.processor.Relationship; * Annotation to indicate that a {@link Processor} supports dynamic * relationship. A dynamic {@link Relationship} is one where the relationship is * generated based on a user defined {@link PropertyDescriptor} - * - * @author * */ @Documented -@Target({ ElementType.TYPE }) +@Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Inherited public @interface DynamicRelationship { - /** - * Describes the name(s) of the dynamic relationship(s) - * - * @return a description of the name(s) of the dynamic relationship(s) - */ + public String name(); - /** - * Describes the data that should be routed to the dynamic relationship(s) - * - * @return a description the data that should be routed to the dynamic relationship(s) - */ public String description(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/ReadsAttribute.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/ReadsAttribute.java index d17ec2fed3..fb9e2abf91 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/ReadsAttribute.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/ReadsAttribute.java @@ -24,27 +24,18 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Annotation that may be placed on a {@link org.apache.nifi.processor.Processor Processor} - * indicating that this processor reads a specific FlowFile attribute. - * - * @author + * Annotation that may be placed on a + * {@link org.apache.nifi.processor.Processor Processor} indicating that this + * processor reads a specific FlowFile attribute. * */ - @Documented @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Inherited public @interface ReadsAttribute { - /** - * The FlowFile attribute that is being read - * @return - */ + public String attribute(); - - /** - * The description of how the attribute is being used - * @return - */ + public String description() default ""; } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/ReadsAttributes.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/ReadsAttributes.java index dfa3513edf..2610e1c6e4 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/ReadsAttributes.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/ReadsAttributes.java @@ -16,7 +16,6 @@ */ package org.apache.nifi.annotation.behavior; -import org.apache.nifi.annotation.behavior.ReadsAttribute; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; @@ -25,10 +24,9 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Annotation that may be placed on a {@link org.apache.nifi.processor.Processor Processor} - * indicating that this processor reads specific FlowFile attributes. - * - * @author + * Annotation that may be placed on a + * {@link org.apache.nifi.processor.Processor Processor} indicating that this + * processor reads specific FlowFile attributes. * */ @Documented @@ -36,9 +34,6 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Inherited public @interface ReadsAttributes { - /** - * A list of attributes that may be read - * @return - */ + public ReadsAttribute[] value(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/SideEffectFree.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/SideEffectFree.java index f32acc37db..bd1e07d69a 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/SideEffectFree.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/SideEffectFree.java @@ -24,18 +24,17 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Marker annotation a {@link org.apache.nifi.processor.Processor Processor} - * implementation can use to indicate that its - * operations on FlowFiles can be safely repeated across process sessions. If a - * processor has this annotation and it allows the framework to manage session - * commit and rollback then the framework may elect to cascade a - * {@link org.apache.nifi.processor.ProcessSession ProcessSession} given to this - * processor's onTrigger method to the - * onTrigger method of another processor. It can do this knowing that if - * something fails along a series of processors using this same session that it - * can all be safely rolled back without any ill effects on external services - * which could not be rolled back and thus all the processes could be safely - * repeated (implied idempotent behavior). + * Marker annotation a {@link org.apache.nifi.processor.Processor Processor} + * implementation can use to indicate that its operations on FlowFiles can be + * safely repeated across process sessions. If a processor has this annotation + * and it allows the framework to manage session commit and rollback then the + * framework may elect to cascade a + * {@link org.apache.nifi.processor.ProcessSession ProcessSession} given to this + * processor's onTrigger method to the onTrigger method of another processor. It + * can do this knowing that if something fails along a series of processors + * using this same session that it can all be safely rolled back without any ill + * effects on external services which could not be rolled back and thus all the + * processes could be safely repeated (implied idempotent behavior). * * @author none */ diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/TriggerSerially.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/TriggerSerially.java index 7bf7d0b62f..f2f100bca6 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/TriggerSerially.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/TriggerSerially.java @@ -24,11 +24,10 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Marker annotation a {@link org.apache.nifi.processor.Processor Processor} - * implementation can use to indicate that the - * Processor is not safe for concurrent execution of its onTrigger() - * method. By default, Processors are assumed to be safe for concurrent - * execution. + * Marker annotation a {@link org.apache.nifi.processor.Processor Processor} + * implementation can use to indicate that the Processor is not safe for + * concurrent execution of its onTrigger() method. By default, Processors are + * assumed to be safe for concurrent execution. * * @author none */ diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/TriggerWhenAnyDestinationAvailable.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/TriggerWhenAnyDestinationAvailable.java index 803aa2f904..8f4da55708 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/TriggerWhenAnyDestinationAvailable.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/TriggerWhenAnyDestinationAvailable.java @@ -25,11 +25,10 @@ import java.lang.annotation.Target; /** * Marker annotation a {@link org.apache.nifi.processor.Processor Processor} - * implementation can use to indicate that the - * Processor is to be triggered if any of its destinations has available space - * for incoming FlowFiles. By default, Processors are triggered only when all - * destinations report that they have available space (i.e., none of the outgoing - * Connections is full). + * implementation can use to indicate that the Processor is to be triggered if + * any of its destinations has available space for incoming FlowFiles. By + * default, Processors are triggered only when all destinations report that they + * have available space (i.e., none of the outgoing Connections is full). * * @author none */ diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/TriggerWhenEmpty.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/TriggerWhenEmpty.java index fed9b34823..0506c089ba 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/TriggerWhenEmpty.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/TriggerWhenEmpty.java @@ -24,13 +24,13 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Marker annotation a {@link org.apache.nifi.processor.Processor Processor} - * implementation can use to indicate that the - * Processor should still be triggered even when it has no data in its work - * queue. By default, Processors which have no non-self incoming edges will be - * triggered even if there is no work in its queue. However, Processors that - * have non-self incoming edges will only be triggered if they have work in - * their queue or they present this annotation. + * Marker annotation a {@link org.apache.nifi.processor.Processor Processor} + * implementation can use to indicate that the Processor should still be + * triggered even when it has no data in its work queue. By default, Processors + * which have no non-self incoming edges will be triggered even if there is no + * work in its queue. However, Processors that have non-self incoming edges will + * only be triggered if they have work in their queue or they present this + * annotation. * * @author none */ diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/WritesAttribute.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/WritesAttribute.java index 31d05d105b..841cf40e91 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/WritesAttribute.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/WritesAttribute.java @@ -24,28 +24,18 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Annotation that may be placed on a {@link org.apache.nifi.processor.Processor Processor} - * indicating that this processor writes/updates a specific FlowFile attribute. - * - * @author + * Annotation that may be placed on a + * {@link org.apache.nifi.processor.Processor Processor} indicating that this + * processor writes/updates a specific FlowFile attribute. * */ - @Documented @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Inherited public @interface WritesAttribute { - - /** - * The FlowFile attribute that is being created or updated - * @return - */ + public String attribute(); - - /** - * A description of what is being written to the FlowFile attribute - * @return - */ + public String description() default ""; } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/WritesAttributes.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/WritesAttributes.java index 4b03af9b53..3537e7270e 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/WritesAttributes.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/behavior/WritesAttributes.java @@ -24,21 +24,16 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Annotation that may be placed on a {@link org.apache.nifi.processor.Processor Processor} - * indicating that this processor writes/updates specific FlowFile attributes. - * - * @author + * Annotation that may be placed on a + * {@link org.apache.nifi.processor.Processor Processor} indicating that this + * processor writes/updates specific FlowFile attributes. * */ - @Documented @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Inherited public @interface WritesAttributes { - /** - * A list of FlowFile attributes that may be written or updated - * @return - */ + public WritesAttribute[] value(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/CapabilityDescription.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/CapabilityDescription.java index d69788a9b1..0bdbbc6023 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/CapabilityDescription.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/CapabilityDescription.java @@ -24,10 +24,11 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Annotation that may be placed on a {@link org.apache.nifi.processor.Processor Processor}, + * Annotation that may be placed on a {@link org.apache.nifi.processor.Processor Processor}, * {@link org.apache.nifi.controller.ControllerService ControllerService}, or - * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} allowing for a description to be - * provided. This description can be provided to a user in logs, UI, etc. + * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} allowing for a + * description to be provided. This description can be provided to a user in + * logs, UI, etc. * * @author none */ diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/SeeAlso.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/SeeAlso.java index d664117984..35ca3db704 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/SeeAlso.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/SeeAlso.java @@ -26,34 +26,19 @@ import java.lang.annotation.Target; import org.apache.nifi.components.ConfigurableComponent; /** - * Annotation that may be placed on a - * {@link org.apache.nifi.processor.Processor Processor}, + * Annotation that may be placed on a null {@link org.apache.nifi.processor.Processor Processor}, * {@link org.apache.nifi.controller.ControllerService ControllerService}, or * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} that indicates * this component is related to the components listed. - * - * @author * */ - @Documented -@Target({ ElementType.TYPE }) +@Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Inherited public @interface SeeAlso { - /** - * Classes you want to link to. - * - * @return - */ + public Class[] value() default {}; - /** - * Fully qualified class names you want to link to. Use this when the class - * you want to link to is not in the class path of the component you are - * linking from. - * - * @return - */ public String[] classNames() default {}; } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/Tags.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/Tags.java index 8bd8f9a051..366dd4c6ae 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/Tags.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/documentation/Tags.java @@ -24,14 +24,13 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Annotation that can be applied to a {@link org.apache.nifi.processor.Processor Processor}, + * Annotation that can be applied to a {@link org.apache.nifi.processor.Processor Processor}, * {@link org.apache.nifi.controller.ControllerService ControllerService}, or - * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} in order to associate - * tags (keywords) with the component. These tags do not affect the component in - * any way but serve as additional documentation and can be used to sort/filter - * Processors. + * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} in order to + * associate tags (keywords) with the component. These tags do not affect the + * component in any way but serve as additional documentation and can be used to + * sort/filter Processors. * - * @author none */ @Documented @Target({ElementType.TYPE}) @@ -39,8 +38,5 @@ import java.lang.annotation.Target; @Inherited public @interface Tags { - /** - * @return all tag values associated with the given processor - */ public String[] value(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnAdded.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnAdded.java index a1286ea473..b82533552a 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnAdded.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnAdded.java @@ -25,24 +25,24 @@ import java.lang.annotation.Target; /** *

- * Marker annotation a {@link org.apache.nifi.processor.Processor Processor}, + * Marker annotation a {@link org.apache.nifi.processor.Processor Processor}, * {@link org.apache.nifi.controller.ControllerService ControllerService}, or - * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} - * implementation can use to indicate a method - * should be called whenever the component is added to the flow. This method - * will be called once for the entire life of a component instance. + * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation + * can use to indicate a method should be called whenever the component is added + * to the flow. This method will be called once for the entire life of a + * component instance. *

- * + * *

- * Methods with this annotation are called without any arguments, as all settings - * and properties can be assumed to be the defaults. + * Methods with this annotation are called without any arguments, as all + * settings and properties can be assumed to be the defaults. *

- * + * *

- * If any method annotated with this annotation throws a Throwable, the component - * will not be added to the flow. + * If any method annotated with this annotation throws a Throwable, the + * component will not be added to the flow. *

- * + * * @author none */ @Documented diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnDisabled.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnDisabled.java index b227968931..f205bc748c 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnDisabled.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnDisabled.java @@ -27,26 +27,29 @@ import org.apache.nifi.controller.ConfigurationContext; /** *

- * Marker annotation a {@link org.apache.nifi.controller.ControllerService ControllerService} - * can use to indicate a method should be called whenever the service is disabled. - *

+ * Marker annotation a + * {@link org.apache.nifi.controller.ControllerService ControllerService} can + * use to indicate a method should be called whenever the service is disabled. + *

* *

- * Methods using this annotation are permitted to take zero arguments or to take a single - * argument of type {@link ConfigurationContext}. If a method with this annotation - * throws a Throwable, a log message and bulletin will be issued for the service, and the - * service will remain in a 'DISABLING' state. When this occurs, the method with this annotation - * will be called again after some period of time. This will continue until the method returns - * without throwing any Throwable. Until that time, the service will remain in a 'DISABLING' state - * and cannot be enabled again. + * Methods using this annotation are permitted to take zero arguments or to take + * a single argument of type {@link ConfigurationContext}. If a method with this + * annotation throws a Throwable, a log message and bulletin will be issued for + * the service, and the service will remain in a 'DISABLING' state. When this + * occurs, the method with this annotation will be called again after some + * period of time. This will continue until the method returns without throwing + * any Throwable. Until that time, the service will remain in a 'DISABLING' + * state and cannot be enabled again. *

- * + * *

- * Note that this annotation will be ignored if applied to a ReportingTask or Processor. For a Controller - * Service, enabling and disabling are considered lifecycle events, as the action makes them usable or - * unusable by other components. However, for a Processor and a Reporting - * Task, these are not lifecycle events but rather a mechanism to allow a component to be excluded when - * starting or stopping a group of components. + * Note that this annotation will be ignored if applied to a ReportingTask or + * Processor. For a Controller Service, enabling and disabling are considered + * lifecycle events, as the action makes them usable or unusable by other + * components. However, for a Processor and a Reporting Task, these are not + * lifecycle events but rather a mechanism to allow a component to be excluded + * when starting or stopping a group of components. *

* */ diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnEnabled.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnEnabled.java index 32aeec6e7c..289b6c4a27 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnEnabled.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnEnabled.java @@ -25,35 +25,40 @@ import java.lang.annotation.Target; /** *

- * Marker annotation a {@link org.apache.nifi.controller.ControllerService ControllerService} - * can use to indicate a method should be called whenever the service is enabled. - * Any method that has this annotation will be called every time a user enables the service. - * Additionally, each time that NiFi is restarted, if NiFi is configured to "auto-resume state" - * and the service is enabled, the method will be invoked. + * Marker annotation a + * {@link org.apache.nifi.controller.ControllerService ControllerService} can + * use to indicate a method should be called whenever the service is enabled. + * Any method that has this annotation will be called every time a user enables + * the service. Additionally, each time that NiFi is restarted, if NiFi is + * configured to "auto-resume state" and the service is enabled, the method will + * be invoked. *

* *

- * Methods using this annotation must take either 0 arguments or a single argument of type + * Methods using this annotation must take either 0 arguments or a single + * argument of type * {@link org.apache.nifi.controller.ConfigurationContext ConfigurationContext}. *

- * + * *

- * If a method with this annotation throws a Throwable, a log message and bulletin will be issued - * for the component. In this event, the service will remain in an 'ENABLING' state and will not be - * usable. All methods with this annotation will then be called again after a delay. The service will - * not be made available for use until all methods with this annotation have returned without throwing - * anything. - *

- * - *

- * Note that this annotation will be ignored if applied to a ReportingTask or Processor. For a Controller - * Service, enabling and disabling are considered lifecycle events, as the action makes them usable or - * unusable by other components. However, for a Processor and a Reporting - * Task, these are not lifecycle events but rather a mechanism to allow a component to be excluded when - * starting or stopping a group of components. + * If a method with this annotation throws a Throwable, a log message and + * bulletin will be issued for the component. In this event, the service will + * remain in an 'ENABLING' state and will not be usable. All methods with this + * annotation will then be called again after a delay. The service will not be + * made available for use until all methods with this annotation have returned + * without throwing anything. *

* - * + *

+ * Note that this annotation will be ignored if applied to a ReportingTask or + * Processor. For a Controller Service, enabling and disabling are considered + * lifecycle events, as the action makes them usable or unusable by other + * components. However, for a Processor and a Reporting Task, these are not + * lifecycle events but rather a mechanism to allow a component to be excluded + * when starting or stopping a group of components. + *

+ * + * */ @Documented @Target({ElementType.METHOD}) diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnRemoved.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnRemoved.java index 71202b4317..120b6521ed 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnRemoved.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnRemoved.java @@ -28,23 +28,24 @@ import org.apache.nifi.processor.ProcessContext; /** *

- * Marker annotation a {@link org.apache.nifi.processor.Processor Processor}, + * Marker annotation a {@link org.apache.nifi.processor.Processor Processor}, * {@link org.apache.nifi.controller.ControllerService ControllerService}, or - * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation - * can use to indicate a method should be called whenever the component is removed - * from the flow. This method will be called once for the entire life of a - * component instance. If the method throw any Throwable, that Throwable will be - * caught and logged but will not prevent subsequent methods with this annotation - * or removal of the component from the flow. + * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation + * can use to indicate a method should be called whenever the component is + * removed from the flow. This method will be called once for the entire life of + * a component instance. If the method throw any Throwable, that Throwable will + * be caught and logged but will not prevent subsequent methods with this + * annotation or removal of the component from the flow. *

- * + * *

- * Methods with this annotation are permitted to take no arguments or to take a single - * argument. If using a single argument, that argument must be of type {@link ConfigurationContext} - * if the component is a ReportingTask or a ControllerService. If the component is a Processor, - * then the argument must be of type {@link ProcessContext}. + * Methods with this annotation are permitted to take no arguments or to take a + * single argument. If using a single argument, that argument must be of type + * {@link ConfigurationContext} if the component is a ReportingTask or a + * ControllerService. If the component is a Processor, then the argument must be + * of type {@link ProcessContext}. *

- * + * * @author none */ @Documented diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnScheduled.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnScheduled.java index c012bd728b..f5250eaf0c 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnScheduled.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnScheduled.java @@ -25,32 +25,38 @@ import java.lang.annotation.Target; /** *

- * Marker annotation a {@link org.apache.nifi.processor.Processor Processor} or - * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation - * can use to indicate a method should be called whenever the component is scheduled - * to run. This will be called before any call to 'onTrigger' and will be called once each time - * a Processor or Reporting Task is scheduled to run. This occurs in one of two ways: either - * a user clicks to schedule the component to run, or NiFi is restarted with the "auto-resume state" - * configuration set to true (the default value) and the component is already running. - *

- * - *

- * Methods using this annotation must take either 0 arguments or a single argument. - *

- * - *

- * If using 1 argument and the component using the annotation is a Processor, that argument must - * be of type {@link org.apache.nifi.processor.ProcessContext ProcessContext}. - *

- * - *

- * If using 1 argument and the component using the annotation is a Reporting Task, that argument must - * be of type {@link org.apache.nifi.controller.ConfigurationContext ConfigurationContext}. + * Marker annotation a {@link org.apache.nifi.processor.Processor Processor} or + * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation + * can use to indicate a method should be called whenever the component is + * scheduled to run. This will be called before any call to 'onTrigger' and will + * be called once each time a Processor or Reporting Task is scheduled to run. + * This occurs in one of two ways: either a user clicks to schedule the + * component to run, or NiFi is restarted with the "auto-resume state" + * configuration set to true (the default value) and the component is already + * running. *

* - * If any method annotated with this annotation throws any Throwable, the framework will wait a while - * and then attempt to invoke the method again. This will continue until the method succeeds, and the - * component will then be scheduled to run after this method return successfully. + *

+ * Methods using this annotation must take either 0 arguments or a single + * argument. + *

+ * + *

+ * If using 1 argument and the component using the annotation is a Processor, + * that argument must be of type + * {@link org.apache.nifi.processor.ProcessContext ProcessContext}. + *

+ * + *

+ * If using 1 argument and the component using the annotation is a Reporting + * Task, that argument must be of type + * {@link org.apache.nifi.controller.ConfigurationContext ConfigurationContext}. + *

+ * + * If any method annotated with this annotation throws any Throwable, the + * framework will wait a while and then attempt to invoke the method again. This + * will continue until the method succeeds, and the component will then be + * scheduled to run after this method return successfully. * * @author none */ diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnShutdown.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnShutdown.java index 3d1ce6c642..dd47a31dbb 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnShutdown.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnShutdown.java @@ -28,21 +28,22 @@ import org.apache.nifi.processor.ProcessContext; /** *

- * Marker annotation a {@link org.apache.nifi.processor.Processor Processor}, + * Marker annotation a {@link org.apache.nifi.processor.Processor Processor}, * {@link org.apache.nifi.controller.ControllerService ControllerService}, or - * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation - * can use to indicate a method should be called whenever the flow is being shutdown. - * This will be called at most once for each component in a JVM lifetime. - * It is not, however, guaranteed that this method will be called on shutdown, as - * the service may be killed suddenly. + * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation + * can use to indicate a method should be called whenever the flow is being + * shutdown. This will be called at most once for each component in a JVM + * lifetime. It is not, however, guaranteed that this method will be called on + * shutdown, as the service may be killed suddenly. *

- * + * *

- * Methods with this annotation are permitted to take either 0 or 1 argument. If an argument - * is used, it must be of type {@link ConfigurationContext} if the component is a ReportingTask - * or Controller Service, or of type {@link ProcessContext} if the component is a Processor. + * Methods with this annotation are permitted to take either 0 or 1 argument. If + * an argument is used, it must be of type {@link ConfigurationContext} if the + * component is a ReportingTask or Controller Service, or of type + * {@link ProcessContext} if the component is a Processor. *

- * + * * @author none */ @Documented diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnStopped.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnStopped.java index fdc4fd8e09..c2f25335f4 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnStopped.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnStopped.java @@ -29,12 +29,11 @@ import org.apache.nifi.processor.ProcessContext; /** *

* Marker annotation a {@link org.apache.nifi.processor.Processor Processor} or - * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} - * implementation can use to indicate that a method - * should be called whenever the component is no longer scheduled to run. - * Methods marked with this annotation will be invoked each time the component - * is stopped and will be invoked only after the last thread has returned from - * the onTrigger method. + * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation + * can use to indicate that a method should be called whenever the component is + * no longer scheduled to run. Methods marked with this annotation will be + * invoked each time the component is stopped and will be invoked only after the + * last thread has returned from the onTrigger method. *

* *

@@ -47,14 +46,15 @@ import org.apache.nifi.processor.ProcessContext; * *

* To indicate that a method should be called immediately when a component is no - * longer scheduled to run (as opposed to after all threads have returned from the - * onTrigger method), see the {@link OnUnscheduled} annotation. + * longer scheduled to run (as opposed to after all threads have returned from + * the onTrigger method), see the {@link OnUnscheduled} annotation. *

- * + * *

- * Methods with this annotation are permitted to take either 0 or 1 argument. If an argument - * is used, it must be of type {@link ConfigurationContext} if the component is a ReportingTask - * or of type {@link ProcessContext} if the component is a Processor. + * Methods with this annotation are permitted to take either 0 or 1 argument. If + * an argument is used, it must be of type {@link ConfigurationContext} if the + * component is a ReportingTask or of type {@link ProcessContext} if the + * component is a Processor. *

* * @author none diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnUnscheduled.java b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnUnscheduled.java index 5c7e13dc2c..b7d50277c2 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnUnscheduled.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/annotation/lifecycle/OnUnscheduled.java @@ -26,26 +26,29 @@ import java.lang.annotation.Target; /** *

* Marker annotation a {@link org.apache.nifi.processor.Processor Processor} or - * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} - * should be called whenever the component is no longer scheduled to run. - * Methods marked with this annotation will be invoked each time the framework - * is notified to stop scheduling the component. This method is invoked as other - * threads are potentially running. To invoke a method after all threads have - * finished processing, see the {@link OnStopped} annotation. + * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} should be + * called whenever the component is no longer scheduled to run. Methods marked + * with this annotation will be invoked each time the framework is notified to + * stop scheduling the component. This method is invoked as other threads are + * potentially running. To invoke a method after all threads have finished + * processing, see the {@link OnStopped} annotation. *

- * + * *

- * Methods using this annotation must take either 0 arguments or a single argument. + * Methods using this annotation must take either 0 arguments or a single + * argument. *

- * + * *

- * If using 1 argument and the component using the annotation is a Processor, that argument must - * be of type {@link org.apache.nifi.processor.ProcessContext ProcessContext}. + * If using 1 argument and the component using the annotation is a Processor, + * that argument must be of type + * {@link org.apache.nifi.processor.ProcessContext ProcessContext}. *

- * + * *

- * If using 1 argument and the component using the annotation is a Reporting Task, that argument must - * be of type {@link org.apache.nifi.controller.ConfigurationContext ConfigurationContext}. + * If using 1 argument and the component using the annotation is a Reporting + * Task, that argument must be of type + * {@link org.apache.nifi.controller.ConfigurationContext ConfigurationContext}. *

*/ @Documented diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/Authority.java b/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/Authority.java index 823f463644..4502c1196f 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/Authority.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/Authority.java @@ -34,11 +34,9 @@ public enum Authority { ROLE_NIFI; /** - * Returns the matching role or null if the specified role does not match - * any roles. - * - * @param rawAuthority - * @return + * @param rawAuthority string form of authority + * @return the matching role or null if the specified role does not match + * any roles */ public static Authority valueOfAuthority(String rawAuthority) { Authority desiredAuthority = null; @@ -54,9 +52,7 @@ public enum Authority { } /** - * Gets the string value of each authority. - * - * @return + * @return the string value of each authority */ public static Set getRawAuthorities() { Set authorities = new LinkedHashSet<>(); diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/AuthorityProvider.java b/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/AuthorityProvider.java index 7754c3502a..723ec33085 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/AuthorityProvider.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/AuthorityProvider.java @@ -31,11 +31,9 @@ import org.apache.nifi.authorization.exception.UnknownIdentityException; public interface AuthorityProvider { /** - * Returns whether the user with the specified DN is known to this authority - * provider. It is not necessary for the user to have any authorities. - * - * @param dn - * @return + * @param dn of the user + * @return whether the user with the specified DN is known to this authority + * provider. It is not necessary for the user to have any authorities */ boolean doesDnExist(String dn) throws AuthorityAccessException; @@ -43,29 +41,30 @@ public interface AuthorityProvider { * Get the authorities for the specified user. If the specified user exists * but does not have any authorities, an empty set should be returned. * - * @param dn - * @return - * @throws UnknownIdentityException - * @throws AuthorityAccessException + * @param dn of the user to lookup + * @return the authorities for the specified user. If the specified user + * exists but does not have any authorities, an empty set should be returned + * @throws UnknownIdentityException if identity is not known + * @throws AuthorityAccessException if unable to access authorities */ Set getAuthorities(String dn) throws UnknownIdentityException, AuthorityAccessException; /** * Sets the specified authorities for the specified user. * - * @param dn - * @param authorities - * @throws UnknownIdentityException - * @throws AuthorityAccessException + * @param dn the specified user + * @param authorities the new authorities for the user + * @throws UnknownIdentityException if identity is not known + * @throws AuthorityAccessException if unable to access authorities */ void setAuthorities(String dn, Set authorities) throws UnknownIdentityException, AuthorityAccessException; /** * Gets the users for the specified authority. * - * @param authority - * @return - * @throws AuthorityAccessException + * @param authority for which to determine membership of + * @return all users with the specified authority + * @throws AuthorityAccessException if unable to access authorities */ Set getUsers(Authority authority) throws AuthorityAccessException; @@ -73,19 +72,19 @@ public interface AuthorityProvider { * Revokes the specified user. Its up to the implementor to determine the * semantics of revocation. * - * @param dn - * @throws UnknownIdentityException - * @throws AuthorityAccessException + * @param dn the dn of the user + * @throws UnknownIdentityException if the user is not known + * @throws AuthorityAccessException if unable to access the authorities */ void revokeUser(String dn) throws UnknownIdentityException, AuthorityAccessException; /** * Add the specified user. * - * @param dn + * @param dn of the user * @param group Optional - * @throws IdentityAlreadyExistsException - * @throws AuthorityAccessException + * @throws UnknownIdentityException if the user is not known + * @throws AuthorityAccessException if unable to access the authorities */ void addUser(String dn, String group) throws IdentityAlreadyExistsException, AuthorityAccessException; @@ -93,10 +92,10 @@ public interface AuthorityProvider { * Gets the group for the specified user. Return null if the user does not * belong to a group. * - * @param dn - * @return - * @throws UnknownIdentityException - * @throws AuthorityAccessException + * @param dn the user + * @return the group of the given user + * @throws UnknownIdentityException if the user is not known + * @throws AuthorityAccessException if unable to access the authorities */ String getGroupForUser(String dn) throws UnknownIdentityException, AuthorityAccessException; @@ -104,26 +103,28 @@ public interface AuthorityProvider { * Revokes all users for a specified group. Its up to the implementor to * determine the semantics of revocation. * - * @param group - * @throws AuthorityAccessException + * @param group to revoke the users of + * @throws UnknownIdentityException if the user is not known + * @throws AuthorityAccessException if unable to access the authorities */ void revokeGroup(String group) throws UnknownIdentityException, AuthorityAccessException; /** * Adds the specified users to the specified group. * - * @param dn - * @param group - * @throws AuthorityAccessException + * @param dn the set of users to add to the group + * @param group to add users to + * @throws UnknownIdentityException if the user is not known + * @throws AuthorityAccessException if unable to access the authorities */ void setUsersGroup(Set dn, String group) throws UnknownIdentityException, AuthorityAccessException; /** * Ungroups the specified user. * - * @param dn - * @throws UnknownIdentityException - * @throws AuthorityAccessException + * @param dn of the user + * @throws UnknownIdentityException if the user is not known + * @throws AuthorityAccessException if unable to access the authorities */ void ungroupUser(String dn) throws UnknownIdentityException, AuthorityAccessException; @@ -133,41 +134,41 @@ public interface AuthorityProvider { * does not exist. If an admin revoked this group before calling ungroup, it * may or may not exist. * - * @param group - * @throws AuthorityAccessException + * @param group to ungroup + * @throws AuthorityAccessException if unable to access the authorities */ void ungroup(String group) throws AuthorityAccessException; /** - * Determines whether the user in the specified dnChain should be able to + * Determines whether the user in the specified dnChain should be able to * download the content for the flowfile with the specified attributes. - * - * The first dn in the chain is the end user that the request was issued on + * + * The first dn in the chain is the end user that the request was issued on * behalf of. The subsequent dn's in the chain represent entities proxying * the user's request with the last being the proxy that sent the current * request. - * - * @param dnChain - * @param attributes - * @return - * @throws UnknownIdentityException - * @throws AuthorityAccessException + * + * @param dnChain of the user + * @param attributes of the flowfile being requested + * @return the authorization result + * @throws UnknownIdentityException if the user is not known + * @throws AuthorityAccessException if unable to access the authorities */ DownloadAuthorization authorizeDownload(List dnChain, Map attributes) throws UnknownIdentityException, AuthorityAccessException; - + /** * Called immediately after instance creation for implementers to perform * additional setup * - * @param initializationContext + * @param initializationContext in which to initialize */ void initialize(AuthorityProviderInitializationContext initializationContext) throws ProviderCreationException; /** * Called to configure the AuthorityProvider. * - * @param configurationContext - * @throws ProviderCreationException + * @param configurationContext at the time of configuration + * @throws ProviderCreationException for any issues configuring the provider */ void onConfigured(AuthorityProviderConfigurationContext configurationContext) throws ProviderCreationException; diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/AuthorityProviderConfigurationContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/AuthorityProviderConfigurationContext.java index 6765ed4afe..c1ba5dfd80 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/AuthorityProviderConfigurationContext.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/AuthorityProviderConfigurationContext.java @@ -24,9 +24,7 @@ import java.util.Map; public interface AuthorityProviderConfigurationContext { /** - * The identifier for the authority provider. - * - * @return + * @return identifier for the authority provider */ String getIdentifier(); @@ -41,12 +39,10 @@ public interface AuthorityProviderConfigurationContext { Map getProperties(); /** - * Retrieves the value the component currently understands for the given + * @param property to lookup the descriptor and value of + * @return the value the component currently understands for the given * PropertyDescriptor. This method does not substitute default - * PropertyDescriptor values, so the value returned will be null if not set. - * - * @param property - * @return + * PropertyDescriptor values, so the value returned will be null if not set */ String getProperty(String property); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/DownloadAuthorization.java b/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/DownloadAuthorization.java index 08695fa91e..02fd839fa0 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/DownloadAuthorization.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/authorization/DownloadAuthorization.java @@ -22,6 +22,7 @@ package org.apache.nifi.authorization; public class DownloadAuthorization { private static enum Result { + Approved, Denied; }; @@ -32,10 +33,11 @@ public class DownloadAuthorization { private final String explanation; /** - * Creates a new DownloadAuthorization with the specified result and explanation. - * - * @param result - * @param explanation + * Creates a new DownloadAuthorization with the specified result and + * explanation. + * + * @param result of the authorization + * @param explanation for the authorization attempt */ private DownloadAuthorization(Result result, String explanation) { if (Result.Denied.equals(result) && explanation == null) { @@ -47,38 +49,33 @@ public class DownloadAuthorization { } /** - * Whether or not the download request is approved. - * - * @return + * @return Whether or not the download request is approved */ public boolean isApproved() { return Result.Approved.equals(result); } /** - * If the download request is denied, the reason why. Null otherwise. - * - * @return + * @return If the download request is denied, the reason why. Null otherwise */ public String getExplanation() { return explanation; } /** - * Creates a new approved DownloadAuthorization. - * - * @return + * @return a new approved DownloadAuthorization */ public static DownloadAuthorization approved() { return APPROVED; } /** - * Creates a new denied DownloadAuthorization with the specified explanation. - * - * @param explanation - * @return - * @throws IllegalArgumentException if explanation is null + * Creates a new denied DownloadAuthorization with the specified + * explanation. + * + * @param explanation for why it was denied + * @return a new denied DownloadAuthorization with the specified explanation + * @throws IllegalArgumentException if explanation is null */ public static DownloadAuthorization denied(String explanation) { return new DownloadAuthorization(Result.Denied, explanation); diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/components/AbstractConfigurableComponent.java b/nifi/nifi-api/src/main/java/org/apache/nifi/components/AbstractConfigurableComponent.java index 6736788a84..1d4e0c200e 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/components/AbstractConfigurableComponent.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/components/AbstractConfigurableComponent.java @@ -46,11 +46,9 @@ public abstract class AbstractConfigurableComponent implements ConfigurableCompo } /** - * Returns a PropertyDescriptor for the name specified that is fully + * @param descriptorName to lookup the descriptor + * @return a PropertyDescriptor for the name specified that is fully * populated - * - * @param descriptorName - * @return */ @Override public final PropertyDescriptor getPropertyDescriptor(final String descriptorName) { @@ -141,11 +139,12 @@ public abstract class AbstractConfigurableComponent implements ConfigurableCompo * method a processor may simply get the latest value whenever it needs it * and if necessary lazily evaluate it. * - * @param descriptor + * @param descriptor of the modified property * @param oldValue non-null property value (previous) * @param newValue the new property value or if null indicates the property * was removed */ + @Override public void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) { } @@ -168,7 +167,7 @@ public abstract class AbstractConfigurableComponent implements ConfigurableCompo *

* Default is null. * - * @param propertyDescriptorName + * @param propertyDescriptorName used to lookup if any property descriptors exist for that name * @return new property descriptor if supported */ protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) { @@ -186,9 +185,10 @@ public abstract class AbstractConfigurableComponent implements ConfigurableCompo return Collections.EMPTY_LIST; } + @Override public final List getPropertyDescriptors() { final List supported = getSupportedPropertyDescriptors(); - return supported == null ? Collections.emptyList() :new ArrayList<>(supported); + return supported == null ? Collections.emptyList() : new ArrayList<>(supported); } @Override diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/components/AllowableValue.java b/nifi/nifi-api/src/main/java/org/apache/nifi/components/AllowableValue.java index 8921340611..a4809616d6 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/components/AllowableValue.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/components/AllowableValue.java @@ -33,7 +33,7 @@ public class AllowableValue { * Constructs a new AllowableValue with the given value and and the same * display name and no description. * - * @param value + * @param value that is allowed */ public AllowableValue(final String value) { this(value, value); @@ -43,8 +43,8 @@ public class AllowableValue { * Constructs a new AllowableValue with the given value and display name and * no description * - * @param value - * @param displayName + * @param value that is allowed + * @param displayName to display for the value * * @throws NullPointerException if either argument is null */ @@ -56,9 +56,9 @@ public class AllowableValue { * Constructs a new AllowableValue with the given value, display name, and * description * - * @param value - * @param displayName - * @param description + * @param value that is valid + * @param displayName to show for the value + * @param description of the value * * @throws NullPointerException if identifier or value is null */ @@ -69,40 +69,33 @@ public class AllowableValue { } /** - * Returns the value of this AllowableValue - * - * @return + * @return the value of this AllowableValue */ public String getValue() { return value; } /** - * Returns a human-readable name for this AllowableValue - * - * @return + * @return a human-readable name for this AllowableValue */ public String getDisplayName() { return displayName; } /** - * Returns a description for this value, or null if no + * @return a description for this value, or null if no * description was provided - * - * @return */ public String getDescription() { return description; } /** - * this is equal to obj of obj is the + * @return true if this is equal to obj of obj is the * same object as this or if obj is an instance of * AllowableValue and both have the same value, or if * obj is a String and is equal to * {@link #getValue() this.getValue()}. - * @return */ @Override public boolean equals(final Object obj) { @@ -121,8 +114,7 @@ public class AllowableValue { } /** - * Hash Code is based solely off of the value - * @return + * @return based solely off of the value */ @Override public int hashCode() { diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/components/ConfigurableComponent.java b/nifi/nifi-api/src/main/java/org/apache/nifi/components/ConfigurableComponent.java index 24e1f3c9ea..8b56f482a6 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/components/ConfigurableComponent.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/components/ConfigurableComponent.java @@ -27,7 +27,7 @@ public interface ConfigurableComponent { * not included in the in the purposed configuration, the default value will * be used. * - * @param context + * @param context of validation * @return Collection of validation result objects for any invalid findings * only. If the collection is empty then the component is valid. Guaranteed * non-null @@ -35,11 +35,9 @@ public interface ConfigurableComponent { Collection validate(ValidationContext context); /** - * Returns the PropertyDescriptor with the given name, if it exists; - * otherwise, returns null. - * - * @param name - * @return + * @param name to lookup the descriptor + * @return the PropertyDescriptor with the given name, if it exists; + * otherwise, returns null */ PropertyDescriptor getPropertyDescriptor(String name); @@ -51,7 +49,7 @@ public interface ConfigurableComponent { * necessary lazily evaluate it. Any throwable that escapes this method will * simply be ignored. * - * @param descriptor + * @param descriptor the descriptor for the property being modified * @param oldValue the value that was previously set, or null if no value * was previously set for this property * @param newValue the new property value or if null indicates the property @@ -68,10 +66,8 @@ public interface ConfigurableComponent { List getPropertyDescriptors(); /** - * Returns the unique identifier that the framework assigned to this + * @return the unique identifier that the framework assigned to this * component - * - * @return */ String getIdentifier(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java b/nifi/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java index e62ff7962c..acda6c4bfa 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/components/PropertyDescriptor.java @@ -29,7 +29,6 @@ import org.apache.nifi.controller.ControllerService; * An immutable object for holding information about a type of processor * property. * - * @author unattributed */ public final class PropertyDescriptor implements Comparable { @@ -121,9 +120,9 @@ public final class PropertyDescriptor implements Comparable * If this descriptor has a set of allowable values then the given value is * only checked against the allowable values. * - * @param input - * @param context - * @return + * @param input the value to validate + * @param context the context of validation + * @return the result of validating the input */ public ValidationResult validate(final String input, final ValidationContext context) { ValidationResult lastResult = Validator.INVALID.validate(this.name, input, context); @@ -142,17 +141,17 @@ public final class PropertyDescriptor implements Comparable final Set validIdentifiers = context.getControllerServiceLookup().getControllerServiceIdentifiers(controllerServiceDefinition); if (validIdentifiers != null && validIdentifiers.contains(input)) { final ControllerService controllerService = context.getControllerServiceLookup().getControllerService(input); - if ( !context.isValidationRequired(controllerService) ) { + if (!context.isValidationRequired(controllerService)) { return new ValidationResult.Builder() - .input(input) - .subject(getName()) - .valid(true) - .build(); + .input(input) + .subject(getName()) + .valid(true) + .build(); } - + final String serviceId = controllerService.getIdentifier(); - if (!context.getControllerServiceLookup().isControllerServiceEnabled(serviceId) && - !context.getControllerServiceLookup().isControllerServiceEnabling(serviceId)) { + if (!context.getControllerServiceLookup().isControllerServiceEnabled(serviceId) + && !context.getControllerServiceLookup().isControllerServiceEnabling(serviceId)) { return new ValidationResult.Builder() .input(context.getControllerServiceLookup().getControllerServiceName(serviceId)) .subject(getName()) @@ -235,8 +234,8 @@ public final class PropertyDescriptor implements Comparable * This is beneficial because it allows a User Interface to represent * the name differently. * - * @param displayName - * @return + * @param displayName of the property + * @return the builder */ public Builder displayName(final String displayName) { if (null != displayName) { @@ -249,8 +248,8 @@ public final class PropertyDescriptor implements Comparable /** * Sets the property name. * - * @param name - * @return + * @param name of the property + * @return the builder */ public Builder name(final String name) { if (null != name) { @@ -263,8 +262,8 @@ public final class PropertyDescriptor implements Comparable * Sets the value indicating whether or not this Property will support * the Attribute Expression Language. * - * @param supported - * @return + * @param supported true if yes; false otherwise + * @return the builder */ public Builder expressionLanguageSupported(final boolean supported) { this.expressionLanguageSupported = supported; @@ -272,9 +271,8 @@ public final class PropertyDescriptor implements Comparable } /** - * - * @param description - * @return + * @param description of the property + * @return the builder */ public Builder description(final String description) { if (null != description) { @@ -294,8 +292,8 @@ public final class PropertyDescriptor implements Comparable * should be set to the "Value" of the {@link AllowableValue} object * (see {@link AllowableValue#getValue()}). * - * @param value - * @return + * @param value default value + * @return the builder */ public Builder defaultValue(final String value) { if (null != value) { @@ -310,9 +308,8 @@ public final class PropertyDescriptor implements Comparable } /** - * - * @param values - * @return + * @param values contrained set of values + * @return the builder */ public Builder allowableValues(final Set values) { if (null != values) { @@ -336,9 +333,8 @@ public final class PropertyDescriptor implements Comparable } /** - * - * @param values - * @return + * @param values constrained set of values + * @return the builder */ public Builder allowableValues(final String... values) { if (null != values) { @@ -353,8 +349,8 @@ public final class PropertyDescriptor implements Comparable /** * Sets the Allowable Values for this Property * - * @param values - * @return + * @param values contrained set of values + * @return the builder */ public Builder allowableValues(final AllowableValue... values) { if (null != values) { @@ -364,9 +360,8 @@ public final class PropertyDescriptor implements Comparable } /** - * - * @param required - * @return + * @param required true if yes; false otherwise + * @return the builder */ public Builder required(final boolean required) { this.required = required; @@ -374,9 +369,8 @@ public final class PropertyDescriptor implements Comparable } /** - * - * @param sensitive - * @return + * @param sensitive true if sensitive; false otherwise + * @return the builder */ public Builder sensitive(final boolean sensitive) { this.sensitive = sensitive; @@ -384,9 +378,8 @@ public final class PropertyDescriptor implements Comparable } /** - * - * @param validator - * @return + * @param validator for the property + * @return the builder */ public Builder addValidator(final Validator validator) { if (validator != null) { @@ -401,7 +394,7 @@ public final class PropertyDescriptor implements Comparable * * @param controllerServiceDefinition the interface that is implemented * by the Controller Service - * @return + * @return the builder */ public Builder identifiesControllerService(final Class controllerServiceDefinition) { if (controllerServiceDefinition != null) { @@ -436,7 +429,7 @@ public final class PropertyDescriptor implements Comparable throw new IllegalStateException("Must specify a name"); } if (!isValueAllowed(defaultValue)) { - throw new IllegalStateException("Default value ["+ defaultValue +"] is not in the set of allowable values"); + throw new IllegalStateException("Default value [" + defaultValue + "] is not in the set of allowable values"); } return new PropertyDescriptor(this); @@ -525,7 +518,7 @@ public final class PropertyDescriptor implements Comparable * Constructs a validator that will check if the given value is in the * given set. * - * @param validValues + * @param validValues values which are acceptible * @throws NullPointerException if the given validValues is null */ private ConstrainedSetValidator(final Collection validValues) { diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/components/PropertyValue.java b/nifi/nifi-api/src/main/java/org/apache/nifi/components/PropertyValue.java index 1c5f04a943..1845ed224c 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/components/PropertyValue.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/components/PropertyValue.java @@ -89,25 +89,21 @@ public interface PropertyValue { public Double asDataSize(DataUnit dataUnit); /** - * Returns the ControllerService whose identifier is the raw value of + * @return the ControllerService whose identifier is the raw value of * this, or null if either the value is not set or * the value does not identify a ControllerService - * - * @return */ public ControllerService asControllerService(); /** - * Returns the ControllerService whose identifier is the raw value of the + * @param the generic type of the controller service + * @param serviceType the class of the Controller Service + * @return the ControllerService whose identifier is the raw value of the * this, or null if either the value is not set or * the value does not identify a ControllerService. The object returned by * this method is explicitly cast to type specified, if the type specified * is valid. Otherwise, throws an IllegalArgumentException * - * @param - * @param serviceType - * @return - * * @throws IllegalArgumentException if the value of this points * to a ControllerService but that service is not of type * serviceType or if serviceType references a @@ -116,11 +112,9 @@ public interface PropertyValue { public T asControllerService(Class serviceType) throws IllegalArgumentException; /** - * Returns true if the user has configured a value, or if the + * @return true if the user has configured a value, or if the * {@link PropertyDescriptor} for the associated property has a default - * value, false otherwise. - * - * @return + * value, false otherwise */ public boolean isSet(); @@ -131,7 +125,8 @@ public interface PropertyValue { * call chaining. *

* - * @return + * @return a PropertyValue with the new value is returned, supporting call + * chaining * * @throws ProcessException if the Query cannot be compiled or evaluating * the query against the given attributes causes an Exception to be thrown @@ -145,8 +140,9 @@ public interface PropertyValue { * call chaining. *

* - * @param flowFile - * @return + * @param flowFile to evaluate attributes of + * @return a PropertyValue with the new value is returned, supporting call + * chaining * * @throws ProcessException if the Query cannot be compiled or evaluating * the query against the given attributes causes an Exception to be thrown @@ -161,8 +157,10 @@ public interface PropertyValue { * supporting call chaining. *

* - * @param decorator - * @return + * @param decorator The supplied decorator is then given a chance to + * decorate the value + * @return a PropertyValue with the new value is then returned, supporting + * call chaining * * @throws ProcessException if the Query cannot be compiled or evaluating * the query against the given attributes causes an Exception to be thrown @@ -177,10 +175,12 @@ public interface PropertyValue { * supporting call chaining. *

* - * @param flowFile - * @param decorator + * @param flowFile to evaluate expressions against + * @param decorator The supplied decorator is then given a chance to + * decorate the value * - * @return + * @return a PropertyValue with the new value is then returned, supporting + * call chaining * * @throws ProcessException if the Query cannot be compiled or evaluating * the query against the given attributes causes an Exception to be thrown diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/components/ValidationContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/components/ValidationContext.java index 61b68a249c..a1dcf438dd 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/components/ValidationContext.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/components/ValidationContext.java @@ -25,86 +25,71 @@ import org.apache.nifi.expression.ExpressionLanguageCompiler; public interface ValidationContext { /** - * 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 ValidationContext that is appropriate for validating the given + * @param controllerService to lookup the validation context of + * @return a ValidationContext that is appropriate for validating the given * {@link ControllerService} - * - * @param controllerService - * @return */ ValidationContext getControllerServiceValidationContext(ControllerService controllerService); /** - * Creates and returns a new {@link ExpressionLanguageCompiler} that can be - * used to compile & evaluate Attribute Expressions - * - * @return + * @return a new {@link ExpressionLanguageCompiler} that can be used to + * compile & evaluate Attribute Expressions */ ExpressionLanguageCompiler newExpressionLanguageCompiler(); /** - * Returns a PropertyValue that encapsulates the value configured for the + * @param property being validated + * @return a PropertyValue that encapsulates the value configured for the * given PropertyDescriptor - * - * @param property - * @return */ PropertyValue getProperty(PropertyDescriptor property); /** - * Returns a PropertyValue that represents the given value - * - * @param value - * @return + * @param value to make a PropertyValue object for + * @return a PropertyValue that represents the given value */ PropertyValue newPropertyValue(String value); /** - * Returns a Map of all configured Properties. - * - * @return + * @return a Map of all configured Properties */ Map getProperties(); /** - * Returns the currently configured Annotation Data - * - * @return + * @return the currently configured Annotation Data */ String getAnnotationData(); - + /** - * There are times when the framework needs to consider a component valid, even if it - * references an invalid ControllerService. This method will return false - * if the component is to be considered valid even if the given Controller Service is referenced - * and is invalid. - * @param service + * There are times when the framework needs to consider a component valid, + * even if it references an invalid ControllerService. This method will + * return false if the component is to be considered valid even + * if the given Controller Service is referenced and is invalid. + * + * @param service to check if validation is required + * @return false if the component is to be considered valid + * even if the given Controller Service is referenced and is invalid */ boolean isValidationRequired(ControllerService service); - + /** - * Returns true if the given value contains a NiFi Expression Language expression, - * false if it does not - * - * @param value - * @return + * @param value to test whether expression language is present + * @return true if the given value contains a NiFi Expression + * Language expression, false if it does not */ boolean isExpressionLanguagePresent(String value); - + /** - * Returns true if the property with the given name supports the NiFi Expression Language, - * false if the property does not support the Expression Language or is not a valid property - * name - * - * @param propertyName - * @return + * @param propertyName to test whether expression language is supported + * @return true if the property with the given name supports + * the NiFi Expression Language, false if the property does not + * support the Expression Language or is not a valid property name */ boolean isExpressionLanguageSupported(String propertyName); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/components/ValidationResult.java b/nifi/nifi-api/src/main/java/org/apache/nifi/components/ValidationResult.java index 3a54848fa0..2736044708 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/components/ValidationResult.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/components/ValidationResult.java @@ -119,8 +119,8 @@ public class ValidationResult { /** * Defaults to false * - * @param valid - * @return + * @param valid true if is valid; false otherwise + * @return the builder */ public Builder valid(final boolean valid) { this.valid = valid; @@ -130,8 +130,8 @@ public class ValidationResult { /** * Defaults to empty string * - * @param input - * @return + * @param input what was validated + * @return the builder */ public Builder input(final String input) { if (null != input) { @@ -143,8 +143,8 @@ public class ValidationResult { /** * Defaults to empty string * - * @param explanation - * @return + * @param explanation of validation result + * @return the builder */ public Builder explanation(final String explanation) { if (null != explanation) { @@ -156,8 +156,8 @@ public class ValidationResult { /** * Defaults to empty string * - * @param subject - * @return + * @param subject the thing that was validated + * @return the builder */ public Builder subject(final String subject) { if (null != subject) { diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/AbstractControllerService.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/AbstractControllerService.java index 71cdd231ea..cd3b9bdc10 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/AbstractControllerService.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/AbstractControllerService.java @@ -32,7 +32,7 @@ public abstract class AbstractControllerService extends AbstractConfigurableComp private ControllerServiceLookup serviceLookup; private volatile ConfigurationContext configContext; private ComponentLog logger; - + @Override public final void initialize(final ControllerServiceInitializationContext context) throws InitializationException { this.identifier = context.getIdentifier(); @@ -52,31 +52,25 @@ public abstract class AbstractControllerService extends AbstractConfigurableComp } /** - * Returns the currently configured value for the given + * @param descriptor to retrieve value of + * @return the currently configured value for the given * {@link PropertyDescriptor} - * - * @param descriptor - * @return */ protected final PropertyValue getProperty(final PropertyDescriptor descriptor) { return configContext.getProperty(descriptor); } /** - * Returns an unmodifiable map of all configured properties for this + * @return an unmodifiable map of all configured properties for this * {@link ControllerService} - * - * @return */ protected final Map getProperties() { return configContext.getProperties(); } /** - * 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; @@ -86,15 +80,15 @@ public abstract class AbstractControllerService extends AbstractConfigurableComp * 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 of initialization context + * @throws InitializationException if unable to init */ protected void init(final ControllerServiceInitializationContext 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; diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ConfigurationContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ConfigurationContext.java index 7ed09170ed..1fff6b9b34 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ConfigurationContext.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ConfigurationContext.java @@ -28,18 +28,14 @@ import org.apache.nifi.components.PropertyValue; public interface ConfigurationContext { /** - * Returns the configured value for the property with the given name - * - * @param property - * @return + * @param property to retrieve by name + * @return the configured value for the property with the given name */ PropertyValue getProperty(PropertyDescriptor property); /** - * Returns an unmodifiable map of all configured properties for this + * @return an unmodifiable map of all configured properties for this * {@link ControllerService} - * - * @return */ Map getProperties(); diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerService.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerService.java index cbf81a5a9b..a77c69d7a6 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerService.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerService.java @@ -68,21 +68,20 @@ import org.apache.nifi.reporting.ReportingTask; *

*

*

- * 			public static final PropertyDescriptor MY_PROPERTY = new PropertyDescriptor.Builder()
- * 				.name("My Property")
- * 				.description("Example Property")
- * 				.identifiesControllerService( MyControllerServiceInterface.class )
- * 				.build();
+ *    public static final PropertyDescriptor MY_PROPERTY = new PropertyDescriptor.Builder()
+ *     .name("My Property")
+ *     .description("Example Property")
+ *     .identifiesControllerService( MyControllerServiceInterface.class )
+ *     .build();
  *
- * 			...
+ *    ...
+ *    public void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException {
+ *     // Obtain the user-selected controller service
+ *     final MyControllerServiceInterface service = context.getProperty(MY_PROPERTY).asControllerService( MyControllerServiceInterface.class );
+ *     ...
+ *    }
  *
- * 			public void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException {
- * 				// Obtain the user-selected controller service
- * 				final MyControllerServiceInterface service = context.getProperty(MY_PROPERTY).asControllerService( MyControllerServiceInterface.class );
- * 				...
- * 			}
- *
- * 		

+ *

* *
  • A Controller Service can be obtained via a * {@link ControllerServiceLookup}. This lookup may be obtained, for example, @@ -94,10 +93,9 @@ import org.apache.nifi.reporting.ReportingTask; *

    *

    *

    - * 			public void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException {
    - * 				final MyControllerServiceInterface service = (MyControllerServiceInterface)
    - * 					context.getControllerServiceLookup().getControllerService("service_identifier");
    - * 			}
    + *    public void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException {
    + *      final MyControllerServiceInterface service = (MyControllerServiceInterface) context.getControllerServiceLookup().getControllerService("service_identifier");
    + *    }
      * 

    *
  • * @@ -142,12 +140,12 @@ import org.apache.nifi.reporting.ReportingTask; *

    * Typically, this is done by creating a NAR structure as follows: *

    - * 	+ my-services-api-nar
    - *	+--- service-X-implementation-nar
    - *	+--- service-Y-implementation-nar
    - *	+--- service-Z-implementation-nar
    - *	+--- processor-A-nar
    - *	+--- processor-B-nar
    + *   + my-services-api-nar
    + *   +--- service-X-implementation-nar
    + *   +--- service-Y-implementation-nar
    + *   +--- service-Z-implementation-nar
    + *   +--- processor-A-nar
    + *   +--- processor-B-nar
      * 
    *

    * @@ -174,8 +172,8 @@ public interface ControllerService extends ConfigurableComponent { * throughout the life of the service. This method will be called before any * properties are set * - * @param context - * @throws org.apache.nifi.reporting.InitializationException + * @param context of initialization + * @throws org.apache.nifi.reporting.InitializationException if unable to init */ void initialize(ControllerServiceInitializationContext context) throws InitializationException; diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceInitializationContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceInitializationContext.java index d34c6354ad..6fcee0c7bd 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceInitializationContext.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceInitializationContext.java @@ -21,26 +21,20 @@ import org.apache.nifi.logging.ComponentLog; public interface ControllerServiceInitializationContext { /** - * Returns the identifier associated with the {@link ControllerService} with + * @return the identifier associated with the {@link ControllerService} with * which this context is associated - * - * @return */ String getIdentifier(); /** - * 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 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(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceLookup.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceLookup.java index 4b96f626a6..f5300b15c5 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceLookup.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/ControllerServiceLookup.java @@ -18,68 +18,53 @@ package org.apache.nifi.controller; import java.util.Set; - public interface ControllerServiceLookup { /** - * Returns the ControllerService that is registered with the given + * @param serviceIdentifier of controller service + * @return the ControllerService that is registered with the given * identifier - * - * @param serviceIdentifier - * @return */ ControllerService getControllerService(String serviceIdentifier); /** - * Returns true if the Controller Service with the given + * @param serviceIdentifier identifier of service to check + * @return true if the Controller Service with the given * identifier is enabled, false otherwise. If the given * identifier is not known by this ControllerServiceLookup, returns * false - * - * @param serviceIdentifier - * @return */ boolean isControllerServiceEnabled(String serviceIdentifier); /** - * Returns true if the Controller Service with the given + * @param serviceIdentifier idenfitier of service to check + * @return true if the Controller Service with the given * identifier has been enabled but is still in the transitioning state, - * otherwise returns false. - * If the given identifier is not known by this ControllerServiceLookup, - * returns false. - * - * @param serviceIdentifier - * @return + * otherwise returns false. If the given identifier is not + * known by this ControllerServiceLookup, returns false */ boolean isControllerServiceEnabling(String serviceIdentifier); - + /** - * Returns true if the given Controller Service is enabled, + * @param service service to check + * @return true if the given Controller Service is enabled, * false otherwise. If the given Controller Service is not * known by this ControllerServiceLookup, returns false - * - * @param service - * @return */ boolean isControllerServiceEnabled(ControllerService service); /** - * Returns the set of all Controller Service Identifiers whose Controller - * Service is of the given type. The class specified MUST be an interface, - * or an IllegalArgumentExcption will be thrown - * - * @param serviceType - * @return - * + * @param serviceType type of service to get identifiers for + * @return the set of all Controller Service Identifiers whose Controller + * Service is of the given type. * @throws IllegalArgumentException if the given class is not an interface */ Set getControllerServiceIdentifiers(Class serviceType) throws IllegalArgumentException; /** - * Returns the name of the Controller service with the given identifier. If no service can be - * found with this identifier, returns {@code null}. - * @param serviceIdentifier - * @return + * @param serviceIdentifier identifier to look up + * @return the name of the Controller service with the given identifier. If + * no service can be found with this identifier, returns {@code null} */ String getControllerServiceName(String serviceIdentifier); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/FlowFileQueue.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/FlowFileQueue.java index 86742c77db..92a4ee0301 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/FlowFileQueue.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/FlowFileQueue.java @@ -40,10 +40,8 @@ public interface FlowFileQueue { List getPriorities(); /** - * Returns the minimum number of FlowFiles that must be present in order for + * @return the minimum number of FlowFiles that must be present in order for * FlowFiles to begin being swapped out of the queue - * - * @return */ int getSwapThreshold(); @@ -71,9 +69,7 @@ public interface FlowFileQueue { long getBackPressureObjectThreshold(); /** - * Establishes this queue's preferred maximum data size. - * - * @param maxDataSize + * @param maxDataSize Establishes this queue's preferred maximum data size. */ void setBackPressureDataSizeThreshold(String maxDataSize); @@ -117,21 +113,21 @@ public interface FlowFileQueue { /** * places the given file into the queue * - * @param file + * @param file to place into queue */ void put(FlowFileRecord file); /** * places the given files into the queue * - * @param files + * @param files to place into queue */ void putAll(Collection files); /** * Removes all records from the internal swap queue and returns them. * - * @return + * @return all removed records from internal swap queue */ List pollSwappableRecords(); @@ -139,7 +135,7 @@ public interface FlowFileQueue { * Restores the records from swap space into this queue, adding the records * that have expired to the given set instead of enqueuing them. * - * @param records + * @param records that were swapped in */ void putSwappedRecords(Collection records); @@ -147,15 +143,13 @@ public interface FlowFileQueue { * Updates the internal counters of how much data is queued, based on * swapped data that is being restored. * - * @param numRecords - * @param contentSize + * @param numRecords count of records swapped in + * @param contentSize total size of records being swapped in */ void incrementSwapCount(int numRecords, long contentSize); /** - * Returns the number of FlowFiles that are enqueued and not swapped - * - * @return + * @return the number of FlowFiles that are enqueued and not swapped */ int unswappedSize(); @@ -164,14 +158,14 @@ public interface FlowFileQueue { int getSwapQueueSize(); /** - * @param expiredRecords + * @param expiredRecords expired records * @return the next flow file on the queue; null if empty */ FlowFileRecord poll(Set expiredRecords); /** - * @param maxResults - * @param expiredRecords + * @param maxResults limits how many results can be polled + * @param expiredRecords for expired records * @return the next flow files on the queue up to the max results; null if * empty */ @@ -181,10 +175,10 @@ public interface FlowFileQueue { * Drains flow files from the given source queue into the given destination * list. * - * @param sourceQueue - * @param destination + * @param sourceQueue queue to drain from + * @param destination Collection to drain to * @param maxResults max number to drain - * @param expiredRecords + * @param expiredRecords for expired records * @return size (bytes) of flow files drained from queue */ long drainQueue(Queue sourceQueue, List destination, int maxResults, Set expiredRecords); diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/Snippet.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/Snippet.java index 8ce106e8ec..93f332735b 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/Snippet.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/Snippet.java @@ -24,89 +24,65 @@ import java.util.Set; public interface Snippet { /** - * The id of this snippet. - * - * @return + * @return id of this snippet */ public String getId(); /** - * Whether or not this snippet is linked to the data flow. If the Snippet is + * @return Whether or not this snippet is linked to the data flow. If the Snippet is * deleted and is linked, then the underlying components will also be * deleted. If the Snippet is deleted and is NOT linked, only the Snippet is * removed - * - * @return */ public boolean isLinked(); /** - * The parent group id of the components in this snippet. - * - * @return + * @return parent group id of the components in this snippet */ public String getParentGroupId(); /** - * The connections in this snippet. - * - * @return + * @return connections in this snippet */ public Set getConnections(); /** - * The funnels in this snippet. - * - * @return + * @return funnels in this snippet */ public Set getFunnels(); /** - * The input ports in this snippet. - * - * @return + * @return input ports in this snippet */ public Set getInputPorts(); /** - * The output ports in this snippet. - * - * @return + * @return output ports in this snippet */ public Set getOutputPorts(); /** - * The labels in this snippet. - * - * @return + * @return labels in this snippet */ public Set getLabels(); /** - * Returns the identifiers of all ProcessGroups in this Snippet - * - * @return + * @return the identifiers of all ProcessGroups in this Snippet */ public Set getProcessGroups(); /** - * Returns the identifiers of all Processors in this Snippet - * - * @return + * @return the identifiers of all Processors in this Snippet */ public Set getProcessors(); /** - * Returns the identifiers of all RemoteProcessGroups in this Snippet - * - * @return + * @return the identifiers of all RemoteProcessGroups in this Snippet */ public Set getRemoteProcessGroups(); /** - * Determines if this snippet is empty. - * - * @return + * @return Determines if this snippet is empty */ public boolean isEmpty(); diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/Triggerable.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/Triggerable.java index 2eba911610..4b3149b213 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/Triggerable.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/Triggerable.java @@ -44,9 +44,9 @@ public interface Triggerable { * be committed or the framework may use the session again for another * processor down stream

    * - * @param context - * @param sessionFactory used to generate {@link ProcessSession}s to use - * for operating on flow files within the repository + * @param context in which the component is triggered + * @param sessionFactory used to generate {@link ProcessSession}s to use for + * operating on flow files within the repository * * @throws ProcessException if processing did not complete normally though * indicates the problem is an understood potential outcome of processing. @@ -81,7 +81,7 @@ public interface Triggerable { * Triggerable has any active threads, see * {@link ProcessScheduler#getActiveThreadCount(nifi.connectable.Connectable)}. * - * @return + * @return the schedule state */ ScheduledState getScheduledState(); @@ -92,12 +92,12 @@ public interface Triggerable { * invocation of {@link #onTrigger(ProcessContext, ProcessSessionFactory)} * have not yet returned * - * @return + * @return true if running;false otherwise */ boolean isRunning(); /** - * @param timeUnit + * @param timeUnit for the scheduling period of the component * @return the amount of time between each scheduling period */ long getSchedulingPeriod(TimeUnit timeUnit); @@ -110,7 +110,8 @@ public interface Triggerable { /** * Updates how often this Triggerable should be triggered to run - * @param schedulingPeriod + * + * @param schedulingPeriod to set */ void setScheduldingPeriod(String schedulingPeriod); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/annotation/OnConfigured.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/annotation/OnConfigured.java index 78cc04b77e..2aa90cc700 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/annotation/OnConfigured.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/annotation/OnConfigured.java @@ -31,8 +31,9 @@ import java.lang.annotation.Target; * {@link nifi.controller.ConfigurationContext ConfigurationContext}. * * @author none - * - * @deprecated This annotation has been replaced by those in the {@link org.apache.nifi.annotation.lifecycle} package. + * + * @deprecated This annotation has been replaced by those in the + * {@link org.apache.nifi.annotation.lifecycle} package. */ @Documented @Target({ElementType.METHOD}) diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/ContentRepository.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/ContentRepository.java index d66b8a6499..ee3ead9905 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/ContentRepository.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/ContentRepository.java @@ -31,7 +31,6 @@ import org.apache.nifi.controller.repository.claim.ContentClaimManager; * available on the methods but a merge capability is provided which between * that and creating new claims a merge is available. * - * @author none */ public interface ContentRepository { @@ -40,46 +39,38 @@ public interface ContentRepository { * ContentClaimManager that is to be used for interacting with Content * Claims * - * @param claimManager - * @throws java.io.IOException + * @param claimManager to handle claims + * @throws java.io.IOException if unable to init */ void initialize(ContentClaimManager claimManager) throws IOException; /** - * Shuts down the Content Repository, freeing any resources that may be held. - * This is called when an administrator shuts down NiFi. + * Shuts down the Content Repository, freeing any resources that may be + * held. This is called when an administrator shuts down NiFi. */ void shutdown(); - + /** - * Returns the names of all Containers that exist for this Content + * @return the names of all Containers that exist for this Content * Repository - * - * @return */ Set getContainerNames(); /** - * Returns the maximum number of bytes that can be stored in the storage + * @param containerName name of container to check capacity on + * @return the maximum number of bytes that can be stored in the storage * mechanism that backs the container with the given name - * - * @param containerName - * @return - * @throws java.io.IOException - * + * @throws java.io.IOException if unable to check capacity * @throws IllegalArgumentException if no container exists with the given * name */ long getContainerCapacity(String containerName) throws IOException; /** - * Returns the number of bytes available to be used used by the storage + * @param containerName to check space on + * @return the number of bytes available to be used used by the storage * mechanism that backs the container with the given name - * - * @param containerName - * @return - * @throws java.io.IOException - * + * @throws java.io.IOException if unable to check space * @throws IllegalArgumentException if no container exists with the given * name */ @@ -92,14 +83,14 @@ public interface ContentRepository { * loss tolerant. If true the repository might choose more volatile storage * options which could increase performance for a tradeoff with reliability * @return newly created claim - * @throws java.io.IOException + * @throws java.io.IOException if unable to create claim */ ContentClaim create(boolean lossTolerant) throws IOException; /** * Increments the number of claimants for the given claim * - * @param claim + * @param claim to increment * @return the number of claimants after incrementing */ int incrementClaimaintCount(ContentClaim claim); @@ -107,7 +98,7 @@ public interface ContentRepository { /** * Obtains the current number of claimants for the given claim * - * @param claim + * @param claim to get count of * @return the number of claimants */ int getClaimantCount(ContentClaim claim); @@ -117,15 +108,15 @@ public interface ContentRepository { * claim is null or content cannot be found or removed no exception will be * thrown. * - * @param claim - * @return + * @param claim to decrement + * @return new claimant count for the given claim */ int decrementClaimantCount(ContentClaim claim); /** * Removes the content indicated by the given claim * - * @param claim + * @param claim to remove * * @return a boolean indicating whether or not the destruction of the claim * was successful @@ -136,9 +127,9 @@ public interface ContentRepository { * Clones the content for the given content claim and returns content claim * of the new object * - * @param original - * @param lossTolerant - * @return + * @param original to clone + * @param lossTolerant if can be place in a loss tolerant repository + * @return new claim * @throws IOException if an IO error occurs. Any content written to the new * destination prior to the error will be destroyed */ @@ -156,7 +147,7 @@ public interface ContentRepository { * @param footer if supplied will be appended to the output * @param demarcator if supplied will be placed in between each merged * object - * @throws IOException + * @throws IOException if unable to merge * @throws IllegalArgumentException if the given destination is included in * the given claims */ @@ -167,9 +158,9 @@ public interface ContentRepository { * claim within the repository. * * @return the size of the claim - * @param content + * @param content to import from * @param claim the claim to write imported content to - * @throws IOException + * @throws IOException if failure to read given content */ long importFrom(Path content, ContentClaim claim) throws IOException; @@ -179,11 +170,11 @@ public interface ContentRepository { * argument * * @return the size of the claim - * @param content + * @param content to import from * @param claim the claim to write imported content to * @param append if true, the content will be appended to the claim; if * false, the content will replace the contents of the claim - * @throws IOException + * @throws IOException if unable to read content */ long importFrom(Path content, ContentClaim claim, boolean append) throws IOException; @@ -192,9 +183,9 @@ public interface ContentRepository { * claim within the repository. * * @return the size of the claim - * @param content + * @param content to import from * @param claim the claim to write imported content to - * @throws IOException + * @throws IOException if unable to read content */ long importFrom(InputStream content, ContentClaim claim) throws IOException; @@ -202,11 +193,11 @@ public interface ContentRepository { * Imports content from the given stream, appending or replacing the current * claim, according to the value of the appen dargument * - * @param content - * @param claim - * @param append - * @return - * @throws IOException + * @param content to import from + * @param claim to write to + * @param append whether to append or replace + * @return length of data imported in bytes + * @throws IOException if failure to read or write stream */ long importFrom(InputStream content, ContentClaim claim, boolean append) throws IOException; @@ -214,7 +205,7 @@ public interface ContentRepository { * Exports the content of the given claim to the given destination. * * @return the size of the destination or the claim - * @param claim + * @param claim to export from * @param destination where to export data * @param append if true appends to the destination; false overwrites * @throws IOException if an IO error occurs. The state of the content for @@ -227,7 +218,7 @@ public interface ContentRepository { * Exports the content of the given claim to the given destination. * * @return the size of the destination or the claim - * @param claim + * @param claim to export from * @param destination where to export data * @param append if true appends to the destination; false overwrites * @param offset the offset at which the claim should start being copied @@ -242,7 +233,7 @@ public interface ContentRepository { * Exports the content of the given claim to the given destination. * * @return the size of the claim - * @param claim + * @param claim to export from * @param destination where to export data * @throws IOException if an IO error occurs. */ @@ -253,7 +244,7 @@ public interface ContentRepository { * and copying length bytes, to the given destination. * * @return the number of bytes copied - * @param claim + * @param claim to export from * @param destination where to export data * @param offset the offset into the claim at which the copy should begin * @param length the number of bytes to copy @@ -262,27 +253,27 @@ public interface ContentRepository { long exportTo(ContentClaim claim, OutputStream destination, long offset, long length) throws IOException; /** - * @param claim + * @param claim to get size of * @return size in bytes of content for given claim - * @throws IOException + * @throws IOException if size check failed */ long size(ContentClaim claim) throws IOException; /** * Provides access to the input stream for the given claim * - * @param claim + * @param claim to read from * @return InputStream over the content of the given claim - * @throws IOException + * @throws IOException if unable to read */ InputStream read(ContentClaim claim) throws IOException; /** * Obtains an OutputStream to the content for the given claim. * - * @param claim - * @return - * @throws IOException + * @param claim to write to + * @return the stream to write to + * @throws IOException if unable to obtain stream */ OutputStream write(ContentClaim claim) throws IOException; @@ -300,15 +291,13 @@ public interface ContentRepository { void cleanup(); /** - * Returns a boolean indicating whether or not the content specified by the - * given claim can be read, regardless of whether the content has been - * archived or not. If the ContentRepository does not implement archiving - * capabilities, this method will return false. - * * @param contentClaim the Content Claim to check - * @return + * @return Returns a boolean indicating whether or not the content specified + * by the given claim can be read, regardless of whether the content has + * been archived or not. If the ContentRepository does not implement + * archiving capabilities, this method will return false * - * @throws IOException + * @throws IOException if unable to determine accessibility */ boolean isAccessible(ContentClaim contentClaim) throws IOException; } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/FlowFileRecord.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/FlowFileRecord.java index 13548a2c03..f2493f616e 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/FlowFileRecord.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/FlowFileRecord.java @@ -27,28 +27,22 @@ import org.apache.nifi.flowfile.FlowFile; public interface FlowFileRecord extends FlowFile { /** - * Returns the time (in millis since epoch) at which this FlowFile should no - * longer be penalized. - * - * @return + * @return the time (in millis since epoch) at which this FlowFile should no + * longer be penalized */ long getPenaltyExpirationMillis(); /** - * Returns the {@link ContentClaim} that holds the FlowFile's content - * - * @return + * @return the {@link ContentClaim} that holds the FlowFile's content */ ContentClaim getContentClaim(); /** - * Returns the byte offset into the {@link ContentClaim} at which the + * @return the byte offset into the {@link ContentClaim} at which the * FlowFile's content occurs. This mechanism allows multiple FlowFiles to * have the same ContentClaim, which can be significantly more efficient for * some implementations of * {@link nifi.controller.repository.ContentRepository ContentRepository} - * - * @return */ long getContentClaimOffset(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/FlowFileRepository.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/FlowFileRepository.java index 999a087d8a..5e59e04890 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/FlowFileRepository.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/FlowFileRepository.java @@ -27,7 +27,6 @@ import org.apache.nifi.controller.repository.claim.ContentClaimManager; /** * Implementations must be thread safe * - * @author none */ public interface FlowFileRepository extends Closeable { @@ -36,28 +35,24 @@ public interface FlowFileRepository extends Closeable { * ContentClaimManager that is to be used for interacting with Content * Claims * - * @param claimManager - * @throws java.io.IOException + * @param claimManager for handling claims + * @throws java.io.IOException if unable to initialize repository */ void initialize(ContentClaimManager claimManager) throws IOException; /** - * Returns the maximum number of bytes that can be stored in the underlying + * @return the maximum number of bytes that can be stored in the underlying * storage mechanism * - * @return - * - * @throws IOException + * @throws IOException if computing capacity fails */ long getStorageCapacity() throws IOException; /** - * Returns the number of bytes currently available for use by the underlying + * @return the number of bytes currently available for use by the underlying * storage mechanism * - * @return - * - * @throws IOException + * @throws IOException if computing usable space fails */ long getUsableStorageSpace() throws IOException; @@ -65,7 +60,7 @@ public interface FlowFileRepository extends Closeable { * Updates the repository with the given RepositoryRecords. * * @param records the records to update the repository with - * @throws java.io.IOException + * @throws java.io.IOException if update fails */ void updateRepository(Collection records) throws IOException; @@ -79,7 +74,7 @@ public interface FlowFileRepository extends Closeable { * returned by a call to {@link #getNextFlowFileSequence()} * * @return index of highest flow file identifier - * @throws IOException + * @throws IOException if load fails */ long loadFlowFiles(QueueProvider queueProvider, long minimumSequenceNumber) throws IOException; @@ -97,7 +92,7 @@ public interface FlowFileRepository extends Closeable { /** * @return the max ID of all FlowFiles that currently exist in * the repository. - * @throws IOException + * @throws IOException if computing max identifier fails */ long getMaxFlowFileIdentifier() throws IOException; @@ -109,7 +104,7 @@ public interface FlowFileRepository extends Closeable { * @param flowFileQueue the queue that the FlowFiles belong to * @param swapLocation the location to which the FlowFiles were swapped * - * @throws IOException + * @throws IOException if swap fails */ void swapFlowFilesOut(List swappedOut, FlowFileQueue flowFileQueue, String swapLocation) throws IOException; @@ -122,7 +117,7 @@ public interface FlowFileRepository extends Closeable { * @param flowFileRecords the records that were swapped in * @param flowFileQueue the queue that the FlowFiles belong to * - * @throws IOException + * @throws IOException if swap fails */ void swapFlowFilesIn(String swapLocation, List flowFileRecords, FlowFileQueue flowFileQueue) throws IOException; } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/FlowFileSwapManager.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/FlowFileSwapManager.java index c6daab8303..869e2b355b 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/FlowFileSwapManager.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/FlowFileSwapManager.java @@ -55,9 +55,9 @@ public interface FlowFileSwapManager { * Notifies FlowFile queues of the number of FlowFiles and content size of * all FlowFiles that are currently swapped out * - * @param connectionProvider - * @param claimManager - * @return + * @param connectionProvider provider + * @param claimManager manager + * @return how many flowfiles have been recovered */ long recoverSwappedFlowFiles(QueueProvider connectionProvider, ContentClaimManager claimManager); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/QueueProvider.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/QueueProvider.java index 42cf319afd..fcb516d5ea 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/QueueProvider.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/QueueProvider.java @@ -27,9 +27,7 @@ import org.apache.nifi.controller.FlowFileQueue; public interface QueueProvider { /** - * Returns all FlowFileQueues that currently exist in the flow - * - * @return + * @return all FlowFileQueues that currently exist in the flow */ Collection getAllQueues(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/RepositoryRecord.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/RepositoryRecord.java index d4b9c86ba3..40d44a84c6 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/RepositoryRecord.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/RepositoryRecord.java @@ -26,60 +26,44 @@ import org.apache.nifi.controller.repository.claim.ContentClaim; public interface RepositoryRecord { /** - * The FlowFileQueue to which the FlowFile is to be transferred - * - * @return + * @return FlowFileQueue to which the FlowFile is to be transferred */ FlowFileQueue getDestination(); /** - * The FlowFileQueue from which the record was pulled - * - * @return + * @return FlowFileQueue from which the record was pulled */ FlowFileQueue getOriginalQueue(); /** - * The type of update that this record encapsulates - * - * @return + * @return type of update that this record encapsulates */ RepositoryRecordType getType(); /** - * The current ContentClaim for the FlowFile - * - * @return + * @return current ContentClaim for the FlowFile */ ContentClaim getCurrentClaim(); /** - * The original ContentClaim for the FlowFile before any changes were made - * - * @return + * @return original ContentClaim for the FlowFile before any changes were made */ ContentClaim getOriginalClaim(); /** - * The byte offset into the Content Claim where this FlowFile's content + * @return byte offset into the Content Claim where this FlowFile's content * begins - * - * @return */ long getCurrentClaimOffset(); /** - * The FlowFile being encapsulated by this record - * - * @return + * @return FlowFile being encapsulated by this record */ FlowFileRecord getCurrent(); /** - * Whether or not the FlowFile's attributes have changed since the FlowFile + * @return Whether or not the FlowFile's attributes have changed since the FlowFile * was pulled from its queue (or created) - * - * @return */ boolean isAttributesChanged(); @@ -90,11 +74,9 @@ public interface RepositoryRecord { boolean isMarkedForAbort(); /** - * If the FlowFile is swapped out of the Java heap space, provides the + * @return If the FlowFile is swapped out of the Java heap space, provides the * location of the swap file, or null if the FlowFile is not * swapped out - * - * @return */ String getSwapLocation(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/claim/ContentClaim.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/claim/ContentClaim.java index e321217fd3..11a1620ac8 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/claim/ContentClaim.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/claim/ContentClaim.java @@ -45,11 +45,9 @@ public interface ContentClaim extends Comparable { String getSection(); /** - * Specifies whether or not the Claim is loss-tolerant. If so, we will + * @return Indicates whether or not the Claim is loss-tolerant. If so, we will * attempt to keep the content but will not sacrifice a great deal of - * performance to do so. - * - * @return + * performance to do so */ boolean isLossTolerant(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/claim/ContentClaimManager.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/claim/ContentClaimManager.java index 6a5b38b4b5..bffcec321b 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/claim/ContentClaimManager.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/repository/claim/ContentClaimManager.java @@ -28,20 +28,18 @@ public interface ContentClaimManager { * Creates a new Content Claim with the given id, container, section, and * loss tolerance. * - * @param id - * @param container - * @param section - * @param lossTolerant - * @return + * @param id of claim + * @param container of claim + * @param section of claim + * @param lossTolerant of claim + * @return new claim */ ContentClaim newContentClaim(String container, String section, String id, boolean lossTolerant); /** - * Returns the number of FlowFiles that hold a claim to a particular piece + * @param claim to obtain reference count for + * @return the number of FlowFiles that hold a claim to a particular piece * of FlowFile content - * - * @param claim - * @return */ int getClaimantCount(ContentClaim claim); @@ -49,8 +47,8 @@ public interface ContentClaimManager { * Decreases by 1 the count of how many FlowFiles hold a claim to a * particular piece of FlowFile content and returns the new count * - * @param claim - * @return + * @param claim to decrement claimants on + * @return new claimaint count */ int decrementClaimantCount(ContentClaim claim); @@ -58,8 +56,8 @@ public interface ContentClaimManager { * Increases by 1 the count of how many FlowFiles hold a claim to a * particular piece of FlowFile content and returns the new count * - * @param claim - * @return + * @param claim to increment claims on + * @return new claimant count */ int incrementClaimantCount(ContentClaim claim); @@ -73,9 +71,10 @@ public interface ContentClaimManager { * optimize its tasks, knowing that the Content Claim cannot be referenced * by any other component * - * @param claim - * @param newClaim - * @return + * @param claim to increment + * @param newClaim provides a hint that no other process can have access to this + * claim right now + * @return new claim count */ int incrementClaimantCount(ContentClaim claim, boolean newClaim); @@ -105,7 +104,7 @@ public interface ContentClaimManager { * unneeded claim. As such, it is now safe to destroy the contents. *

    * - * @param claim + * @param claim to mark as now destructable */ void markDestructable(ContentClaim claim); @@ -114,8 +113,8 @@ public interface ContentClaimManager { * of destructable content claims to the given {@code destination} so that * they can be destroyed. * - * @param destination - * @param maxElements + * @param destination to drain to + * @param maxElements max items to drain */ void drainDestructableClaims(Collection destination, int maxElements); @@ -128,10 +127,10 @@ public interface ContentClaimManager { * ready to be destroyed, the method will return without having added * anything to the given {@code destination}. * - * @param destination - * @param maxElements - * @param timeout - * @param unit + * @param destination to drain to + * @param maxElements max items to drain + * @param timeout maximum time to wait + * @param unit unit of time to wait */ void drainDestructableClaims(Collection destination, int maxElements, long timeout, TimeUnit unit); diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/ProcessGroupStatus.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/ProcessGroupStatus.java index dba3a19b17..7aae8665d6 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/ProcessGroupStatus.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/ProcessGroupStatus.java @@ -425,7 +425,7 @@ public class ProcessGroupStatus implements Cloneable { // processor run status is disabled/stopped/running is part of the flow configuration // and should not differ amongst nodes. however, whether a processor is invalid // can be driven by environmental conditions. this check allows any of those to - // take precedence over the configured run status. + // take precedence over the configured run status. if (RunStatus.Invalid.equals(statusToMerge.getRunStatus())) { merged.setRunStatus(RunStatus.Invalid); } @@ -454,7 +454,7 @@ public class ProcessGroupStatus implements Cloneable { merged.setTransmitting(true); } - // should be unnecessary here since ports run status should not be affected by + // should be unnecessary here since ports run status should not be affected by // environmental conditions but doing so in case that changes if (RunStatus.Invalid.equals(statusToMerge.getRunStatus())) { merged.setRunStatus(RunStatus.Invalid); @@ -484,7 +484,7 @@ public class ProcessGroupStatus implements Cloneable { merged.setTransmitting(true); } - // should be unnecessary here since ports run status not should be affected by + // should be unnecessary here since ports run status not should be affected by // environmental conditions but doing so in case that changes if (RunStatus.Invalid.equals(statusToMerge.getRunStatus())) { merged.setRunStatus(RunStatus.Invalid); diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/ComponentStatusRepository.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/ComponentStatusRepository.java index 6fe13fc870..4628a288f7 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/ComponentStatusRepository.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/ComponentStatusRepository.java @@ -33,7 +33,7 @@ public interface ComponentStatusRepository { /** * Captures the status information provided in the given report * - * @param rootGroupStatus + * @param rootGroupStatus status of root group */ void capture(ProcessGroupStatus rootGroupStatus); @@ -42,22 +42,17 @@ public interface ComponentStatusRepository { * timestamp that indicates the time at which the status report was * generated. This can be used to replay historical values. * - * @param rootGroupStatus - * @param timestamp + * @param rootGroupStatus status + * @param timestamp timestamp of capture */ void capture(ProcessGroupStatus rootGroupStatus, Date timestamp); /** - * Returns the Date at which the latest capture was performed - * - * @return + * @return the Date at which the latest capture was performed */ Date getLastCaptureDate(); /** - * Returns a {@link StatusHistory} that provides the status information - * about the Connection with the given ID during the given time period. - * * @param connectionId the ID of the Connection for which the Status is * desired * @param start the earliest date for which status information should be @@ -70,15 +65,13 @@ public interface ComponentStatusRepository { * If the date range is large, the total number of data points could be far * too many to process. Therefore, this parameter allows the requestor to * indicate how many samples to return. - * @return + * @return a {@link StatusHistory} that provides the status information + * about the Connection with the given ID during the given time period */ StatusHistory getConnectionStatusHistory(String connectionId, Date start, Date end, int preferredDataPoints); /** - * Returns a {@link StatusHistory} that provides the status information - * about the Process Group with the given ID during the given time period. - * - * @param processGroupId + * @param processGroupId of group to get status of * @param start the earliest date for which status information should be * returned; if null, the start date should be assumed to be * the beginning of time @@ -89,15 +82,13 @@ public interface ComponentStatusRepository { * If the date range is large, the total number of data points could be far * too many to process. Therefore, this parameter allows the requestor to * indicate how many samples to return. - * @return + * @return a {@link StatusHistory} that provides the status information + * about the Process Group with the given ID during the given time period */ StatusHistory getProcessGroupStatusHistory(String processGroupId, Date start, Date end, int preferredDataPoints); /** - * Returns a {@link StatusHistory} that provides the status information - * about the Processor with the given ID during the given time period. - * - * @param processorId + * @param processorId to get status of * @param start the earliest date for which status information should be * returned; if null, the start date should be assumed to be * the beginning of time @@ -108,16 +99,13 @@ public interface ComponentStatusRepository { * If the date range is large, the total number of data points could be far * too many to process. Therefore, this parameter allows the requestor to * indicate how many samples to return. - * @return + * @return a {@link StatusHistory} that provides the status information + * about the Processor with the given ID during the given time period */ StatusHistory getProcessorStatusHistory(String processorId, Date start, Date end, int preferredDataPoints); /** - * Returns a {@link StatusHistory} that provides the status information - * about the Remote Process Group with the given ID during the given time - * period. - * - * @param remoteGroupId + * @param remoteGroupId to get history of * @param start the earliest date for which status information should be * returned; if null, the start date should be assumed to be * the beginning of time @@ -128,39 +116,33 @@ public interface ComponentStatusRepository { * If the date range is large, the total number of data points could be far * too many to process. Therefore, this parameter allows the requestor to * indicate how many samples to return. - * @return + * @return a {@link StatusHistory} that provides the status information + * about the Remote Process Group with the given ID during the given time + * period */ StatusHistory getRemoteProcessGroupStatusHistory(String remoteGroupId, Date start, Date end, int preferredDataPoints); /** - * Returns a List of all {@link MetricDescriptor}s that are applicable to + * @return a List of all {@link MetricDescriptor}s that are applicable to * Process Groups - * - * @return */ List> getProcessGroupMetricDescriptors(); /** - * Returns a List of all {@link MetricDescriptor}s that are applicable to + * @return a List of all {@link MetricDescriptor}s that are applicable to * Processors - * - * @return */ List> getProcessorMetricDescriptors(); /** - * Returns a List of all {@link MetricDescriptor}s that are applicable to + * @return a List of all {@link MetricDescriptor}s that are applicable to * Remote Process Groups - * - * @return */ List> getRemoteProcessGroupMetricDescriptors(); /** - * Returns a List of all {@link MetricDescriptor}s that are applicable to + * @return a List of all {@link MetricDescriptor}s that are applicable to * Connections - * - * @return */ List> getConnectionMetricDescriptors(); diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/MetricDescriptor.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/MetricDescriptor.java index 3986c86bfb..8fdce05cad 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/MetricDescriptor.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/MetricDescriptor.java @@ -18,7 +18,8 @@ package org.apache.nifi.controller.status.history; /** * Describes a particular metric that is derived from a Status History - * @param + * + * @param type of metric */ public interface MetricDescriptor { @@ -32,44 +33,34 @@ public interface MetricDescriptor { /** * Specifies how the values should be formatted * - * @return + * @return formatter for values */ Formatter getFormatter(); /** - * Returns a human-readable description of the field - * - * @return + * @return a human-readable description of the field */ String getDescription(); /** - * Returns a human-readable label for the field - * - * @return + * @return a human-readable label for the field */ String getLabel(); /** - * Returns the name of a field - * - * @return + * @return the name of a field */ String getField(); /** - * Returns a {@link ValueMapper} that can be used to extract a value for the + * @return a {@link ValueMapper} that can be used to extract a value for the * status history - * - * @return */ ValueMapper getValueFunction(); /** - * Returns a {@link ValueReducer} that can reduce multiple StatusSnapshots + * @return a {@link ValueReducer} that can reduce multiple StatusSnapshots * into a single Long value - * - * @return */ ValueReducer getValueReducer(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/StatusHistory.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/StatusHistory.java index b053d33d77..f1bb946837 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/StatusHistory.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/StatusHistory.java @@ -26,25 +26,19 @@ import java.util.Map; public interface StatusHistory { /** - * Returns a Date indicating when this report was generated - * - * @return + * @return a Date indicating when this report was generated */ Date getDateGenerated(); /** - * Returns a Map of component field names and their values. The order in + * @return a Map of component field names and their values. The order in * which these values are displayed is dependent on the natural ordering of - * the Map returned. - * - * @return + * the Map returned */ Map getComponentDetails(); /** - * A List of snapshots for a given component - * - * @return + * @return List of snapshots for a given component */ List getStatusSnapshots(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/StatusSnapshot.java b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/StatusSnapshot.java index d52c1cc081..551ceb2552 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/StatusSnapshot.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/controller/status/history/StatusSnapshot.java @@ -25,24 +25,18 @@ import java.util.Map; public interface StatusSnapshot { /** - * Rreturns the point in time for which the status values were obtained - * - * @return + * @return the point in time for which the status values were obtained */ Date getTimestamp(); /** - * Returns a Map of MetricDescriptor to value - * - * @return + * @return a Map of MetricDescriptor to value */ Map, Long> getStatusMetrics(); /** - * Returns a {@link ValueReducer} that is capable of merging multiple + * @return a {@link ValueReducer} that is capable of merging multiple * StatusSnapshot objects into a single one - * - * @return */ ValueReducer getValueReducer(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/expression/AttributeExpression.java b/nifi/nifi-api/src/main/java/org/apache/nifi/expression/AttributeExpression.java index b71c83dacd..ed409ea2ad 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/expression/AttributeExpression.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/expression/AttributeExpression.java @@ -22,12 +22,10 @@ import org.apache.nifi.processor.exception.ProcessException; public interface AttributeExpression { /** - * Evaluates the expression without providing any FlowFile Attributes. This + * @return Evaluates the expression without providing any FlowFile Attributes. This * will evaluate the expression based only on System Properties and JVM * Environment properties - * - * @return - * @throws ProcessException + * @throws ProcessException if unable to evaluate */ String evaluate() throws ProcessException; @@ -36,9 +34,9 @@ public interface AttributeExpression { * will evaluate the expression based only on System Properties and JVM * Environment properties but allows the values to be decorated * - * @param decorator - * @return - * @throws ProcessException + * @param decorator for attribute value + * @return evaluated value + * @throws ProcessException if failure in evaluation */ String evaluate(AttributeValueDecorator decorator) throws ProcessException; @@ -47,9 +45,9 @@ public interface AttributeExpression { * id, etc. of the given FlowFile, as well as System Properties and JVM * Environment properties * - * @param flowFile - * @return - * @throws ProcessException + * @param flowFile to evaluate + * @return evaluated value + * @throws ProcessException if failure evaluating */ String evaluate(FlowFile flowFile) throws ProcessException; @@ -58,17 +56,15 @@ public interface AttributeExpression { * id, etc. of the given FlowFile, as well as System Properties and JVM * Environment properties and allows the values to be decorated * - * @param flowFile - * @param decorator - * @return - * @throws ProcessException + * @param flowFile to evaluate + * @param decorator for evaluation + * @return evaluated value + * @throws ProcessException if failed to evaluate */ String evaluate(FlowFile flowFile, AttributeValueDecorator decorator) throws ProcessException; /** - * Returns the type that is returned by the Expression - * - * @return + * @return the type that is returned by the Expression */ ResultType getResultType(); diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/expression/AttributeValueDecorator.java b/nifi/nifi-api/src/main/java/org/apache/nifi/expression/AttributeValueDecorator.java index af071f3cee..4cea248961 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/expression/AttributeValueDecorator.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/expression/AttributeValueDecorator.java @@ -22,8 +22,8 @@ public interface AttributeValueDecorator { * Decorates the value of a FlowFile Attribute or System/JVM property in * some way * - * @param attributeValue - * @return + * @param attributeValue to decorate + * @return decorated value */ String decorate(String attributeValue); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/expression/ExpressionLanguageCompiler.java b/nifi/nifi-api/src/main/java/org/apache/nifi/expression/ExpressionLanguageCompiler.java index aced2e6a23..9383d2722e 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/expression/ExpressionLanguageCompiler.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/expression/ExpressionLanguageCompiler.java @@ -25,7 +25,7 @@ public interface ExpressionLanguageCompiler { * AttributeExpression that can be evaluated * * @param expression the Attribute Expression to be compiled - * @return + * @return expression that can be evaluated * @throws IllegalArgumentException if the given expression is not valid */ AttributeExpression compile(String expression) throws IllegalArgumentException; @@ -34,8 +34,8 @@ public interface ExpressionLanguageCompiler { * Indicates whether or not the given string is a valid Attribute * Expression. * - * @param expression - * @return + * @param expression to validate + * @return if is value or not */ boolean isValidExpression(String expression); @@ -44,7 +44,7 @@ public interface ExpressionLanguageCompiler { * if the expression is syntactically valid or a String indicating why the * expression is invalid otherwise. * - * @param expression + * @param expression to validate * @param allowSurroundingCharacters if true allows characters * to surround the Expression, otherwise the expression must be exactly * equal to a valid Expression. E.g., /${path} is valid if and @@ -60,7 +60,7 @@ public interface ExpressionLanguageCompiler { * Returns the ResultType that will be returned by the given Expression * * @param expression the Expression to evaluate - * @return + * @return result type for the given expression * @throws IllegalArgumentException if the given Expression is not a valid * Expression Language Expression; the message of this Exception will * indicate the problem if the expression is not syntactically valid. diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/flowfile/FlowFile.java b/nifi/nifi-api/src/main/java/org/apache/nifi/flowfile/FlowFile.java index bce92ee9a1..0e2c19d6ea 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/flowfile/FlowFile.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/flowfile/FlowFile.java @@ -48,24 +48,22 @@ public interface FlowFile extends Comparable { long getLineageStartDate(); /** - * Returns the time at which the FlowFile was most recently added to a + * @return the time at which the FlowFile was most recently added to a * FlowFile queue, or {@code null} if the FlowFile has never been enqueued. * This value will always be populated before it is passed to a - * {@link FlowFilePrioritizer}. - * - * @return + * {@link FlowFilePrioritizer} */ Long getLastQueueDate(); /** - * @return a set of identifiers that are unique to this FlowFile's lineage. - * If FlowFile X is derived from FlowFile Y, both FlowFiles will have the - * same value for the Lineage Claim ID. - * *

    * If a FlowFile is derived from multiple "parent" FlowFiles, all of the * parents' Lineage Identifiers will be in the set. *

    + * + * @return a set of identifiers that are unique to this FlowFile's lineage. + * If FlowFile X is derived from FlowFile Y, both FlowFiles will have the + * same value for the Lineage Claim ID. */ Set getLineageIdentifiers(); @@ -77,7 +75,7 @@ public interface FlowFile extends Comparable { /** * Obtains the attribute value for the given key * - * @param key + * @param key of the attribute * @return value if found; null otherwise */ String getAttribute(String key); diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ComponentLog.java b/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ComponentLog.java index c070e23698..b4b3c6a565 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ComponentLog.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ComponentLog.java @@ -16,36 +16,40 @@ */ package org.apache.nifi.logging; - /** *

    - * The ComponentLog provides a mechanism to ensure that all NiFi components are logging and reporting - * information in a consistent way. When messages are logged to the ComponentLog, each message has the - * following characteristics: + * The ComponentLog provides a mechanism to ensure that all NiFi components are + * logging and reporting information in a consistent way. When messages are + * logged to the ComponentLog, each message has the following characteristics: *

    - * + * *
      - *
    • - * The toString() of the component is automatically prepended to the message so that it is clear - * which component is providing the information. This is important, since a single component may have many - * different instances within the same NiFi instance. - *
    • - *
    • - * If the last value in an Object[] argument that is passed to the logger is a Throwable, then the logged message - * will include a toString() of the Throwable; in addition, if the component's logger is set to - * DEBUG level via the logback configuration, the Stacktrace will also be logged. This provides a mechanism to easily - * enable stacktraces in the logs when they are desired without filling the logs with unneeded stack traces for messages - * that end up occurring often. - *
    • - *
    • - * Any message that is logged with a Severity level that meets or exceeds the configured Bulletin Level for that component - * will also cause a Bulletin to be generated, so that the message is visible in the UI, allowing Dataflow Managers - * to understand that a problem exists and what the issue is. - *
    • + *
    • + * The toString() of the component is automatically prepended to + * the message so that it is clear which component is providing the information. + * This is important, since a single component may have many different instances + * within the same NiFi instance. + *
    • + *
    • + * If the last value in an Object[] argument that is passed to the logger is a + * Throwable, then the logged message will include a toString() of + * the Throwable; in addition, if the component's logger is set to DEBUG level + * via the logback configuration, the Stacktrace will also be logged. This + * provides a mechanism to easily enable stacktraces in the logs when they are + * desired without filling the logs with unneeded stack traces for messages that + * end up occurring often. + *
    • + *
    • + * Any message that is logged with a Severity level that meets or exceeds the + * configured Bulletin Level for that component will also cause a Bulletin to be + * generated, so that the message is visible in the UI, allowing Dataflow + * Managers to understand that a problem exists and what the issue is. + *
    • *
    - * + * */ public interface ComponentLog { + void warn(String msg, Throwable t); void warn(String msg, Object[] os); diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ProcessorLog.java b/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ProcessorLog.java index 0d66d8553b..a90ee26cc9 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ProcessorLog.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/logging/ProcessorLog.java @@ -16,14 +16,14 @@ */ package org.apache.nifi.logging; - /** - * The ProcessorLog is an extension of ComponentLog but provides no additional functionality. - * It exists because ProcessorLog was created first, - * but when Controller Services and Reporting Tasks began to be used more heavily loggers - * were needed for them as well. We did not want to return a ProcessorLog to a ControllerService - * or a ReportingTask, so all of the methods were moved to a higher interface named ComponentLog. - * However, we kept the ProcessorLog interface around in order to maintain backward compatibility. + * The ProcessorLog is an extension of ComponentLog but provides no additional + * functionality. It exists because ProcessorLog was created first, but when + * Controller Services and Reporting Tasks began to be used more heavily loggers + * were needed for them as well. We did not want to return a ProcessorLog to a + * ControllerService or a ReportingTask, so all of the methods were moved to a + * higher interface named ComponentLog. However, we kept the ProcessorLog + * interface around in order to maintain backward compatibility. */ public interface ProcessorLog extends ComponentLog { diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/AbstractSessionFactoryProcessor.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/AbstractSessionFactoryProcessor.java index f13a14304d..2695dcddfa 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/AbstractSessionFactoryProcessor.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/AbstractSessionFactoryProcessor.java @@ -41,7 +41,6 @@ import org.apache.nifi.logging.ProcessorLog; *

    * Thread safe

    * - * @author none */ public abstract class AbstractSessionFactoryProcessor extends AbstractConfigurableComponent implements Processor { @@ -62,10 +61,8 @@ public abstract class AbstractSessionFactoryProcessor extends AbstractConfigurab } /** - * 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; @@ -83,17 +80,15 @@ public abstract class AbstractSessionFactoryProcessor extends AbstractConfigurab /** * Provides subclasses the ability to perform initialization logic * - * @param context + * @param context in which to perform initialization */ protected void init(final ProcessorInitializationContext context) { // Provided for subclasses to override } /** - * Returns true if the processor is scheduled to run, + * @return true if the processor is scheduled to run, * false otherwise - * - * @return */ protected final boolean isScheduled() { return scheduled; diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/DataUnit.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/DataUnit.java index dc0a66f631..4980b97d55 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/DataUnit.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/DataUnit.java @@ -21,9 +21,6 @@ import java.util.regex.Pattern; public enum DataUnit { - // 1024 * 1024 = - // 1024 * 1024 * 1024 - // 1024 * 1024 * 1024 * 1024 /** * Bytes */ diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/FlowFileFilter.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/FlowFileFilter.java index 20147ca5d0..3bd6546a61 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/FlowFileFilter.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/FlowFileFilter.java @@ -35,8 +35,10 @@ public interface FlowFileFilter { * whether or not the Processor is interested in filtering additional * FlowFiles * - * @param flowFile - * @return + * @param flowFile to apply the filter to + * @return true if the given FlowFile should be selected and + * if Processor is interested in filtering additional + * FlowFiles */ FlowFileFilterResult filter(FlowFile flowFile); diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessContext.java index 7fa183f824..c61a31802f 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessContext.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessContext.java @@ -39,8 +39,8 @@ public interface ProcessContext { * Retrieves the current value set for the given descriptor, if a value is * set - else uses the descriptor to determine the appropriate default value * - * @param descriptor - * @return + * @param descriptor to lookup the value of + * @return the property value of the given descriptor */ PropertyValue getProperty(PropertyDescriptor descriptor); @@ -48,8 +48,8 @@ public interface ProcessContext { * Retrieves the current value set for the given descriptor, if a value is * set - else uses the descriptor to determine the appropriate default value * - * @param propertyName - * @return + * @param propertyName of the property to lookup the value for + * @return property value as retrieved by property name */ PropertyValue getProperty(String propertyName); @@ -57,8 +57,9 @@ public interface ProcessContext { * Creates and returns a {@link PropertyValue} object that can be used for * evaluating the value of the given String * - * @param rawValue - * @return + * @param rawValue the raw input before any property evaluation has occurred + * @return a {@link PropertyValue} object that can be used for + * evaluating the value of the given String */ PropertyValue newPropertyValue(String rawValue); @@ -89,11 +90,9 @@ public interface ProcessContext { String getAnnotationData(); /** - * Returns a Map of all PropertyDescriptors to their configured values. This + * @return a Map of all PropertyDescriptors to their configured values. This * Map may or may not be modifiable, but modifying its values will not * change the values of the processor's properties - * - * @return */ Map getProperties(); @@ -101,8 +100,8 @@ public interface ProcessContext { * Encrypts the given value using the password provided in the NiFi * Properties * - * @param unencrypted - * @return + * @param unencrypted plaintext value + * @return encrypted value */ String encrypt(String unencrypted); @@ -110,19 +109,17 @@ public interface ProcessContext { * Decrypts the given value using the password provided in the NiFi * Properties * - * @param encrypted - * @return + * @param encrypted the encrypted value + * @return the plaintext value */ String decrypt(String encrypted); /** - * Provides a {@code ControllerServiceLookup} that can be used to obtain a + * @return a {@code ControllerServiceLookup} that can be used to obtain a * Controller Service - * - * @return */ ControllerServiceLookup getControllerServiceLookup(); - + /** * @return the set of all relationships for which space is available to * receive new objects diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java index 7b855f2833..ed46d68071 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java @@ -60,7 +60,6 @@ import org.apache.nifi.provenance.ProvenanceReporter; * A process session instance may be used continuously. That is, after each * commit or rollback, the session can be used again.

    * - * @author unattributed */ public interface ProcessSession { @@ -136,7 +135,8 @@ public interface ProcessSession { * single call. * * @param maxResults the maximum number of FlowFiles to return - * @return + * @return up to maxResults FlowFiles from the work queue. If + * no FlowFiles are available, returns an empty list. Will not return null. * @throws IllegalArgumentException if maxResults is less than * 0 */ @@ -152,8 +152,9 @@ public interface ProcessSession { * returned. *

    * - * @param filter - * @return + * @param filter to limit which flow files are returned + * @return all FlowFiles from all of the incoming queues for which the given + * {@link FlowFileFilter} indicates should be accepted. */ List get(FlowFileFilter filter); @@ -170,7 +171,7 @@ public interface ProcessSession { * linkage to a parent FlowFile. This method is appropriate only when data * is received or created from an external system. Otherwise, this method * should be avoided and should instead use {@link #create(FlowFile)} or - * {@link #create(Collection)}. + * {@see #create(Collection)}. * * When this method is used, a Provenance CREATE or RECEIVE Event should be * generated. See the {@link #getProvenanceReporter()} method and @@ -188,8 +189,8 @@ public interface ProcessSession { * event, depending on whether or not other FlowFiles are generated from the * same parent before the ProcessSession is committed. * - * @param parent - * @return + * @param parent to base the new flowfile on + * @return newly created flowfile */ FlowFile create(FlowFile parent); @@ -201,8 +202,8 @@ public interface ProcessSession { * only a single parent exists). This method will automatically generate a * Provenance JOIN event. * - * @param parents - * @return + * @param parents which the new flowfile should inherit shared attributes from + * @return new flowfile */ FlowFile create(Collection parents); @@ -239,9 +240,9 @@ public interface ProcessSession { * Event, if the offset is 0 and the size is exactly equal to the size of * the example FlowFile). * - * @param example - * @param offset - * @param size + * @param parent to base the new flowfile attributes on + * @param offset of the parent flowfile to base the child flowfile content on + * @param size of the new flowfile from the offset * @return a FlowFile with the specified size whose parent is first argument * to this function * @@ -250,14 +251,14 @@ public interface ProcessSession { * the given FlowFile * @throws FlowFileHandlingException if the given FlowFile is already * transferred or removed or doesn't belong to this session, or if the - * specified offset + size exceeds that of the size of the example FlowFile. + * specified offset + size exceeds that of the size of the parent FlowFile. * Automatic rollback will occur. * @throws MissingFlowFileException if the given FlowFile content cannot be * found. The FlowFile should no longer be reference, will be internally * destroyed, and the session is automatically rolled back and what is left * of the FlowFile is destroyed. */ - FlowFile clone(FlowFile example, long offset, long size); + FlowFile clone(FlowFile parent, long offset, long size); /** * Sets a penalty for the given FlowFile which will make it unavailable to @@ -368,8 +369,8 @@ public interface ProcessSession { * destination processor will have immediate visibility of the transferred * FlowFiles within the session. * - * @param flowFile - * @param relationship + * @param flowFile to transfer + * @param relationship to transfer to * @throws IllegalStateException if detected that this method is being * called from within a callback of another method in this session and for * the given FlowFile(s) @@ -389,7 +390,7 @@ public interface ProcessSession { * the FlowFile will be maintained. FlowFiles that are created by the * processor cannot be transferred back to themselves via this method. * - * @param flowFile + * @param flowFile to transfer * @throws IllegalStateException if detected that this method is being * called from within a callback of another method in this session and for * the given FlowFile(s) @@ -410,7 +411,7 @@ public interface ProcessSession { * created by the processor cannot be transferred back to themselves via * this method. * - * @param flowFiles + * @param flowFiles to transfer * @throws IllegalStateException if detected that this method is being * called from within a callback of another method in this session and for * the given FlowFile(s) @@ -435,8 +436,8 @@ public interface ProcessSession { * destination processor will have immediate visibility of the transferred * FlowFiles within the session. * - * @param flowFiles - * @param relationship + * @param flowFiles to transfer + * @param relationship to transfer to * @throws IllegalStateException if detected that this method is being * called from within a callback of another method in this session and for * the given FlowFile(s) @@ -455,7 +456,7 @@ public interface ProcessSession { * nothing else references it and this FlowFile will no longer be available * for further operation. * - * @param flowFile + * @param flowFile to remove * @throws IllegalStateException if detected that this method is being * called from within a callback of another method in this session and for * the given FlowFile(s) @@ -471,7 +472,7 @@ public interface ProcessSession { * nothing else references it and this FlowFile will no longer be available * for further operation. * - * @param flowFiles + * @param flowFiles to remove * @throws IllegalStateException if detected that this method is being * called from within a callback of another method in this session and for * the given FlowFile(s) @@ -484,12 +485,12 @@ public interface ProcessSession { /** * Executes the given callback against the contents corresponding to the * given FlowFile. - * - * Note: The OutputStream provided to the given OutputStreamCallback + * + * Note: The OutputStream provided to the given OutputStreamCallback * will not be accessible once this method has completed its execution. * - * @param source - * @param reader + * @param source flowfile to retrieve content of + * @param reader that will be called to read the flowfile content * @throws IllegalStateException if detected that this method is being * called from within a callback of another method in this session and for * the given FlowFile(s) @@ -501,7 +502,7 @@ public interface ProcessSession { * destroyed, and the session is automatically rolled back and what is left * of the FlowFile is destroyed. * @throws FlowFileAccessException if some IO problem occurs accessing - * FlowFile content; if an attempt is made to access the InputStream + * FlowFile content; if an attempt is made to access the InputStream * provided to the given InputStreamCallback after this method completed its * execution */ @@ -511,8 +512,8 @@ public interface ProcessSession { * Combines the content of all given source FlowFiles into a single given * destination FlowFile. * - * @param sources - * @param destination + * @param sources the flowfiles to merge + * @param destination the flowfile to use as the merged result * @return updated destination FlowFile (new size, etc...) * @throws IllegalStateException if detected that this method is being * called from within a callback of another method in this session and for @@ -536,8 +537,8 @@ public interface ProcessSession { * Combines the content of all given source FlowFiles into a single given * destination FlowFile. * - * @param sources - * @param destination + * @param sources to merge together + * @param destination to merge to * @param header bytes that will be added to the beginning of the merged * output. May be null or empty. * @param footer bytes that will be added to the end of the merged output. @@ -566,12 +567,12 @@ public interface ProcessSession { /** * Executes the given callback against the content corresponding to the * given FlowFile. - * - * Note: The OutputStream provided to the given OutputStreamCallback - * will not be accessible once this method has completed its execution. * - * @param source - * @param writer + * Note: The OutputStream provided to the given OutputStreamCallback + * will not be accessible once this method has completed its execution. + * + * @param source to write to + * @param writer used to write new content * @return updated FlowFile * @throws IllegalStateException if detected that this method is being * called from within a callback of another method in this session and for @@ -584,8 +585,8 @@ public interface ProcessSession { * destroyed, and the session is automatically rolled back and what is left * of the FlowFile is destroyed. * @throws FlowFileAccessException if some IO problem occurs accessing - * FlowFile content; if an attempt is made to access the OutputStream - * provided to the given OutputStreamCallaback after this method completed + * FlowFile content; if an attempt is made to access the OutputStream + * provided to the given OutputStreamCallaback after this method completed * its execution */ FlowFile write(FlowFile source, OutputStreamCallback writer) throws FlowFileAccessException; @@ -593,13 +594,13 @@ public interface ProcessSession { /** * Executes the given callback against the content corresponding to the * given flow file. - * - * Note: The InputStream & OutputStream provided to the given - * StreamCallback will not be accessible once this method has completed its - * execution. * - * @param source - * @param writer + * Note: The InputStream & OutputStream provided to the given + * StreamCallback will not be accessible once this method has completed its + * execution. + * + * @param source to read from and write to + * @param writer used to read the old content and write new content * @return updated FlowFile * @throws IllegalStateException if detected that this method is being * called from within a callback of another method in this session and for @@ -612,8 +613,8 @@ public interface ProcessSession { * destroyed, and the session is automatically rolled back and what is left * of the FlowFile is destroyed. * @throws FlowFileAccessException if some IO problem occurs accessing - * FlowFile content; if an attempt is made to access the InputStream or - * OutputStream provided to the given StreamCallback after this method + * FlowFile content; if an attempt is made to access the InputStream or + * OutputStream provided to the given StreamCallback after this method * completed its execution */ FlowFile write(FlowFile source, StreamCallback writer) throws FlowFileAccessException; @@ -622,16 +623,16 @@ public interface ProcessSession { * Executes the given callback against the content corresponding to the * given FlowFile, such that any data written to the OutputStream of the * content will be appended to the end of FlowFile. - * - * Note: The OutputStream provided to the given OutputStreamCallback + * + * Note: The OutputStream provided to the given OutputStreamCallback * will not be accessible once this method has completed its execution. * - * @param source - * @param writer - * @return - * @throws FlowFileAccessException if an attempt is made to access the - * OutputStream provided to the given OutputStreamCallaback after this method - * completed its execution + * @param source the flowfile for which content should be appended + * @param writer used to write new bytes to the flowfile content + * @return the updated flowfile reference for the new content + * @throws FlowFileAccessException if an attempt is made to access the + * OutputStream provided to the given OutputStreamCallaback after this + * method completed its execution */ FlowFile append(FlowFile source, OutputStreamCallback writer) throws FlowFileAccessException; @@ -687,8 +688,8 @@ public interface ProcessSession { /** * Writes the content of the given FlowFile to the given destination path. * - * @param flowFile - * @param destination + * @param flowFile to export the content of + * @param destination to export the content to * @param append if true will append to the current content at the given * path; if false will replace any current content * @throws IllegalStateException if detected that this method is being @@ -709,8 +710,8 @@ public interface ProcessSession { /** * Writes the content of the given FlowFile to the given destination stream * - * @param flowFile - * @param destination + * @param flowFile to export the content of + * @param destination to export the content to * @throws IllegalStateException if detected that this method is being * called from within a callback of another method in this session and for * the given FlowFile(s) @@ -729,7 +730,7 @@ public interface ProcessSession { /** * Returns a ProvenanceReporter that is tied to this ProcessSession. * - * @return + * @return the provenance reporter */ ProvenanceReporter getProvenanceReporter(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/Processor.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/Processor.java index eff5b5958c..fcb04ea510 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/Processor.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/Processor.java @@ -54,7 +54,7 @@ public interface Processor extends ConfigurableComponent { * Provides the processor with access to objects that may be of use * throughout the life of the Processor * - * @param context + * @param context of initialization */ void initialize(ProcessorInitializationContext context); diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessorInitializationContext.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessorInitializationContext.java index 6e3679c440..7b09e1bafd 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessorInitializationContext.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessorInitializationContext.java @@ -29,25 +29,19 @@ import org.apache.nifi.logging.ProcessorLog; public interface ProcessorInitializationContext { /** - * Returns the unique identifier for this processor - * - * @return + * @return the unique identifier for this processor */ String getIdentifier(); /** - * Returns a {@link ProcessorLog} that is tied to this processor that can be + * @return a {@link ProcessorLog} that is tied to this processor that can be * used to log events - * - * @return */ ProcessorLog getLogger(); /** - * 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(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/CapabilityDescription.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/CapabilityDescription.java index fad1ebb90d..8ca8290010 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/CapabilityDescription.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/CapabilityDescription.java @@ -28,7 +28,8 @@ import java.lang.annotation.Target; * provided. This description can be provided to a user in logs, UI, etc. * * @author none - * @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.documentation.CapabilityDescription} + * @deprecated This Annotation has been replaced by the + * {@link org.apache.nifi.annotation.documentation.CapabilityDescription} * annotation. */ @Documented diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/EventDriven.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/EventDriven.java index 615216828f..53f1d72a3e 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/EventDriven.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/EventDriven.java @@ -39,8 +39,8 @@ import java.lang.annotation.Target; *

    * * @author none - * @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.behavior.EventDriven} - * annotation. + * @deprecated This Annotation has been replaced by the + * {@link org.apache.nifi.annotation.behavior.EventDriven} annotation. */ @Documented @Target({ElementType.TYPE}) diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnAdded.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnAdded.java index b2ea5eb43d..1c2b709099 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnAdded.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnAdded.java @@ -32,7 +32,8 @@ import java.lang.annotation.Target; * be added to the graph. * * @author none - * @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.lifecycle.OnAdded} annotation. + * @deprecated This Annotation has been replaced by the + * {@link org.apache.nifi.annotation.lifecycle.OnAdded} annotation. */ @Documented @Target({ElementType.METHOD}) diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnRemoved.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnRemoved.java index fae4e34610..239a449970 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnRemoved.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnRemoved.java @@ -33,7 +33,8 @@ import java.lang.annotation.Target; * be removed from the graph. * * @author none - * @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.lifecycle.OnRemoved} annotation. + * @deprecated This Annotation has been replaced by the + * {@link org.apache.nifi.annotation.lifecycle.OnRemoved} annotation. */ @Documented @Target({ElementType.METHOD}) diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnScheduled.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnScheduled.java index ed65ce0459..3a716e630c 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnScheduled.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnScheduled.java @@ -35,8 +35,9 @@ import java.lang.annotation.Target; * be scheduled to run. * * @author none - * @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.lifecycle.OnScheduled} annotation. -*/ + * @deprecated This Annotation has been replaced by the + * {@link org.apache.nifi.annotation.lifecycle.OnScheduled} annotation. + */ @Documented @Target({ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnShutdown.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnShutdown.java index bb38221c28..22ecc0b0ff 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnShutdown.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnShutdown.java @@ -29,7 +29,8 @@ import java.lang.annotation.Target; * most once for each processor instance in a process lifetime. * * @author none - * @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.lifecycle.OnShutdown} annotation. + * @deprecated This Annotation has been replaced by the + * {@link org.apache.nifi.annotation.lifecycle.OnShutdown} annotation. */ @Documented @Target({ElementType.METHOD}) diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnStopped.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnStopped.java index 3f61850a54..223868ec3b 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnStopped.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnStopped.java @@ -46,7 +46,8 @@ import java.lang.annotation.Target; *

    * * @author none - * @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.lifecycle.OnStopped} annotation. + * @deprecated This Annotation has been replaced by the + * {@link org.apache.nifi.annotation.lifecycle.OnStopped} annotation. */ @Documented @Target({ElementType.METHOD}) diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnUnscheduled.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnUnscheduled.java index a9b94fc17d..a2314355b0 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnUnscheduled.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/OnUnscheduled.java @@ -37,7 +37,8 @@ import java.lang.annotation.Target; * be scheduled to run. * * @author none - * @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.lifecycle.OnUnscheduled} annotation. + * @deprecated This Annotation has been replaced by the + * {@link org.apache.nifi.annotation.lifecycle.OnUnscheduled} annotation. */ @Documented @Target({ElementType.METHOD}) diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/SideEffectFree.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/SideEffectFree.java index 281b38d902..99980c563e 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/SideEffectFree.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/SideEffectFree.java @@ -36,7 +36,8 @@ import java.lang.annotation.Target; * repeated (implied idempotent behavior). * * @author none - * @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.behavior.SideEffectFree} annotation. + * @deprecated This Annotation has been replaced by the + * {@link org.apache.nifi.annotation.behavior.SideEffectFree} annotation. */ @Documented @Target({ElementType.TYPE}) diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/SupportsBatching.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/SupportsBatching.java index 2b89e4e9ef..7335a55e2d 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/SupportsBatching.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/SupportsBatching.java @@ -41,7 +41,8 @@ import java.lang.annotation.Target; * from a remote source. * * @author none - * @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.behavior.SupportsBatching} annotation. + * @deprecated This Annotation has been replaced by the + * {@link org.apache.nifi.annotation.behavior.SupportsBatching} annotation. */ @Documented @Target({ElementType.TYPE}) diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/Tags.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/Tags.java index c06302d52e..81428d7531 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/Tags.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/Tags.java @@ -29,9 +29,8 @@ import java.lang.annotation.Target; * any way but serve as additional documentation and can be used to sort/filter * Processors. * - * @author none - * @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.documentation.Tags} - * annotation. + * @deprecated This Annotation has been replaced by the + * {@link org.apache.nifi.annotation.documentation.Tags} annotation. */ @Documented @Target({ElementType.TYPE}) @@ -40,8 +39,5 @@ import java.lang.annotation.Target; @Deprecated public @interface Tags { - /** - * @return all tag values associated with the given processor - */ public String[] value(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/TriggerSerially.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/TriggerSerially.java index 0b3d1e6d05..52c1079681 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/TriggerSerially.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/TriggerSerially.java @@ -30,8 +30,9 @@ import java.lang.annotation.Target; * execution. * * @author none - * @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.behavior.TriggerSerially} annotation. -*/ + * @deprecated This Annotation has been replaced by the + * {@link org.apache.nifi.annotation.behavior.TriggerSerially} annotation. + */ @Documented @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/TriggerWhenAnyDestinationAvailable.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/TriggerWhenAnyDestinationAvailable.java index 52f6c5e132..8e8e5df1ce 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/TriggerWhenAnyDestinationAvailable.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/TriggerWhenAnyDestinationAvailable.java @@ -30,7 +30,9 @@ import java.lang.annotation.Target; * destinations report that they have available space. * * @author none - * @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.behavior.TriggerWhenAnyDestinationAvailable} annotation. + * @deprecated This Annotation has been replaced by the + * {@link org.apache.nifi.annotation.behavior.TriggerWhenAnyDestinationAvailable} + * annotation. */ @Documented @Target({ElementType.TYPE}) diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/TriggerWhenEmpty.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/TriggerWhenEmpty.java index 1d2f755f48..f27b111714 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/TriggerWhenEmpty.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/annotation/TriggerWhenEmpty.java @@ -32,7 +32,8 @@ import java.lang.annotation.Target; * their queue or they present this annotation. * * @author none - * @deprecated This Annotation has been replaced by the {@link org.apache.nifi.annotation.behavior.TriggerWhenEmpty} annotation. + * @deprecated This Annotation has been replaced by the + * {@link org.apache.nifi.annotation.behavior.TriggerWhenEmpty} annotation. */ @Documented @Target({ElementType.TYPE}) diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/io/InputStreamCallback.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/io/InputStreamCallback.java index e227156d65..e850684832 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/io/InputStreamCallback.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/io/InputStreamCallback.java @@ -30,8 +30,8 @@ public interface InputStreamCallback { * automatically opened and closed though it is ok to close the stream * manually. * - * @param in - * @throws IOException + * @param in the stream to read bytes from + * @throws IOException if issues reading from the underlying stream */ void process(InputStream in) throws IOException; diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/io/OutputStreamCallback.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/io/OutputStreamCallback.java index a991a1c7ab..e37c37688b 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/io/OutputStreamCallback.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/io/OutputStreamCallback.java @@ -31,8 +31,8 @@ public interface OutputStreamCallback { * manually - and quite important if any streams wrapping these streams open * resources which should be cleared. * - * @param out - * @throws IOException + * @param out the stream to write bytes to + * @throws IOException if issues writing to output stream */ void process(OutputStream out) throws IOException; diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/io/StreamCallback.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/io/StreamCallback.java index 2d47c8903f..54f0e3bbca 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/io/StreamCallback.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/io/StreamCallback.java @@ -20,10 +20,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -/** - * - * @author unattributed - */ public interface StreamCallback { /** @@ -32,9 +28,9 @@ public interface StreamCallback { * manually - and quite important if any streams wrapping these streams open * resources which should be cleared. * - * @param in - * @param out - * @throws IOException + * @param in the stream to read bytes from + * @param out the stream to write bytes to + * @throws IOException if issues occur reading or writing the underlying streams */ void process(InputStream in, OutputStream out) throws IOException; diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/ProvenanceEventBuilder.java b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/ProvenanceEventBuilder.java index 4978eba533..0ffccd56d4 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/ProvenanceEventBuilder.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/ProvenanceEventBuilder.java @@ -28,8 +28,8 @@ public interface ProvenanceEventBuilder { /** * Sets the type of {@link ProvenanceEventRecord} * - * @param eventType - * @return + * @param eventType of the event + * @return the builder */ ProvenanceEventBuilder setEventType(ProvenanceEventType eventType); @@ -38,15 +38,15 @@ public interface ProvenanceEventBuilder { * given event * * @param event the event from which to populate the Builders values - * @return + * @return the builder */ ProvenanceEventBuilder fromEvent(ProvenanceEventRecord event); /** * Sets the date and time at which the FlowFile entered the flow * - * @param entryDate - * @return + * @param entryDate of the flow file + * @return the builder */ ProvenanceEventBuilder setFlowFileEntryDate(long entryDate); @@ -54,8 +54,8 @@ public interface ProvenanceEventBuilder { * Sets the Lineage Identifiers. This is a set of all FlowFile UUID's that * were involved in making this event occur. * - * @param lineageIdentifiers - * @return + * @param lineageIdentifiers of the flowfiles in this event + * @return the builder */ ProvenanceEventBuilder setLineageIdentifiers(Set lineageIdentifiers); @@ -63,12 +63,12 @@ public interface ProvenanceEventBuilder { * Sets the Content Claim that the FlowFile was previously associated with * before this event occurred. * - * @param container - * @param section - * @param identifier - * @param offset - * @param size - * @return + * @param container for previous content + * @param section for previous content + * @param identifier for previous content + * @param offset for previous content + * @param size for previous content + * @return the builder */ ProvenanceEventBuilder setPreviousContentClaim(String container, String section, String identifier, Long offset, long size); @@ -76,12 +76,12 @@ public interface ProvenanceEventBuilder { * Sets the Content Claim that the FlowFile is associated with as a result * of this event * - * @param container - * @param section - * @param identifier - * @param offset - * @param size - * @return + * @param container for resulting content + * @param section for resulting content + * @param identifier for resulting content + * @param offset for resulting content + * @param size for resulting content + * @return the builder */ ProvenanceEventBuilder setCurrentContentClaim(String container, String section, String identifier, Long offset, long size); @@ -89,8 +89,8 @@ public interface ProvenanceEventBuilder { * Sets the identifier of the FlowFile Queue from which the FlowFile was * pulled * - * @param identifier - * @return + * @param identifier of the source queue + * @return the builder */ ProvenanceEventBuilder setSourceQueueIdentifier(String identifier); @@ -99,28 +99,28 @@ public interface ProvenanceEventBuilder { * occurred and any attributes that were added or updated as a result of * this event. * - * @param previousAttributes + * @param previousAttributes Map of all attributes before the event occurred * @param updatedAttributes Map containing all attributes that were added or * updated. If any entry has a value of null, that attribute is * considered removed * - * @return + * @return the builder */ ProvenanceEventBuilder setAttributes(Map previousAttributes, Map updatedAttributes); /** * Sets the UUID to associate with the FlowFile * - * @param uuid - * @return + * @param uuid of the flowfile + * @return the builder */ ProvenanceEventBuilder setFlowFileUUID(String uuid); /** * Sets the time at which the Provenance Event took place * - * @param eventTime - * @return + * @param eventTime time of the event + * @return the builder */ ProvenanceEventBuilder setEventTime(long eventTime); @@ -128,16 +128,16 @@ public interface ProvenanceEventBuilder { * Sets the amount of time that was required in order to perform the * function referred to by this event * - * @param millis - * @return + * @param millis of the event + * @return the builder */ ProvenanceEventBuilder setEventDuration(long millis); /** * Sets the time at which the FlowFile's lineage began * - * @param startDate - * @return + * @param startDate start date of the event + * @return the builder */ ProvenanceEventBuilder setLineageStartDate(long startDate); @@ -145,8 +145,8 @@ public interface ProvenanceEventBuilder { * Sets the unique identifier of the NiFi Component (such as a * {@link Processor}) that is generating the Event * - * @param componentId - * @return + * @param componentId that produced the event + * @return the builder */ ProvenanceEventBuilder setComponentId(String componentId); @@ -154,8 +154,8 @@ public interface ProvenanceEventBuilder { * Sets the type of the Component that is generating the Event. For * {@link Processor}s, this is the Simple Class Name of the Processor. * - * @param componentType - * @return + * @param componentType of the component that made the event + * @return the builder */ ProvenanceEventBuilder setComponentType(String componentType); @@ -167,8 +167,8 @@ public interface ProvenanceEventBuilder { * and {@link ProvenanceEventType#SEND} and will be ignored for any other * event types. * - * @param sourceSystemFlowFileIdentifier - * @return + * @param sourceSystemFlowFileIdentifier identifier the remote system used + * @return the builder */ ProvenanceEventBuilder setSourceSystemFlowFileIdentifier(String sourceSystemFlowFileIdentifier); @@ -184,8 +184,8 @@ public interface ProvenanceEventBuilder { * and {@link ProvenanceEventType#SEND} and will be ignored for any other * event types. * - * @param transitUri - * @return + * @param transitUri of the event + * @return the builder */ ProvenanceEventBuilder setTransitUri(String transitUri); @@ -194,13 +194,13 @@ public interface ProvenanceEventBuilder { * {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and * {@link ProvenanceEventType#CLONE} * - * This is valid only for null null null null null {@link ProvenanceEventType#SPAWN}, + * This is valid only for {@link ProvenanceEventType#SPAWN}, * {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and * {@link ProvenanceEventType#CLONE} events and will be ignored for any * other event types. * - * @param parent - * @return + * @param parent flowfile that this event is derived from + * @return the builder */ ProvenanceEventBuilder addParentFlowFile(FlowFile parent); @@ -209,13 +209,13 @@ public interface ProvenanceEventBuilder { * {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and * {@link ProvenanceEventType#CLONE} * - * This is valid only for null null null null null {@link ProvenanceEventType#SPAWN}, + * This is valid only for {@link ProvenanceEventType#SPAWN}, * {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and * {@link ProvenanceEventType#CLONE} events and will be ignored for any * other event types. * - * @param parent - * @return + * @param parent previous parent of this event + * @return the builder */ ProvenanceEventBuilder removeParentFlowFile(FlowFile parent); @@ -224,13 +224,13 @@ public interface ProvenanceEventBuilder { * {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and * {@link ProvenanceEventType#CLONE} * - * This is valid only for null null null null null {@link ProvenanceEventType#SPAWN}, + * This is valid only for {@link ProvenanceEventType#SPAWN}, * {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and * {@link ProvenanceEventType#CLONE} events and will be ignored for any * other event types. * - * @param child - * @return + * @param child the child to add + * @return the builder */ ProvenanceEventBuilder addChildFlowFile(FlowFile child); @@ -239,13 +239,13 @@ public interface ProvenanceEventBuilder { * {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and * {@link ProvenanceEventType#CLONE} * - * This is valid only for null null null null null {@link ProvenanceEventType#SPAWN}, + * This is valid only for {@link ProvenanceEventType#SPAWN}, * {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, and * {@link ProvenanceEventType#CLONE} events and will be ignored for any * other event types. * - * @param child - * @return + * @param child to remove + * @return the builder */ ProvenanceEventBuilder removeChildFlowFile(FlowFile child); @@ -259,8 +259,8 @@ public interface ProvenanceEventBuilder { * This is valid only for {@link ProvenanceEventType#ADDINFO} events and * will be ignored for any other event types. * - * @param alternateIdentifierUri - * @return + * @param alternateIdentifierUri another identifier of the flowfile this event is for + * @return the builder */ ProvenanceEventBuilder setAlternateIdentifierUri(String alternateIdentifierUri); @@ -268,8 +268,8 @@ public interface ProvenanceEventBuilder { * Sets the details for this event. This is a free-form String that can * contain any information that is relevant to this event. * - * @param details - * @return + * @param details a description of the event + * @return the builder */ ProvenanceEventBuilder setDetails(String details); @@ -279,8 +279,8 @@ public interface ProvenanceEventBuilder { * {@link ProvenanceEventType#ROUTE} events and will be ignored for any * other event types. * - * @param relationship - * @return + * @param relationship to which flowfiles in this event were routed + * @return the builder */ ProvenanceEventBuilder setRelationship(Relationship relationship); @@ -288,8 +288,8 @@ public interface ProvenanceEventBuilder { * Populates the builder with as much information as it can from the given * FlowFile * - * @param flowFile - * @return + * @param flowFile to source attributes for this event from + * @return the builder */ ProvenanceEventBuilder fromFlowFile(FlowFile flowFile); @@ -301,7 +301,7 @@ public interface ProvenanceEventBuilder { * depend on the {@link ProvevenanceEventRepository} to generate the unique * identifier. * - * @return + * @return the event */ ProvenanceEventRecord build(); diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/ProvenanceEventRecord.java b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/ProvenanceEventRecord.java index 4b1b1a00c1..dc251b3f17 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/ProvenanceEventRecord.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/ProvenanceEventRecord.java @@ -26,26 +26,20 @@ import java.util.Set; public interface ProvenanceEventRecord { /** - * Returns a unique ID for this Provenance Event. Depending on the + * @return a unique ID for this Provenance Event. Depending on the * implementation, the Event ID may be set to -1 until the event has been * added to the {@link ProvenanceEventRepository} - * - * @return */ long getEventId(); /** - * Returns the time at which this Provenance Event was created, as the + * @return the time at which this Provenance Event was created, as the * number of milliseconds since epoch - * - * @return */ long getEventTime(); /** - * Returns the EntryDate of the FlowFile to which this Event is associated - * - * @return + * @return the EntryDate of the FlowFile to which this Event is associated */ long getFlowFileEntryDate(); @@ -61,236 +55,181 @@ public interface ProvenanceEventRecord { Set getLineageIdentifiers(); /** - * Returns the size of the FlowFile to which this Event is associated - * - * @return + * @return the size of the FlowFile to which this Event is associated */ long getFileSize(); /** - * Returns the previous size of the FlowFile to which this Event is + * @return the previous size of the FlowFile to which this Event is * associated, if the FlowFile previously had content and its size was * known; otherwise, returns null - * - * @return */ Long getPreviousFileSize(); /** - * Returns the amount of time in milliseconds that elapsed while performing - * this event. If not populated, the value -1 will be returned. - * - * @return + * @return the amount of time in milliseconds that elapsed while performing + * this event. If not populated, the value -1 will be returned */ long getEventDuration(); /** - * Returns the type of this Provenance Event - * - * @return + * @return the type of this Provenance Event */ ProvenanceEventType getEventType(); /** - * Returns all FlowFile attributes that were associated with the FlowFile at + * @return all FlowFile attributes that were associated with the FlowFile at * the time that this ProvenanceEvent was created - * - * @return */ Map getAttributes(); /** - * Returns all FlowFile attributes that existed on the FlowFile before this + * @return all FlowFile attributes that existed on the FlowFile before this * event occurred - * - * @return */ Map getPreviousAttributes(); /** - * Returns all FlowFile attributes that were updated as a result of this + * @return all FlowFile attributes that were updated as a result of this * event - * - * @return */ Map getUpdatedAttributes(); /** - * Returns the ID of the Processor/component that created this Provenance + * @return the ID of the Processor/component that created this Provenance * Event - * - * @return */ String getComponentId(); /** - * Returns the fully-qualified Class Name of the Processor/component that + * @return the fully-qualified Class Name of the Processor/component that * created this Provenance Event - * - * @return */ String getComponentType(); /** - * Returns a URI that provides information about the System and Protocol + * @return a URI that provides information about the System and Protocol * information over which the transfer occurred. The intent of this field is * such that both the sender and the receiver can publish the events to an * external Enterprise-wide system that is then able to correlate the SEND * and RECEIVE events. - * - * @return */ String getTransitUri(); /** - * Returns the UUID that the Source System used to refer to this data; this - * is applicable only when the {@link ProvenanceEventType} is of type - * {@link ProvenanceEventType#RECEIVE RECEIVE}. - * * Since the receiving system will usually refer to the data using a * different identifier than the source system, this information is used to * correlate the receive system's FlowFile with the sending system's data * - * @return + * @return the UUID that the Source System used to refer to this data; this + * is applicable only when the {@link ProvenanceEventType} is of type + * {@link ProvenanceEventType#RECEIVE RECEIVE} */ String getSourceSystemFlowFileIdentifier(); /** - * Returns the UUID of the FlowFile with which this Event is associated - * - * @return + * @return the UUID of the FlowFile with which this Event is associated */ String getFlowFileUuid(); /** - * Returns the UUID's of all Parent FlowFiles. This is applicable only when + * @return the UUID's of all Parent FlowFiles. This is applicable only when * the {@link ProvenanceEventType} is of type - * {@link ProvenanceEventType#SPAWN SPAWN}. - * - * @return + * {@link ProvenanceEventType#SPAWN SPAWN} */ List getParentUuids(); /** - * Returns the UUID's of all Child FlowFiles. This is applicable only when + * @return the UUID's of all Child FlowFiles. This is applicable only when * the {@link ProvenanceEventType} is of type - * {@link ProvenanceEventType#SPAWN SPAWN}. - * - * @return + * {@link ProvenanceEventType#SPAWN SPAWN} */ List getChildUuids(); /** - * Returns the Alternate Identifier associated with the FlowFile with which + * @return the Alternate Identifier associated with the FlowFile with which * this Event is associated. This is applicable only when the * {@link ProvenanceEventType} is of type - * {@link ProvenanceEventType#ADDINFO}. - * - * @return + * {@link ProvenanceEventType#ADDINFO} */ String getAlternateIdentifierUri(); /** - * Returns the details for this record, if any were supplied. Otherwise, + * @return the details for this record, if any were supplied. Otherwise, * returns null - * - * @return - * */ String getDetails(); /** - * Returns the relationship to which this record was routed if the event + * @return the relationship to which this record was routed if the event * type is {@link ProvenanceEventType#ROUTE}. The relationship is applicable - * only to this type. - * - * @return - * + * only to this type */ String getRelationship(); /** - * Returns the identifier of the queue from which the FlowFile was taken, if + * @return the identifier of the queue from which the FlowFile was taken, if * any. If the FlowFile is created as a result of this event (in this case, - * the Event Type is one of null null null null null {@link ProvenanceEventType#CREATE}, {@link ProvenanceEventType#RECEIVE}, + * the Event Type is one of null null null null null null null null {@link ProvenanceEventType#CREATE}, {@link ProvenanceEventType#RECEIVE}, * {@link ProvenanceEventType#FORK}, {@link ProvenanceEventType#JOIN}, or * {@link ProvenanceEventType#CLONE}), or if the queue identifier is - * unknown, then this method will return null. - * - * @return + * unknown, then this method will return null * */ String getSourceQueueIdentifier(); /** - * Returns the Section for the Content Claim that this Event refers to, if + * @return the Section for the Content Claim that this Event refers to, if * any; otherwise, returns null * - * @return - * */ String getContentClaimSection(); /** - * Returns the Section for the Content Claim that the FlowFile previously + * @return the Section for the Content Claim that the FlowFile previously * referenced, if any; otherwise, returns null * - * @return - * */ String getPreviousContentClaimSection(); /** - * Returns the Container for the Content Claim that this Event refers to, if + * @return the Container for the Content Claim that this Event refers to, if * any; otherwise, returns null * - * @return - * */ String getContentClaimContainer(); /** - * Returns the Container for the Content Claim that the FlowFile previously + * @return the Container for the Content Claim that the FlowFile previously * referenced, if any; otherwise, returns null - * - * @return - * */ String getPreviousContentClaimContainer(); /** - * Returns the Identifier for the Content Claim that this Event refers to, + * @return the Identifier for the Content Claim that this Event refers to, * if any; otherwise, returns null * - * @return - * */ String getContentClaimIdentifier(); /** - * Returns the Identifier for the Content Claim that the FlowFile previously + * @return the Identifier for the Content Claim that the FlowFile previously * referenced, if any; otherwise, returns null * - * @return - * */ String getPreviousContentClaimIdentifier(); /** - * Returns the offset into the Content Claim at which the FlowFile's content + * @return the offset into the Content Claim at which the FlowFile's content * begins, if any; otherwise, returns null * - * @return - * */ Long getContentClaimOffset(); /** - * Returns the offset into the Content Claim at which the FlowFile's + * @return the offset into the Content Claim at which the FlowFile's * previous content began, if any; otherwise, returns null * - * @return - * */ Long getPreviousContentClaimOffset(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/ProvenanceEventRepository.java b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/ProvenanceEventRepository.java index 39c829e8d1..25563b7769 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/ProvenanceEventRepository.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/ProvenanceEventRepository.java @@ -36,8 +36,9 @@ public interface ProvenanceEventRepository { /** * Performs any initialization needed. This should be called only by the * framework. - * @param eventReporter - * @throws java.io.IOException + * + * @param eventReporter to report to + * @throws java.io.IOException if unable to initialize */ void initialize(EventReporter eventReporter) throws IOException; @@ -45,7 +46,7 @@ public interface ProvenanceEventRepository { * Returns a {@link ProvenanceEventBuilder} that is capable of building * {@link ProvenanceEventRecord}s * - * @return + * @return builder */ ProvenanceEventBuilder eventBuilder(); @@ -54,7 +55,7 @@ public interface ProvenanceEventRepository { * the event id has been populated. Depending on the implementation, the * returned event may or may not be the same event given * - * @param event + * @param event to register */ void registerEvent(ProvenanceEventRecord event); @@ -66,7 +67,7 @@ public interface ProvenanceEventRepository { * of the Collection are atomic. This detail is implementation-specific. *

    * - * @param events + * @param events to register */ void registerEvents(Iterable events); @@ -75,18 +76,16 @@ public interface ProvenanceEventRepository { * repository starting with the given ID. The first ID in the repository * will always be 0 or higher. * - * @param firstRecordId - * @param maxRecords - * @return - * @throws java.io.IOException + * @param firstRecordId id of the first record to retrieve + * @param maxRecords maximum number of records to retrieve + * @return records + * @throws java.io.IOException if error reading from repository */ List getEvents(long firstRecordId, final int maxRecords) throws IOException; /** - * Returns the largest ID of any event that is queryable in the repository. + * @return the largest ID of any event that is queryable in the repository. * If no queryable events exists, returns null - * - * @return */ Long getMaxEventId(); @@ -94,19 +93,18 @@ public interface ProvenanceEventRepository { * Submits an asynchronous request to process the given query, returning an * identifier that can be used to fetch the results at a later time * - * @param query - * @return + * @param query to submit + * @return an identifier that can be used to fetch the results at a later + * time */ QuerySubmission submitQuery(Query query); /** - * Returns the QueryResult associated with the given identifier, if the + * @param queryIdentifier of the query + * + * @return the QueryResult associated with the given identifier, if the * query has finished processing. If the query has not yet finished running, - * returns null. - * - * @param queryIdentifier - * - * @return + * returns null */ QuerySubmission retrieveQuerySubmission(String queryIdentifier); @@ -123,21 +121,17 @@ public interface ProvenanceEventRepository { ComputeLineageSubmission submitLineageComputation(String flowFileUuid); /** - * Returns the {@link ComputeLineageSubmission} associated with the given + * @param lineageIdentifier identifier of lineage to compute + * @return the {@link ComputeLineageSubmission} associated with the given * identifier - * - * @param lineageIdentifier - * @return */ ComputeLineageSubmission retrieveLineageSubmission(String lineageIdentifier); /** - * Returns the Provenance Event Record with the given ID, if it exists, or + * @param id to lookup + * @return the Provenance Event Record with the given ID, if it exists, or * {@code null} otherwise - * - * @param id - * @return - * @throws IOException + * @throws IOException if failure while retrieving event */ ProvenanceEventRecord getEvent(long id) throws IOException; @@ -145,7 +139,7 @@ public interface ProvenanceEventRepository { * Submits a request to expand the parents of the event with the given id * * @param eventId the one-up id of the Event to expand - * @return + * @return a submission which can be checked for status * * @throws IllegalArgumentException if the given identifier identifies a * Provenance Event that has a Type that is not expandable or if the @@ -157,7 +151,7 @@ public interface ProvenanceEventRepository { * Submits a request to expand the children of the event with the given id * * @param eventId the one-up id of the Event - * @return + * @return a submission which can be checked for status * * @throws IllegalArgumentException if the given identifier identifies a * Provenance Event that has a Type that is not expandable or if the @@ -168,23 +162,19 @@ public interface ProvenanceEventRepository { /** * Closes the repository, freeing any resources * - * @throws IOException + * @throws IOException if failure closing repository */ void close() throws IOException; /** - * Returns a list of all fields that can be searched via the + * @return a list of all fields that can be searched via the * {@link #submitQuery(nifi.provenance.search.Query)} method - * - * @return */ List getSearchableFields(); /** - * Returns a list of all FlowFile attributes that can be searched via the + * @return a list of all FlowFile attributes that can be searched via the * {@link #submitQuery(nifi.provenance.search.Query)} method - * - * @return */ List getSearchableAttributes(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/ComputeLineageResult.java b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/ComputeLineageResult.java index c2d55132ab..e754ff7d1a 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/ComputeLineageResult.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/ComputeLineageResult.java @@ -25,46 +25,34 @@ import java.util.List; public interface ComputeLineageResult { /** - * Returns all nodes for the graph - * - * @return + * @return all nodes for the graph */ public List getNodes(); /** - * Returns all links for the graph - * - * @return + * @return all links for the graph */ public List getEdges(); /** - * Returns the date at which this AsynchronousLineageResult will expire - * - * @return + * @return the date at which this AsynchronousLineageResult will expire */ Date getExpiration(); /** - * If an error occurred while computing the lineage, this will return the - * serialized error; otherwise, returns null. - * - * @return + * @return If an error occurred while computing the lineage, this will return the + * serialized error; otherwise, returns null */ String getError(); /** - * returns an integer between 0 and 100 (inclusive) that indicates what + * @return an integer between 0 and 100 (inclusive) that indicates what * percentage of completion the computation has reached - * - * @return */ int getPercentComplete(); /** - * Indicates whether or not the lineage has finished running - * - * @return + * @return Indicates whether or not the lineage has finished running */ boolean isFinished(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/ComputeLineageSubmission.java b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/ComputeLineageSubmission.java index fbbff105e3..a9df26cea1 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/ComputeLineageSubmission.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/ComputeLineageSubmission.java @@ -22,25 +22,19 @@ import java.util.Date; public interface ComputeLineageSubmission { /** - * Returns the {@link ComputeLineageResult} that contains the results. The + * @return the {@link ComputeLineageResult} that contains the results. The * results may be partial if a call to - * {@link ComputeLineageResult#isFinished()} returns false. - * - * @return + * {@link ComputeLineageResult#isFinished()} returns false */ ComputeLineageResult getResult(); /** - * Returns the date at which this lineage was submitted - * - * @return + * @return the date at which this lineage was submitted */ Date getSubmissionTime(); /** - * Returns the generated identifier for this lineage result - * - * @return + * @return the generated identifier for this lineage result */ String getLineageIdentifier(); @@ -56,27 +50,21 @@ public interface ComputeLineageSubmission { boolean isCanceled(); /** - * Returns the type of Lineage Computation that was submitted - * - * @return + * @return the type of Lineage Computation that was submitted */ LineageComputationType getLineageComputationType(); /** - * If the Lineage Computation Type of this submission is + * @return If the Lineage Computation Type of this submission is * {@link LineageComputationType.EXPAND_CHILDREN} or * {@link LineageComputationType.EXPAND_PARENTS}, indicates the ID event - * that is to be expanded; otherwise, returns null. - * - * @return + * that is to be expanded; otherwise, returns null */ Long getExpandedEventId(); /** - * Returns all FlowFile UUID's that are encapsulated in this lineage + * @return all FlowFile UUID's that are encapsulated in this lineage * computation submission - * - * @return */ Collection getLineageFlowFileUuids(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/Lineage.java b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/Lineage.java index 252968c0e8..ff5fee7c44 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/Lineage.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/Lineage.java @@ -25,16 +25,12 @@ import java.util.List; public interface Lineage { /** - * Returns all nodes for the graph - * - * @return + * @return all nodes for the graph */ public List getNodes(); /** - * Returns all links for the graph - * - * @return + * @return all links for the graph */ public List getEdges(); diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/LineageNode.java b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/LineageNode.java index 84e3546e39..c50cdf5840 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/LineageNode.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/lineage/LineageNode.java @@ -19,43 +19,33 @@ package org.apache.nifi.provenance.lineage; public interface LineageNode { /** - * Returns the identifier of the Clustered NiFi Node that generated the + * @return the identifier of the Clustered NiFi Node that generated the * event - * - * @return */ String getClusterNodeIdentifier(); /** - * Returns the type of the LineageNode - * - * @return + * @return the type of the LineageNode */ LineageNodeType getNodeType(); /** - * Returns the UUID of the FlowFile for which this Node was created - * - * @return + * @return the UUID of the FlowFile for which this Node was created */ String getFlowFileUuid(); /** - * Returns the UUID for this LineageNode. - * - * @return + * @return the UUID for this LineageNode */ String getIdentifier(); /** - * Returns the timestamp that corresponds to this Node. The meaning of the + * @return the timestamp that corresponds to this Node. The meaning of the * timestamp may differ between implementations. For example, a * {@link ProvenanceEventLineageNode}'s timestamp indicates the time at * which the event occurred. However, for a Node that reperesents a * FlowFile, for example, the timestamp may represent the time at which the - * FlowFile was created. - * - * @return + * FlowFile was created */ long getTimestamp(); } diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/Query.java b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/Query.java index a319e36465..3519c1468a 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/Query.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/Query.java @@ -16,7 +16,12 @@ */ package org.apache.nifi.provenance.search; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.Objects; + public class Query { diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/QueryResult.java b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/QueryResult.java index 3dd0b71297..0079433ec5 100644 --- a/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/QueryResult.java +++ b/nifi/nifi-api/src/main/java/org/apache/nifi/provenance/search/QueryResult.java @@ -24,54 +24,40 @@ import org.apache.nifi.provenance.ProvenanceEventRecord; public interface QueryResult { /** - * Returns the Provenance events that match the query (up to the limit + * @return the Provenance events that match the query (up to the limit * specified in the query) - * - * @return */ List getMatchingEvents(); /** - * Returns the total number of Provenance Events that hit - * - * @return + * @return the total number of Provenance Events that hit */ long getTotalHitCount(); /** - * Returns the number of milliseconds the query took to run - * - * @return + * @return the number of milliseconds the query took to run */ long getQueryTime(); /** - * Returns the date at which this QueryResult will expire - * - * @return + * @return the date at which this QueryResult will expire */ Date getExpiration(); /** - * If an error occurred while computing the lineage, this will return the - * serialized error; otherwise, returns null. - * - * @return + * @return If an error occurred while computing the lineage, this will return the + * serialized error; otherwise, returns null */ String getError(); /** - * returns an integer between 0 and 100 (inclusive) that indicates what + * @return an integer between 0 and 100 (inclusive) that indicates what * percentage of completion the query has reached - * - * @return */ int getPercentComplete(); /** - * Indicates whether or not the query has finished running - * - * @return + * @return Indicates whether or not the query has finished running */ boolean isFinished(); } 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 6c3e1ad81f..4716d2d4e2 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 false. - * - * @return + * {@link QueryResult#isFinished()} is false */ 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(); 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 fa3bfe33db..85c6154892 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 true if this field represents a FlowFile attribute, + * @return true if this field represents a FlowFile attribute, * false if the field represents a Provenance Event detail, * such as Source System URI - * - * @return */ boolean isAttribute(); } 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 508ab37d40..c3a34b234e 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(); } 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 efcf2a3637..b5afe17a9f 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; 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 4d32d40e66..2679099211 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 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 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 findBulletinsForGroupBySource(String groupId, int maxPerComponent); /** - * Finds all bulletins for the controller; - * - * @return + * @return all bulletins for the controller */ List findBulletinsForController(); /** * Finds all bulletins for the controller; * - * @param max - * @return + * @param max limits the number of responses + * @return all bulletins for the controller */ List findBulletinsForController(int max); } 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 f043efd3ca..bdc23c2635 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 getProvenanceEvents(long firstEventId, final int maxRecords) throws IOException; /** - * Returns the Provenance Event Repository - * - * @return + * @return the Provenance Event Repository */ ProvenanceEventRepository getProvenanceRepository(); } 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 ad4090c7cb..281194c7b5 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 null 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 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(); } 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 6b84589d75..d014b26023 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 { * -1L 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(); } 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 3f777969da..3de9b9386b 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); } 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 77865bf4dd..1da8c90754 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 getProperties(); } 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 7ed7d829e9..29e490a5a6 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; 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 0b68ed95ac..5614fc2e40 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 getProperties() { return properties; } /** - * Current validation errors for the component. - * - * @return + * @return Current validation errors for the component */ public Collection 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; 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 066e77254c..96f2abf0a6 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; 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 50f0ca30f3..ae32b10490 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 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 - */ - 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 - * @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 + * 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 + * @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; + + /** + * 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 + * operating in a cluster. + * @throws IllegalArgumentException When the requestContext isn't fully + * populated or isn't appropriate for the given request */ ComponentDetails getComponentDetails(NiFiWebRequestContext requestContext) throws ResourceNotFoundException, ClusterRequestException; } 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 791224122a..c75d9dc731 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(); 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 01702addf8..55e90e867e 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 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(); 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 ac38221ae1..9dd44abf50 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(); 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 ce5e069d30..f42063fd32 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; 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 8a6275e1c5..6fcdcaf51b 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; } 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 0bbda16d66..e3b0f8a217 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, 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 f90221e97f..180385e2f6 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(); } 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 82b8111089..e3043be6c9 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());