NEUTRON-208: BGPVPN network and router association
[neutron.git] / northbound-api / src / main / java / org / opendaylight / neutron / northbound / api / NeutronRouterRequest.java
index 589f3fe62b73d2c2d802efc50d6b39531feddf9c..492981b7b3f58528d47290f7b14a397db841606a 100644 (file)
@@ -8,28 +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
-    implements INeutronRequest<NeutronRouter> {
+@SuppressFBWarnings("URF_UNREAD_FIELD")
+public final class NeutronRouterRequest extends NeutronRequest<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() {
@@ -37,25 +34,9 @@ public class NeutronRouterRequest
 
     NeutronRouterRequest(List<NeutronRouter> bulk) {
         bulkRequest = bulk;
-        singletonRouter = null;
     }
 
     NeutronRouterRequest(NeutronRouter router) {
-        singletonRouter = router;
-    }
-
-    @Override
-    public List<NeutronRouter> getBulk() {
-        return bulkRequest;
-    }
-
-    @Override
-    public NeutronRouter getSingleton() {
-        return singletonRouter;
-    }
-
-    @Override
-    public boolean isSingleton() {
-        return (singletonRouter != null);
+        singleton = router;
     }
 }