Define APIs to determine how to install/remove an intent

It's a part of ONOS-1654.

- IntentInstaller handles installation/removal of an intent
- IIntentRuntime supports register/unregister IntentInstaller

Change-Id: I7dae171b445eac6254131a9f4144f0447a2321f2
diff --git a/src/main/java/net/onrc/onos/api/intent/IIntentRuntimeService.java b/src/main/java/net/onrc/onos/api/intent/IIntentRuntimeService.java
index 6750595..0e5c36e 100644
--- a/src/main/java/net/onrc/onos/api/intent/IIntentRuntimeService.java
+++ b/src/main/java/net/onrc/onos/api/intent/IIntentRuntimeService.java
@@ -84,6 +84,35 @@
     public <T extends Intent> void removeResolver(Class<T> type);
 
     /**
+     * Adds an IntentInstaller associated with a given intent type.
+     *
+     * If there is an Intent instance of the specified Intent type in the runtime,
+     * the specified IntentInstaller doesn't replace the existing installer.
+     * Otherwise, the existing installer is replaced with the specified installer.
+     *
+     * @param type the class instance of the intent type.
+     * @param installer the installer of the given intent type.
+     * @param <T> the type of the intent.
+     * @return false when there is an Intent instance of the specified intent type
+     * in the runtime. Otherwise, true.
+     */
+    public <T extends Intent> boolean addInstaller(Class<T> type, IntentInstaller<T> installer);
+
+    /**
+     * Removes the IntentInstaller associated with a given intent type.
+     *
+     * If there is an Intent instance of the specified Intent type in the runtime,
+     * the specified IntentInstaller is not removed. Otherwise, the existing
+     * IntentInstaller is removed from the runtime.
+     *
+     * @param type the class instance of the intent type.
+     * @param <T> the type of the intent.
+     * @return false when there is an Intent instance of the specified intent type
+     * in the runtime. Otherwise, true.
+     */
+    public <T extends Intent> boolean removeInstaller(Class<T> type);
+
+    /**
      * Gets IFlow objects managed by the specified intent.
      *
      * @param intentId ID of the target Intent.