Skip to content

Commit 5cf3ba8

Browse files
markap14mcgilmanbbendebobpaulin
authored
NIFI-15258 Added API for Connectors (#70)
NIFI-15259: Adding web context interface for custom Connector UIs. NIFI-15322: Require all property descriptors within a PropertyGroup / ConfigurationStep are unique (#27) NIFI-15326: Adding support for connector configuration step documentation. (#28) NIFI-15312: Moved SecretsProvider / SecretsManager to framework instead of api; added description to Secret and updated ParameterProvider to allow more specific fetching of parameters; cleaned up Connector validation logic (#29) NIFI-15343: Adding providerId to Secret. (#30) NIFI-15258: Enable Custom UI to retrieve connector with flow contexts (#33) NIFI-15352: Added getFullyQualifiedName to secret, to encapsulate the combination of group and name (#35) NIFI-15352: Added getFullyQualifiedName to SecretReference NIFI-15315 Add support for assets in Connectors (#31) NIFI-15361: Removing documentation from ConfigurationStep. (#38) NIFI-15369: Allow ConfigurationStep to depend on another (ConfigurationStep,Property) tuple (#39) NIFI-15356: Introducing the ConnectorWebMethod. (#37) NIFI-15353: Adding documentation writers for connectors. (#40) NIFI-15428: If non-existent property value is set, connector should be invalid. (#43) NIFI-15427: Added drainFlowFiles(FlowContext) method to Connector (#42) NIFI-15440: Implementation of ConnectorActions (#47) NIFI-15446: Updated JavaDocs to clarify how invocations of Connector Methods work (#45) NIFI-15461: Fixed bug that caused system tests to fail (#48) NIFI-15451: Provide ability for Connectors to lookup Bundles available for a given component type (#46) NIFI-15485: Include provider name when providing fqn for secrets (#52) NIFI-15467: Allow Connectors to specify bundle compatability when upd… (#54) NIFI-15536: Change Connector API to use DescribedValue vs AllowableValue (#60) NIFI-15514: Ensure that when AbstractConnector is started, it includes all components, not just processors and controller services; code cleanup (#57) NIFI-15538: When starting/stopping components allow specifying whether or not the action should be recursive; code cleanup and simplification to use a Virtual Thread to execute code sequentially instead of chaining CompletableFutures. (#61) NIFI-15480: Added DropFlowFileSummary, ability to drop FlowFiles from a ConnectionFacade / ProcessGroupFacade (#62) NIFI-15557: Allow Connectors to enable a Controller Service using overridden property values (#63) NIFI-15565: Code cleanup (#64) NIFI-15621: Allow Configuration to Validate with ValidationContext (#69) Co-authored-by: Mark Payne <markap14@hotmail.com> Co-authored-by: Matt Gilman <matt.c.gilman@gmail.com> Co-authored-by: Bryan Bende <bbende@apache.org> Co-authored-by: Bob Paulin <bob@bobpaulin.com> Signed-off-by: David Handermann <exceptionfactory@apache.org>
1 parent 833e800 commit 5cf3ba8

74 files changed

Lines changed: 7967 additions & 7 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/main/java/org/apache/nifi/action/Component.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,7 @@ public enum Component {
3838
AccessPolicy,
3939
User,
4040
UserGroup,
41-
Label
41+
Label,
42+
Connector;
43+
4244
}

src/main/java/org/apache/nifi/annotation/lifecycle/OnAdded.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
* {@link org.apache.nifi.controller.ControllerService ControllerService},
3030
* {@link org.apache.nifi.registry.flow.FlowRegistryClient FlowRegistryClient},
3131
* {@link org.apache.nifi.parameter.ParameterProvider ParameterProvider},
32-
* {@link org.apache.nifi.flowanalysis.FlowAnalysisRule FlowAnalysisRule}, or
33-
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation
34-
* can use to indicate a method should be called whenever the component is added
32+
* {@link org.apache.nifi.flowanalysis.FlowAnalysisRule FlowAnalysisRule},
33+
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask}, or
34+
* {@link org.apache.nifi.components.connector.Connector Connector}
35+
* implementation can use to indicate a method should be called whenever the component is added
3536
* to the flow. This method will be called once for the entire life of a
3637
* component instance.
3738
* </p>

src/main/java/org/apache/nifi/asset/Asset.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,18 @@ public interface Asset {
3737
* Returns the identifier of the parameter context the Asset belongs to
3838
*
3939
* @return Parameter Context Identifier
40+
* @deprecated Use {@link #getOwnerIdentifier()} instead
4041
*/
42+
@Deprecated
4143
String getParameterContextIdentifier();
4244

45+
/**
46+
* Returns the identifier of the resource the Asset belongs to
47+
*
48+
* @return Owner Identifier
49+
*/
50+
String getOwnerIdentifier();
51+
4352
/**
4453
* Returns the name of the Asset
4554
*

src/main/java/org/apache/nifi/components/ConfigVerificationResult.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@
2020
public class ConfigVerificationResult {
2121
private final Outcome outcome;
2222
private final String verificationStepName;
23+
private final String subject;
2324
private final String explanation;
2425

2526
private ConfigVerificationResult(final Builder builder) {
2627
outcome = builder.outcome;
2728
verificationStepName = builder.verificationStepName;
29+
subject = builder.subject;
2830
explanation = builder.explanation;
2931
}
3032

@@ -36,6 +38,10 @@ public String getVerificationStepName() {
3638
return verificationStepName;
3739
}
3840

41+
public String getSubject() {
42+
return subject;
43+
}
44+
3945
public String getExplanation() {
4046
return explanation;
4147
}
@@ -44,13 +50,15 @@ public String getExplanation() {
4450
public String toString() {
4551
return "ConfigVerificationResult[" +
4652
"outcome=" + outcome +
53+
", subject=" + (subject == null ? "null" : "'" + subject + "'") +
4754
", verificationStepName='" + verificationStepName + "'" +
4855
", explanation='" + explanation + "']";
4956
}
5057

5158
public static class Builder {
5259
private Outcome outcome = Outcome.SKIPPED;
5360
private String verificationStepName = "Unknown Step Name";
61+
private String subject;
5462
private String explanation;
5563

5664
public Builder outcome(final Outcome outcome) {
@@ -63,6 +71,11 @@ public Builder verificationStepName(final String verificationStepName) {
6371
return this;
6472
}
6573

74+
public Builder subject(final String subject) {
75+
this.subject = subject;
76+
return this;
77+
}
78+
6679
public Builder explanation(final String explanation) {
6780
this.explanation = explanation;
6881
return this;

src/main/java/org/apache/nifi/components/DescribedValue.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,21 @@ public interface DescribedValue {
3535
* @return the property description as a string
3636
*/
3737
String getDescription();
38+
39+
DescribedValue NULL = new DescribedValue() {
40+
@Override
41+
public String getValue() {
42+
return null;
43+
}
44+
45+
@Override
46+
public String getDisplayName() {
47+
return "NULL";
48+
}
49+
50+
@Override
51+
public String getDescription() {
52+
return "A null value";
53+
}
54+
};
3855
}

src/main/java/org/apache/nifi/components/ValidationContext.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,13 @@ private boolean isDependencySatisfied(final PropertyDescriptor propertyDescripto
200200
default boolean isValidateConnections() {
201201
return true;
202202
}
203+
204+
/**
205+
* Evaluates parameter references in the given value, substituting them with their resolved values
206+
* using the parameter lookup associated with this ValidationContext.
207+
*
208+
* @param value the value potentially containing parameter references
209+
* @return the value with parameter references substituted, or the original value if no parameters are available
210+
*/
211+
String evaluateParameters(String value);
203212
}

0 commit comments

Comments
 (0)