tpalfy commented on a change in pull request #4123: NIFI-7188: Adding filter 
capabilities into search & prerequisite refactors
URL: https://github.com/apache/nifi/pull/4123#discussion_r391077893
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/nifi-web-api-context.xml
 ##########
 @@ -75,6 +75,128 @@
         <property name="dtoFactory" ref="dtoFactory" />
     </bean>
 
+    <!-- search functionality -->
+    <bean id="searchQueryParser" 
class="org.apache.nifi.web.search.query.RegexSearchQueryParser" />
+
+    <bean id="attributeMatcher" 
class="org.apache.nifi.web.search.attributematchers.BasicAttributeMatcher" />
+    <bean id="limitedAttributeMatcher" 
class="org.apache.nifi.web.search.attributematchers.BasicAttributeMatcher">
+        <constructor-arg value="false" />
+    </bean>
+    <bean id="schedulingMatcher" 
class="org.apache.nifi.web.search.attributematchers.SchedulingMatcher" />
+    <bean id="executionMatcher" 
class="org.apache.nifi.web.search.attributematchers.ExecutionMatcher" />
+    <bean id="scheduledStateMatcher" 
class="org.apache.nifi.web.search.attributematchers.ScheduledStateMatcher" />
+    <bean id="relationshipMatcher" 
class="org.apache.nifi.web.search.attributematchers.RelationshipMatcher" />
+    <bean id="processorMetadataMatcher" 
class="org.apache.nifi.web.search.attributematchers.ProcessorMetadataMatcher" />
+    <bean id="propertyMatcher" 
class="org.apache.nifi.web.search.attributematchers.PropertyMatcher" />
+    <bean id="searchableMatcher" 
class="org.apache.nifi.web.search.attributematchers.SearchableMatcher">
+        <property name="variableRegistry" ref="variableRegistry" />
+    </bean>
+    <bean id="processGroupAttributeMatcher" 
class="org.apache.nifi.web.search.attributematchers.ProcessGroupAttributeMatcher"
 />
+    <bean id="componentVariableRegistryAttributeMatcher" 
class="org.apache.nifi.web.search.attributematchers.ComponentVariableRegistryAttributeMatcher"
 />
+    <bean id="connectionAttributeMatcher" 
class="org.apache.nifi.web.search.attributematchers.ConnectionAttributeMatcher" 
/>
+    <bean id="prioritiesAttributeMatcher" 
class="org.apache.nifi.web.search.attributematchers.PrioritiesAttributeMatcher" 
/>
+    <bean id="expirationAttributeMatcher" 
class="org.apache.nifi.web.search.attributematchers.ExpirationAttributeMatcher" 
/>
+    <bean id="backPressureAttributeMatcher" 
class="org.apache.nifi.web.search.attributematchers.BackPressureAttributeMatcher"
 />
+    <bean id="connectivityAttributeMatcher" 
class="org.apache.nifi.web.search.attributematchers.ConnectivityAttributeMatcher"
 />
+    <bean id="remoteProcessGroupAttributeMatcher" 
class="org.apache.nifi.web.search.attributematchers.RemoteProcessGroupAttributeMatcher"
 />
+    <bean id="targetUriMatcher" 
class="org.apache.nifi.web.search.attributematchers.TargetUriMatcher" />
+    <bean id="transmissionStatusMatcher" 
class="org.apache.nifi.web.search.attributematchers.TransmissionStatusMatcher" 
/>
+    <bean id="portScheduledStateMatcher" 
class="org.apache.nifi.web.search.attributematchers.PortScheduledStateMatcher" 
/>
+    <bean id="publicPortMatcher" 
class="org.apache.nifi.web.search.attributematchers.PublicPortMatcher" />
+    <bean id="parameterContextAttributeMatcher" 
class="org.apache.nifi.web.search.attributematchers.ParameterContextAttributeMatcher"
 />
