Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
96dce88
NIFI-15258: Initial implementation of Connectors
markap14 Sep 2, 2025
41266ff
NIFI-15258: Fixed vulnerable lz4 dependency
markap14 Dec 9, 2025
314a289
NIFI-15258: Fixed checkstyle violations/pmd
markap14 Dec 9, 2025
aab0c69
NIFI-15258: Addressed PMD findings
markap14 Dec 9, 2025
1009473
NIFI-15259: Added REST API for Connectors
mcgilman Oct 24, 2025
c7bb74f
NIFI-15323: Adding operate permissions to the ConnectorEntity. (#10625)
mcgilman Dec 10, 2025
04f3b44
NIFI-15322: Require all property descriptors within a PropertyGroup /…
markap14 Dec 10, 2025
7438c99
NIFI-15326: Adding support of configuration step documentation. (#10631)
mcgilman Dec 11, 2025
9cd672c
NIFI-15330: Allow GhostConnector to be updated (#10632)
markap14 Dec 11, 2025
292d27d
NIFI-15312: Implementation of Parameter Provider based Secrets Manage…
markap14 Dec 12, 2025
60d1ece
NIFI-15336: Created AuthorizableSecret and implemented ParameterProvi…
markap14 Dec 15, 2025
f1075f8
NIFI-15258: Enable Custom UI to retrieve connector with flow contexts…
bobpaulin Dec 16, 2025
c134211
NIFI-15352: Added ConnectorClient to toolkit-cli so that it can be us…
markap14 Dec 17, 2025
d2c8b77
NIFI-15343: Adding an endpoint to return available secrets to the con…
mcgilman Dec 17, 2025
2d120a1
NIFI-15315 Add support for assets in connectors (#10647)
bbende Dec 17, 2025
60efb80
NIFI-15361: Allowing configuration step documentation to be returned …
mcgilman Dec 18, 2025
2baec28
NIFI-15369: Allow ConfigurationStep to depend on another (Configurati…
markap14 Dec 19, 2025
7573b64
NIFI-15367: Ensure that Connectors' implicit parameter contexts are n…
markap14 Dec 19, 2025
805cc8b
NIFI-15370: Add Connector ID to process groups and do not register cr…
markap14 Dec 19, 2025
0a861be
NIFI-15356: Adding authorization to the StandardNiFiConnectorWebConte…
mcgilman Dec 22, 2025
8c35327
NIFI-15353: Adding support for rendering Connector Documentation. (#1…
mcgilman Dec 23, 2025
c9dde94
NIFI-15429: Adding an optional query parameter for specifying which p…
mcgilman Jan 7, 2026
73a0dec
NIFI-15430: Ensure that if we fail to initialize a Connector, we crea…
markap14 Jan 7, 2026
8890b42
NIFI-15427: Added abiliy to drop flowfiles / drain flowfiles from a C…
markap14 Jan 9, 2026
3288c0d
NIFI-15433: If connector validation throws an Exception keep trying u…
markap14 Jan 9, 2026
4053a81
NIFI-15434: Ensure that we start or stop connectors on flow sync (#10…
markap14 Jan 9, 2026
9366f35
NIFI-15445: Removed 'disabled' state from Connectors; also fixed bug …
markap14 Jan 9, 2026
bb8aa89
NIFI-15440: Implementation of ConnectorActions (#10748)
markap14 Jan 12, 2026
9d448ca
NIFI-15439: Ensure that Process Groups are accessible from the approp…
markap14 Jan 12, 2026
00ad24b
NIFI-15468: Ensure that we properly initialize ConnectorNode even if …
markap14 Jan 15, 2026
5bed6fd
NIFI-15446: When invoking ConnectorMethod, make sure to serialize/des…
markap14 Jan 15, 2026
57d025f
NIFI-15376: Adding dependencies to the configuration step dto. (#10674)
mcgilman Jan 15, 2026
0bc9a1e
NIFI-15480: Added ability to drop FlowFiles selectively using a Predi…
markap14 Jan 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
74 changes: 74 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
AI persona
----------
Act as an experienced Java software engineer. When considering how to implement a task, first consider the big picture of what is being asked. Then determine which classes will need to be udpated.
Quite often, a single request will require manipulating many different classes. Generally speaking, it is best to avoid changing established interfaces, but it is often acceptable because the public API
that NiFi adheres to is not in this module.


API
---
When it is necessary to lookup the API for reference, the API can generally be found at ../nifi-api, where .. is relative to the project's root directory.

Building
--------
NiFi is a complex Maven codebase. Never build code (testing or otherwise) using javac. Always use `mvn` instead.
Additionally, building a maven module using the also-make flag (`-am`) is often very expensive and slow.
Instead, only build the specific module you are modifying. Assume that the user has already built the entire
codebase and that only the specific module you are modifying needs to be built again.

Code Style
----------
NiFi adheres to a few code styles that are not necessarily common. Please ensure that you observe these code styles.
1. Any variable that can be marked `final` must be marked `final`. This includes declarations of Exceptions, method arguments, local variables, member variables, etc.
2. Short-hand is highly discouraged in names of variables, classes, methods, etc., as well as in documentation.
3. Private / helper methods should not be placed before the first public/protected method that calls it.
4. Unless the method is to be heavily reused, avoid creating trivial 1-2 line methods and instead just place the code inline.
5. Code is allowed to be up to 200 characters wide. Avoid breaking lines into many short lines.
6. Avoid creating private methods that are called only once unless they are at least 10 lines long or are complex.
7. It is never acceptable to use star imports. Import each individual class that is to be used.
8. Never use underscores in class names, variables, or filenames.
9. Never use System.out.println but instead use SLF4J Loggers
10. Avoid excessive whitespace in method invocations. For example, instead of writing:
```
myObject.doSomething(
arg1,
arg2,
arg3,
arg4,
arg5
);
```
Write this instead:
```
myObject.doSomething(arg1, arg2, arg3, arg4, arg5);
```

11. When possible, prefer importing a class, rather than using fully qualified classname inline in the code.
12. Avoid statically importing methods unless they are used frequently such as methods in the `Assertions` and `Mockito` classes.
13. Avoid trailing whitespace at the end of lines, especially in blank lines.

Unit / Automated Testing
------------------------
In addition to the general rules defined in the Code Style section, follow these rules when creating or manipulating automated tests.
1. NEVER add comments such as `// Given`, `// When`, `// Then`. These comments are considered an anti-pattern and should be removed or replaced whenever they are encountered.
Instead, leave them out all together (preferred) or use comments that clearly articulate what is happening, such as `// Setup`, `// Invoke method`, `// Assert expected results.`
One of the reasons that this is considered an anti-pattern (in addition to the fact that the given/when/then nomeclature itself provides no meaning) is that it assumes a very specific pattern
in unit tests, that we will create a bunch of objects, invoke the method we care about, make assertions, and then end. This often results in many tests that are extremely repetitive.
Instead, whenever it makes sense to do so, create the prerequisitive objects, invoke the method we care about with appropriate arguments, make assertions, and then invoke again with a different
set of arguments, make assertions, etc. There is no need to have many repetitive methods that each create many repetitive objects.

2. Unit tests are Java. They are not English. As such, they should be written like Java. Frameworks such as assertj that strive to make the unit tests look more "English-like" should be avoided.
Use of these frameworks sometimes works well but often quickly devolves into automated tests that read like neither English nor Java.

3. Like any other code, unit tests should be created using reusable methods where appropriate. Do not create 15 methods that are all very similar and repetitive. Instead, create reusable methods
that can be called from each of the methods.

4. Never use the `assert` keyword. Use JUnit assertions instead.

5. Never create a test file that is centered around testing a method or capability. Unit tests must always be named after the class they are testing. It is okay if a given unit test class is very, very long.

6. This is a Java project using the Maven structure. Java test files must always fall under src/test/java of the appropriate sub-module.

7. Never use pointless assertions such as assertDoesNotThrow - this adds nothing but complexity. Just call the method, and if it throws an Exception, the test will fail. I.e.,
it is assumed by default that each line does not throw an Exception, so do not use

Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class ComponentManifest implements Serializable {
private List<ParameterProviderDefinition> parameterProviders;
private List<FlowRegistryClientDefinition> flowRegistryClients;
private List<FlowAnalysisRuleDefinition> flowAnalysisRules;
private List<ConnectorDefinition> connectors;

@Schema(description = "Public interfaces defined in this bundle")
public List<DefinedType> getApis() {
Expand Down Expand Up @@ -97,4 +98,13 @@ public void setFlowRegistryClients(List<FlowRegistryClientDefinition> flowRegist
this.flowRegistryClients = flowRegistryClients;
}

@Schema(description = "Connectors provided in this bundle")
public List<ConnectorDefinition> getConnectors() {
return (connectors != null ? Collections.unmodifiableList(connectors) : null);
}

public void setConnectors(List<ConnectorDefinition> connectors) {
this.connectors = connectors;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* 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.c2.protocol.component.api;

import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.util.List;

/**
* Represents a configuration step for a Connector.
*/
public class ConfigurationStep implements Serializable {
private static final long serialVersionUID = 1L;

private String name;
private String description;
private boolean documented;
private List<ConfigurationStepDependency> stepDependencies;
private List<ConnectorPropertyGroup> propertyGroups;

@Schema(description = "The name of the configuration step")
public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

@Schema(description = "The description of the configuration step")
public String getDescription() {
return description;
}

public void setDescription(String description) {
this.description = description;
}

@Schema(description = "Whether this configuration step has additional documentation")
public boolean isDocumented() {
return documented;
}

public void setDocumented(boolean documented) {
this.documented = documented;
}

@Schema(description = "The dependencies that this step has on other steps")
public List<ConfigurationStepDependency> getStepDependencies() {
return stepDependencies;
}

public void setStepDependencies(List<ConfigurationStepDependency> stepDependencies) {
this.stepDependencies = stepDependencies;
}

@Schema(description = "The property groups in this configuration step")
public List<ConnectorPropertyGroup> getPropertyGroups() {
return propertyGroups;
}

public void setPropertyGroups(List<ConnectorPropertyGroup> propertyGroups) {
this.propertyGroups = propertyGroups;
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* 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.c2.protocol.component.api;

import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.util.List;

/**
* Represents a dependency that a configuration step has on another step's property.
*/
public class ConfigurationStepDependency implements Serializable {
private static final long serialVersionUID = 1L;

private String stepName;
private String propertyName;
private List<String> dependentValues;

@Schema(description = "The name of the step that this step depends on")
public String getStepName() {
return stepName;
}

public void setStepName(String stepName) {
this.stepName = stepName;
}

@Schema(description = "The name of the property within the step that this step depends on")
public String getPropertyName() {
return propertyName;
}

public void setPropertyName(String propertyName) {
this.propertyName = propertyName;
}

@Schema(description = "The values of the dependent property that enable this step")
public List<String> getDependentValues() {
return dependentValues;
}

public void setDependentValues(List<String> dependentValues) {
this.dependentValues = dependentValues;
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* 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.c2.protocol.component.api;

import io.swagger.v3.oas.annotations.media.Schema;

import java.util.Collections;
import java.util.List;

/**
* Definition of a Connector component.
*/
public class ConnectorDefinition extends ExtensionComponent {
private static final long serialVersionUID = 1L;

private List<ConfigurationStep> configurationSteps;

@Schema(description = "The configuration steps for this connector")
public List<ConfigurationStep> getConfigurationSteps() {
return (configurationSteps != null ? Collections.unmodifiableList(configurationSteps) : null);
}

public void setConfigurationSteps(List<ConfigurationStep> configurationSteps) {
this.configurationSteps = configurationSteps;
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* 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.c2.protocol.component.api;

import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.util.List;

/**
* Represents a dependency that a connector property has on another property.
*/
public class ConnectorPropertyDependency implements Serializable {
private static final long serialVersionUID = 1L;

private String propertyName;
private List<String> dependentValues;

@Schema(description = "The name of the property that this property depends on")
public String getPropertyName() {
return propertyName;
}

public void setPropertyName(String propertyName) {
this.propertyName = propertyName;
}

@Schema(description = "The values of the dependent property that enable this property")
public List<String> getDependentValues() {
return dependentValues;
}

public void setDependentValues(List<String> dependentValues) {
this.dependentValues = dependentValues;
}
}

Loading
Loading