Bug 1010: Implement restconf error responses
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / sal / dom / broker / osgi / ProxyFactory.xtend
index eb738673cb9d724ab830cd16edc56f4d560e4c8b..d0afc3f47dbb325b2e9b95fb715b3f8a611a82d9 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.controller.sal.dom.broker.osgi
 
 import org.opendaylight.controller.sal.core.api.BrokerService
@@ -7,6 +14,9 @@ import org.opendaylight.controller.sal.core.api.data.DataProviderService
 import org.opendaylight.controller.sal.core.api.notify.NotificationPublishService
 import org.opendaylight.controller.sal.core.api.notify.NotificationService
 import org.opendaylight.controller.sal.core.api.model.SchemaService
+import org.opendaylight.controller.sal.core.api.mount.MountProvisionService
+import org.opendaylight.controller.sal.core.api.RpcProvisionRegistry
+import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker
 
 class ProxyFactory {
 
@@ -14,6 +24,7 @@ class ProxyFactory {
         return createProxyImpl(serviceRef, service) as T;
     }
 
+
     private static def dispatch createProxyImpl(ServiceReference<?> ref, DataBrokerService service) {
         new DataBrokerServiceProxy(ref as ServiceReference<DataBrokerService>, service);
     }
@@ -30,10 +41,24 @@ class ProxyFactory {
         new NotificationServiceProxy(ref as ServiceReference<NotificationService>, service);
     }
 
+    private static def dispatch createProxyImpl(ServiceReference<?> ref, MountProvisionService service) {
+        new MountProviderServiceProxy(ref as ServiceReference<MountProvisionService>, service);
+    }
+
+
     private static def dispatch createProxyImpl(ServiceReference<?> ref, SchemaService service) {
         new SchemaServiceProxy(ref as ServiceReference<SchemaService>, service);
     }
 
+    private static def dispatch createProxyImpl(ServiceReference<?> ref, RpcProvisionRegistry service) {
+        new RpcProvisionRegistryProxy(ref as ServiceReference<RpcProvisionRegistry>, service);
+    }
+    
+    private static def dispatch createProxyImpl(ServiceReference<?> ref, DOMDataBroker service) {
+        new DOMDataBrokerProxy(ref as ServiceReference<DOMDataBroker>, service)
+    }
+    
+
     private static def dispatch createProxyImpl(ServiceReference<?> reference, BrokerService service) {
         throw new IllegalArgumentException("Not supported class");
     }