From d3b500b342053d6e40a1ffb254d7008f23067c95 Mon Sep 17 00:00:00 2001 From: Pierre Villard Date: Thu, 19 Mar 2026 16:49:34 +0100 Subject: [PATCH 1/4] NIFI-15733 - Add CapabilityTag annotation --- .../documentation/CapabilityTag.java | 54 +++++++++++++++++++ .../documentation/CapabilityTags.java | 36 +++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 src/main/java/org/apache/nifi/annotation/documentation/CapabilityTag.java create mode 100644 src/main/java/org/apache/nifi/annotation/documentation/CapabilityTags.java diff --git a/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTag.java b/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTag.java new file mode 100644 index 0000000..21656bc --- /dev/null +++ b/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTag.java @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.annotation.documentation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Repeatable; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Annotation that can be applied to a {@link org.apache.nifi.processor.Processor Processor}, + * {@link org.apache.nifi.controller.ControllerService ControllerService}, + * {@link org.apache.nifi.parameter.ParameterProvider ParameterProvider}, + * {@link org.apache.nifi.flowanalysis.FlowAnalysisRule FlowAnalysisRule}, or + * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} in order to + * associate a key-value pair with the component. These tags do not affect the + * component in any way but serve as additional documentation and can be + * included in the extension manifest and generated documentation. + */ +@Documented +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Inherited +@Repeatable(CapabilityTags.class) +public @interface CapabilityTag { + + /** + * @return the key of the capability tag + */ + String key(); + + /** + * @return the value of the capability tag + */ + String value(); +} diff --git a/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTags.java b/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTags.java new file mode 100644 index 0000000..f4f10ef --- /dev/null +++ b/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTags.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.nifi.annotation.documentation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * An enclosing annotation that can be used in order to use the {@link CapabilityTag} annotation in a repeated manner. + */ +@Documented +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Inherited +public @interface CapabilityTags { + CapabilityTag[] value(); +} From 4485f4d911c9bf57f6346863b445298d377ba645 Mon Sep 17 00:00:00 2001 From: Pierre Villard Date: Mon, 23 Mar 2026 18:13:30 +0100 Subject: [PATCH 2/4] Update src/main/java/org/apache/nifi/annotation/documentation/CapabilityTag.java Co-authored-by: David Handermann --- .../org/apache/nifi/annotation/documentation/CapabilityTag.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTag.java b/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTag.java index 21656bc..13f009f 100644 --- a/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTag.java +++ b/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTag.java @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.nifi.annotation.documentation; import java.lang.annotation.Documented; From c077c6e6bbee6da99967fa4e0a4d123cc5ef6171 Mon Sep 17 00:00:00 2001 From: Pierre Villard Date: Mon, 23 Mar 2026 18:13:36 +0100 Subject: [PATCH 3/4] Update src/main/java/org/apache/nifi/annotation/documentation/CapabilityTags.java Co-authored-by: David Handermann --- .../org/apache/nifi/annotation/documentation/CapabilityTags.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTags.java b/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTags.java index f4f10ef..6439816 100644 --- a/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTags.java +++ b/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTags.java @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.nifi.annotation.documentation; import java.lang.annotation.Documented; From 665a2f0dc9fae8e54461eb7a7275c872779a7150 Mon Sep 17 00:00:00 2001 From: Pierre Villard Date: Mon, 23 Mar 2026 18:13:43 +0100 Subject: [PATCH 4/4] Update src/main/java/org/apache/nifi/annotation/documentation/CapabilityTags.java Co-authored-by: David Handermann --- .../apache/nifi/annotation/documentation/CapabilityTags.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTags.java b/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTags.java index 6439816..ce153b3 100644 --- a/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTags.java +++ b/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTags.java @@ -24,7 +24,7 @@ import java.lang.annotation.Target; /** - * An enclosing annotation that can be used in order to use the {@link CapabilityTag} annotation in a repeated manner. + * An enclosing annotation for use with one or more {@link CapabilityTag} annotations */ @Documented @Target({ElementType.TYPE})