Add clustered-app-config blueprint extension
[controller.git] / opendaylight / blueprint / src / main / java / org / opendaylight / controller / blueprint / ext / ComponentProcessor.java
index a4b63aa4277b0f3cdef52f1bf248cb9090903ff6..5daa6e4f3882dd43eb43e4621d5fd869b22c8e8f 100644 (file)
@@ -36,6 +36,8 @@ import org.slf4j.LoggerFactory;
  * @author Thomas Pantelis
  */
 public class ComponentProcessor implements ComponentDefinitionRegistryProcessor {
+    static final String DEFAULT_TYPE_FILTER = "(|(type=default)(!(type=*)))";
+
     private static final Logger LOG = LoggerFactory.getLogger(ComponentProcessor.class);
     private static final String CM_PERSISTENT_ID_PROPERTY = "persistentId";
 
@@ -94,7 +96,7 @@ public class ComponentProcessor implements ComponentDefinitionRegistryProcessor
                 serviceRef.getId(), filter, extFilter);
 
         if(Strings.isNullOrEmpty(filter) && Strings.isNullOrEmpty(extFilter)) {
-            serviceRef.setFilter("(|(type=default)(!(type=*)))");
+            serviceRef.setFilter(DEFAULT_TYPE_FILTER);
 
             LOG.debug("{}: processServiceReferenceMetadata for {} set filter to {}", logName(),
                     serviceRef.getId(), serviceRef.getFilter());