Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main/java/org/apache/nifi/action/Component.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,7 @@ public enum Component {
AccessPolicy,
User,
UserGroup,
Label;
Label,
Connector;

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@
* {@link org.apache.nifi.controller.ControllerService ControllerService},
* {@link org.apache.nifi.registry.flow.FlowRegistryClient FlowRegistryClient},
* {@link org.apache.nifi.parameter.ParameterProvider ParameterProvider},
* {@link org.apache.nifi.flowanalysis.FlowAnalysisRule FlowAnalysisRule}, or
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation
* can use to indicate a method should be called whenever the component is added
* {@link org.apache.nifi.flowanalysis.FlowAnalysisRule FlowAnalysisRule},
* {@link org.apache.nifi.reporting.ReportingTask ReportingTask}, or
* {@link org.apache.nifi.components.connector.Connector Connector}
* 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.
* </p>
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/org/apache/nifi/asset/Asset.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,18 @@ public interface Asset {
* Returns the identifier of the parameter context the Asset belongs to
*
* @return Parameter Context Identifier
* @deprecated Use {@link #getOwnerIdentifier()} instead
*/
@Deprecated
String getParameterContextIdentifier();

/**
* Returns the identifier of the resource the Asset belongs to
*
* @return Owner Identifier
*/
String getOwnerIdentifier();

/**
* Returns the name of the Asset
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
public class ConfigVerificationResult {
private final Outcome outcome;
private final String verificationStepName;
private final String subject;
private final String explanation;

private ConfigVerificationResult(final Builder builder) {
outcome = builder.outcome;
verificationStepName = builder.verificationStepName;
subject = builder.subject;
explanation = builder.explanation;
}

Expand All @@ -36,6 +38,10 @@ public String getVerificationStepName() {
return verificationStepName;
}

public String getSubject() {
return subject;
}

public String getExplanation() {
return explanation;
}
Expand All @@ -44,13 +50,15 @@ public String getExplanation() {
public String toString() {
return "ConfigVerificationResult[" +
"outcome=" + outcome +
", subject=" + (subject == null ? "null" : "'" + subject + "'") +
", verificationStepName='" + verificationStepName + "'" +
", explanation='" + explanation + "']";
}

public static class Builder {
private Outcome outcome = Outcome.SKIPPED;
private String verificationStepName = "Unknown Step Name";
private String subject;
private String explanation;

public Builder outcome(final Outcome outcome) {
Expand All @@ -63,6 +71,11 @@ public Builder verificationStepName(final String verificationStepName) {
return this;
}

public Builder subject(final String subject) {
this.subject = subject;
return this;
}

public Builder explanation(final String explanation) {
this.explanation = explanation;
return this;
Expand Down
17 changes: 17 additions & 0 deletions src/main/java/org/apache/nifi/components/DescribedValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,21 @@ public interface DescribedValue {
* @return the property description as a string
*/
String getDescription();

DescribedValue NULL = new DescribedValue() {
@Override
public String getValue() {
return null;
}

@Override
public String getDisplayName() {
return "NULL";
}

@Override
public String getDescription() {
return "A null value";
}
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,13 @@ private boolean isDependencySatisfied(final PropertyDescriptor propertyDescripto
default boolean isValidateConnections() {
return true;
}

/**
* Evaluates parameter references in the given value, substituting them with their resolved values
* using the parameter lookup associated with this ValidationContext.
*
* @param value the value potentially containing parameter references
* @return the value with parameter references substituted, or the original value if no parameters are available
*/
String evaluateParameters(String value);
}
Loading