You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ex...@apache.org on 2026/03/23 17:28:11 UTC
(nifi-api) branch main updated: NIFI-15733 Added CapabilityTag Documentation Annotation (#78)
This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-api.git
The following commit(s) were added to refs/heads/main by this push:
new 58439d9 NIFI-15733 Added CapabilityTag Documentation Annotation (#78)
58439d9 is described below
commit 58439d9b50f8c6b8b614ee0b5199a89ffceb0abc
Author: Pierre Villard <pi...@gmail.com>
AuthorDate: Mon Mar 23 18:28:04 2026 +0100
NIFI-15733 Added CapabilityTag Documentation Annotation (#78)
Signed-off-by: David Handermann <ex...@apache.org>
---
.../annotation/documentation/CapabilityTag.java | 53 ++++++++++++++++++++++
.../annotation/documentation/CapabilityTags.java | 35 ++++++++++++++
2 files changed, 88 insertions(+)
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..13f009f
--- /dev/null
+++ b/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTag.java
@@ -0,0 +1,53 @@
+/*
+ * 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..ce153b3
--- /dev/null
+++ b/src/main/java/org/apache/nifi/annotation/documentation/CapabilityTags.java
@@ -0,0 +1,35 @@
+/*
+ * 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 for use with one or more {@link CapabilityTag} annotations
+ */
+@Documented
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+public @interface CapabilityTags {
+ CapabilityTag[] value();
+}