complete dependency inject CRUD implementations
[neutron.git] / northbound-api / src / main / java / org / opendaylight / neutron / northbound / api / NeutronFirewallNorthbound.java
index 2a5fe93b47b8189a4175b1c070055bfc1de42d91..fcec13e8a141090b16a795fa7294abe2c2adca9a 100644 (file)
@@ -10,6 +10,8 @@ package org.opendaylight.neutron.northbound.api;
 import java.net.HttpURLConnection;
 import java.util.ArrayList;
 import java.util.List;
+import javax.inject.Inject;
+import javax.inject.Singleton;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
 import javax.ws.rs.GET;
@@ -25,16 +27,23 @@ import org.codehaus.enunciate.jaxrs.ResponseCode;
 import org.codehaus.enunciate.jaxrs.StatusCodes;
 import org.opendaylight.neutron.spi.INeutronFirewallCRUD;
 import org.opendaylight.neutron.spi.NeutronFirewall;
+import org.ops4j.pax.cdi.api.OsgiService;
 
 /**
  * Neutron Northbound REST APIs for Firewall.
  */
+@Singleton
 @Path("/fw/firewalls")
 public final class NeutronFirewallNorthbound
         extends AbstractNeutronNorthbound<NeutronFirewall, NeutronFirewallRequest, INeutronFirewallCRUD> {
 
     private static final String RESOURCE_NAME = "Firewall";
 
+    @Inject
+    public NeutronFirewallNorthbound(@OsgiService INeutronFirewallCRUD neutronCRUD) {
+        super(neutronCRUD);
+    }
+
     @Override
     protected String getResourceName() {
         return RESOURCE_NAME;