Add clustered-app-config blueprint extension
[controller.git] / opendaylight / blueprint / src / main / java / org / opendaylight / controller / blueprint / ext / ComponentProcessor.java
index bae06b1ea6335e9ef5daecd81756fc7590250b84..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());
@@ -128,7 +130,7 @@ public class ComponentProcessor implements ComponentDefinitionRegistryProcessor
     }
 
     private void registerManagedService(final String persistentId) {
-        // Register a ManagedService so we git updates from the ConfigAdmin when the cfg file corresponding
+        // Register a ManagedService so we get updates from the ConfigAdmin when the cfg file corresponding
         // to the persistentId changes.
         ManagedService managedService = new ManagedService() {
             private volatile boolean initialUpdate = true;