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.git


The following commit(s) were added to refs/heads/main by this push:
     new 8a696c1dfa NIFI-11715 Removed unused user-defined property support 
from PutDatabaseRecord and DistributedMapCacheLookupService
8a696c1dfa is described below

commit 8a696c1dfa81e053d2d77b2d1be1d1dd2d0911e0
Author: Matt Burgess <[email protected]>
AuthorDate: Fri Jun 16 15:26:31 2023 -0400

    NIFI-11715 Removed unused user-defined property support from 
PutDatabaseRecord and DistributedMapCacheLookupService
    
    This closes #7395
    
    Signed-off-by: David Handermann <[email protected]>
---
 .../apache/nifi/processors/standard/PutDatabaseRecord.java | 14 --------------
 .../nifi/lookup/DistributedMapCacheLookupService.java      | 14 --------------
 2 files changed, 28 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutDatabaseRecord.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutDatabaseRecord.java
index 02f36b53cf..4345b991b5 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutDatabaseRecord.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutDatabaseRecord.java
@@ -33,7 +33,6 @@ import org.apache.nifi.components.PropertyDescriptor.Builder;
 import org.apache.nifi.components.ValidationContext;
 import org.apache.nifi.components.ValidationResult;
 import org.apache.nifi.dbcp.DBCPService;
-import org.apache.nifi.expression.AttributeExpression;
 import org.apache.nifi.flowfile.FlowFile;
 import org.apache.nifi.logging.ComponentLog;
 import org.apache.nifi.processor.AbstractProcessor;
@@ -418,19 +417,6 @@ public class PutDatabaseRecord extends AbstractProcessor {
         return propDescriptors;
     }
 
-    // TODO remove this at next major release as dynamic properties are not 
used by this processor
-    @Override
-    protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final 
String propertyDescriptorName) {
-        return new Builder()
-                .name(propertyDescriptorName)
-                .required(false)
-                
.addValidator(StandardValidators.createAttributeExpressionLanguageValidator(AttributeExpression.ResultType.STRING,
 true))
-                
.addValidator(StandardValidators.ATTRIBUTE_KEY_PROPERTY_NAME_VALIDATOR)
-                .expressionLanguageSupported(FLOWFILE_ATTRIBUTES)
-                .dynamic(true)
-                .build();
-    }
-
     @Override
     protected Collection<ValidationResult> customValidate(ValidationContext 
validationContext) {
         Collection<ValidationResult> validationResults = new 
ArrayList<>(super.customValidate(validationContext));
diff --git 
a/nifi-nar-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/DistributedMapCacheLookupService.java
 
b/nifi-nar-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/DistributedMapCacheLookupService.java
index 24fb327fa9..9d73dfdab9 100644
--- 
a/nifi-nar-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/DistributedMapCacheLookupService.java
+++ 
b/nifi-nar-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/DistributedMapCacheLookupService.java
@@ -34,7 +34,6 @@ import 
org.apache.nifi.annotation.documentation.CapabilityDescription;
 import org.apache.nifi.annotation.documentation.Tags;
 import org.apache.nifi.annotation.lifecycle.OnEnabled;
 import org.apache.nifi.components.PropertyDescriptor;
-import org.apache.nifi.components.Validator;
 import org.apache.nifi.controller.AbstractControllerService;
 import org.apache.nifi.controller.ConfigurationContext;
 import org.apache.nifi.distributed.cache.client.Deserializer;
@@ -42,7 +41,6 @@ import 
org.apache.nifi.distributed.cache.client.DistributedMapCacheClient;
 import org.apache.nifi.distributed.cache.client.Serializer;
 import 
org.apache.nifi.distributed.cache.client.exception.DeserializationException;
 import 
org.apache.nifi.distributed.cache.client.exception.SerializationException;
-import org.apache.nifi.expression.ExpressionLanguageScope;
 
 @Tags({"lookup", "enrich", "key", "value", "map", "cache", "distributed"})
 @CapabilityDescription("Allows to choose a distributed map cache client to 
retrieve the value associated to a key. "
@@ -86,18 +84,6 @@ public class DistributedMapCacheLookupService extends 
AbstractControllerService
         return STANDARD_CHARSETS.stream().map(c -> 
c.displayName()).collect(Collectors.toSet());
     }
 
-    // TODO remove this at next major release as dynamic properties are not 
used by this component
-    @Override
-    protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final 
String propertyDescriptorName) {
-        return new PropertyDescriptor.Builder()
-            .name(propertyDescriptorName)
-            .required(false)
-            .dynamic(true)
-            .addValidator(Validator.VALID)
-            
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
-            .build();
-    }
-
     @OnEnabled
     public void onEnabled(final ConfigurationContext context) {
         cache = 
context.getProperty(PROP_DISTRIBUTED_CACHE_SERVICE).asControllerService(DistributedMapCacheClient.class);

Reply via email to