Consolidating null providers and making them fully configurable and integrated with the ConfigProvider to allow arbitrary topologies.

Change-Id: I899e27a9771af4013a3ce6da7f683a4927ffb438
diff --git a/cli/src/main/java/org/onosproject/cli/app/ApplicationCommandCompleter.java b/cli/src/main/java/org/onosproject/cli/app/ApplicationCommandCompleter.java
index b9ea774..51611ff 100644
--- a/cli/src/main/java/org/onosproject/cli/app/ApplicationCommandCompleter.java
+++ b/cli/src/main/java/org/onosproject/cli/app/ApplicationCommandCompleter.java
@@ -15,30 +15,20 @@
  */
 package org.onosproject.cli.app;
 
-import org.apache.karaf.shell.console.Completer;
-import org.apache.karaf.shell.console.completer.StringsCompleter;
+import com.google.common.collect.ImmutableList;
+import org.onosproject.cli.AbstractChoicesCompleter;
 
 import java.util.List;
-import java.util.SortedSet;
 
 import static org.onosproject.cli.app.ApplicationCommand.*;
 
 /**
- * Application name completer.
+ * Application command completer.
  */
-public class ApplicationCommandCompleter implements Completer {
+public class ApplicationCommandCompleter extends AbstractChoicesCompleter {
     @Override
-    public int complete(String buffer, int cursor, List<String> candidates) {
-        // Delegate string completer
-        StringsCompleter delegate = new StringsCompleter();
-        SortedSet<String> strings = delegate.getStrings();
-        strings.add(INSTALL);
-        strings.add(UNINSTALL);
-        strings.add(ACTIVATE);
-        strings.add(DEACTIVATE);
-
-        // Now let the completer do the work for figuring out what to offer.
-        return delegate.complete(buffer, cursor, candidates);
+    public List<String> choices() {
+        return ImmutableList.of(INSTALL, UNINSTALL, ACTIVATE, DEACTIVATE);
     }
 
 }
diff --git a/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java b/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java
index e975be0..9342721 100644
--- a/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java
+++ b/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java
@@ -19,7 +19,7 @@
 import org.apache.karaf.shell.console.completer.StringsCompleter;
 import org.onosproject.app.ApplicationService;
 import org.onosproject.app.ApplicationState;
-import org.onosproject.cli.net.AbstractCompleter;
+import org.onosproject.cli.AbstractCompleter;
 import org.onosproject.core.Application;
 
 import java.util.Iterator;