Merge "Add Karaf build profile"
[neutron.git] / northbound-api / src / main / java / org / opendaylight / neutron / northbound / api / NeutronRouterRequest.java
index 856f1c189811d0be1c9b1252682e80d08904e27f..4a07cad16105f5e08e765ae780060867d10e8ddd 100644 (file)
@@ -8,27 +8,25 @@
 
 package org.opendaylight.neutron.northbound.api;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.util.List;
-
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
-
 import org.opendaylight.neutron.spi.NeutronRouter;
 
-
 @XmlRootElement
 @XmlAccessorType(XmlAccessType.NONE)
-
-public class NeutronRouterRequest {
+@SuppressFBWarnings("URF_UNREAD_FIELD")
+public final class NeutronRouterRequest implements INeutronRequest<NeutronRouter> {
     // See OpenStack Network API v2.0 Reference for description of
     // annotated attributes
 
-    @XmlElement(name="router")
-    NeutronRouter singletonRouter;
+    @XmlElement(name = "router")
+    NeutronRouter singleton;
 
-    @XmlElement(name="routers")
+    @XmlElement(name = "routers")
     List<NeutronRouter> bulkRequest;
 
     NeutronRouterRequest() {
@@ -36,22 +34,9 @@ public class NeutronRouterRequest {
 
     NeutronRouterRequest(List<NeutronRouter> bulk) {
         bulkRequest = bulk;
-        singletonRouter = null;
     }
 
     NeutronRouterRequest(NeutronRouter router) {
-        singletonRouter = router;
-    }
-
-    public List<NeutronRouter> getBulk() {
-        return bulkRequest;
-    }
-
-    public NeutronRouter getSingleton() {
-        return singletonRouter;
-    }
-
-    public boolean isSingleton() {
-        return (singletonRouter != null);
+        singleton = router;
     }
 }