+    <bean id="parameterMatcher" 
class="org.apache.nifi.web.search.attributematchers.ParameterMatcher" />
+    <bean id="labelAttributeMatcher" 
class="org.apache.nifi.web.search.attributematchers.LabelAttributeMatcher" />
+
+    <bean id="componentMatcherFactory" 
class="org.apache.nifi.web.search.ComponentMatcherFactory" />
+
+    <bean id="matcherForProcessor" factory-bean="componentMatcherFactory" 
factory-method="getInstanceForConnectable">
+        <constructor-arg>
+            <util:list>
+                <ref bean="attributeMatcher" />
+                <ref bean="schedulingMatcher" />
+                <ref bean="executionMatcher" />
+                <ref bean="scheduledStateMatcher" />
+                <ref bean="relationshipMatcher" />
+                <ref bean="processorMetadataMatcher" />
+                <ref bean="propertyMatcher" />
+                <ref bean="searchableMatcher" />
+            </util:list>
+        </constructor-arg>
+    </bean>
+
+    <bean id="matcherForProcessGroup" factory-bean="componentMatcherFactory" 
factory-method="getInstanceForProcessGroup">
+        <constructor-arg>
+            <util:list>
+                <ref bean="processGroupAttributeMatcher" />
+                <ref bean="componentVariableRegistryAttributeMatcher" />
+            </util:list>
+        </constructor-arg>
+    </bean>
+
+    <bean id="matcherForConnection" factory-bean="componentMatcherFactory" 
factory-method="getInstanceForConnection">
+        <constructor-arg>
+            <util:list>
+                <ref bean="connectionAttributeMatcher" />
+                <ref bean="relationshipMatcher" />
+                <ref bean="prioritiesAttributeMatcher" />
+                <ref bean="expirationAttributeMatcher" />
+                <ref bean="backPressureAttributeMatcher" />
+                <ref bean="connectivityAttributeMatcher" />
+            </util:list>
+        </constructor-arg>
+    </bean>
+
+    <bean id="matcherForRemoteProcessGroup" 
factory-bean="componentMatcherFactory" 
factory-method="getInstanceForRemoteProcessGroup">
+        <constructor-arg>
+            <util:list>
+                <ref bean="remoteProcessGroupAttributeMatcher" />
+                <ref bean="targetUriMatcher" />
+                <ref bean="transmissionStatusMatcher" />
+            </util:list>
+        </constructor-arg>
+    </bean>
+
+    <bean id="matcherForPort" factory-bean="componentMatcherFactory" 
factory-method="getInstanceForConnectable">
+        <constructor-arg>
+            <util:list>
+                <ref bean="attributeMatcher" />
+                <ref bean="portScheduledStateMatcher" />
+                <ref bean="publicPortMatcher" />
+            </util:list>
+        </constructor-arg>
+    </bean>
+
+    <bean id="matcherForFunnel" factory-bean="componentMatcherFactory" 
factory-method="getInstanceForConnectable">
+        <constructor-arg>
+            <util:list>
+                <ref bean="limitedAttributeMatcher" />
+            </util:list>
+        </constructor-arg>
+    </bean>
+
+    <bean id="matcherForParameterContext" 
factory-bean="componentMatcherFactory" 
factory-method="getInstanceForParameterContext">
+        <constructor-arg>
+            <util:list>
+                <ref bean="parameterContextAttributeMatcher" />
+            </util:list>
+        </constructor-arg>
+    </bean>
+
+    <bean id="matcherForParameter" factory-bean="componentMatcherFactory" 
factory-method="getInstanceForParameter">
+        <constructor-arg>
+            <util:list>
+                <ref bean="parameterMatcher" />
+            </util:list>
+        </constructor-arg>
+    </bean>
+
+    <bean id="matcherForLabel" factory-bean="componentMatcherFactory" 
factory-method="getInstanceForConnectable">
 
 Review comment:
   `Labels` are not `Connectables`!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to