Merge "remove redundant methods for compatibility"
[neutron.git] / northbound-api / src / main / java / org / opendaylight / neutron / northbound / api / NeutronVPNIPSECPoliciesNorthbound.java
index f099c086b93e2968199a84218a83d6f237b84a19..37d20dbf9c50ef937d9cb7357ad4678fa098c068 100644 (file)
@@ -31,7 +31,6 @@ import javax.ws.rs.core.UriInfo;
 import org.codehaus.enunciate.jaxrs.ResponseCode;
 import org.codehaus.enunciate.jaxrs.StatusCodes;
 import org.codehaus.enunciate.jaxrs.TypeHint;
-import org.opendaylight.neutron.spi.INeutronVPNIPSECPolicyAware;
 import org.opendaylight.neutron.spi.INeutronVPNIPSECPolicyCRUD;
 import org.opendaylight.neutron.spi.NeutronCRUDInterfaces;
 import org.opendaylight.neutron.spi.NeutronVPNIPSECPolicy;
@@ -56,7 +55,7 @@ import org.opendaylight.neutron.spi.NeutronVPNIPSECPolicy;
 
 @Path("/vpn/ipsecpolicies")
 public class NeutronVPNIPSECPoliciesNorthbound
-    extends AbstractNeutronNorthboundIAware<NeutronVPNIPSECPolicy, NeutronVPNIPSECPolicyRequest, INeutronVPNIPSECPolicyCRUD, INeutronVPNIPSECPolicyAware> {
+    extends AbstractNeutronNorthbound<NeutronVPNIPSECPolicy, NeutronVPNIPSECPolicyRequest, INeutronVPNIPSECPolicyCRUD> {
 
     private static final String RESOURCE_NAME = "VPNIPSECPolicy";
 
@@ -84,47 +83,6 @@ public class NeutronVPNIPSECPoliciesNorthbound
         return new NeutronVPNIPSECPolicyRequest(o);
     }
 
-    @Override
-    protected Object[] getInstances() {
-        return NeutronUtil.getInstances(INeutronVPNIPSECPolicyAware.class, this);
-    }
-
-    @Override
-    protected int canCreate(Object instance, NeutronVPNIPSECPolicy singleton) {
-        INeutronVPNIPSECPolicyAware service = (INeutronVPNIPSECPolicyAware) instance;
-        return service.canCreateNeutronVPNIPSECPolicy(singleton);
-    }
-
-    @Override
-    protected void created(Object instance, NeutronVPNIPSECPolicy singleton) {
-        INeutronVPNIPSECPolicyAware service = (INeutronVPNIPSECPolicyAware) instance;
-        service.neutronVPNIPSECPolicyCreated(singleton);
-    }
-
-    @Override
-    protected int canUpdate(Object instance, NeutronVPNIPSECPolicy delta, NeutronVPNIPSECPolicy original) {
-        INeutronVPNIPSECPolicyAware service = (INeutronVPNIPSECPolicyAware) instance;
-        return service.canUpdateNeutronVPNIPSECPolicy(delta, original);
-    }
-
-    @Override
-    protected void updated(Object instance, NeutronVPNIPSECPolicy updated) {
-        INeutronVPNIPSECPolicyAware service = (INeutronVPNIPSECPolicyAware) instance;
-        service.neutronVPNIPSECPolicyUpdated(updated);
-    }
-
-    @Override
-    protected int canDelete(Object instance, NeutronVPNIPSECPolicy singleton) {
-        INeutronVPNIPSECPolicyAware service = (INeutronVPNIPSECPolicyAware) instance;
-        return service.canDeleteNeutronVPNIPSECPolicy(singleton);
-    }
-
-    @Override
-    protected void deleted(Object instance, NeutronVPNIPSECPolicy singleton) {
-        INeutronVPNIPSECPolicyAware service = (INeutronVPNIPSECPolicyAware) instance;
-        service.neutronVPNIPSECPolicyDeleted(singleton);
-    }
-
     @Context
     UriInfo uriInfo;
 
@@ -145,7 +103,6 @@ public class NeutronVPNIPSECPoliciesNorthbound
             @QueryParam("id") String queryID,
             @QueryParam("tenant_id") String queryTenantID,
             @QueryParam("name") String queryName,
-            @QueryParam("description") String queryDescription,
             @QueryParam("transform_protocol") String queryTransformProtocol,
             @QueryParam("encapsulation_mode") String queryEncapsulationMode,
             @QueryParam("auth_algorithm") String queryAuthAlgorithm,
@@ -154,14 +111,13 @@ public class NeutronVPNIPSECPoliciesNorthbound
             // pagination and sorting are TODO
             ) {
         INeutronVPNIPSECPolicyCRUD policyInterface = getNeutronCRUD();
-        List<NeutronVPNIPSECPolicy> allNeutronVPNIPSECPolicies = policyInterface.getAllNeutronVPNIPSECPolicies();
+        List<NeutronVPNIPSECPolicy> allNeutronVPNIPSECPolicies = policyInterface.getAll();
         List<NeutronVPNIPSECPolicy> ans = new ArrayList<NeutronVPNIPSECPolicy>();
         Iterator<NeutronVPNIPSECPolicy> i = allNeutronVPNIPSECPolicies.iterator();
         while (i.hasNext()) {
             NeutronVPNIPSECPolicy oSS = i.next();
             if ((queryID == null || queryID.equals(oSS.getID())) &&
                     (queryName == null || queryName.equals(oSS.getName())) &&
-                    (queryDescription == null || queryDescription.equals(oSS.getDescription())) &&
                     (queryAuthAlgorithm == null || queryAuthAlgorithm.equals(oSS.getAuthAlgorithm())) &&
                     (queryEncryptionAlgorithm == null || queryEncryptionAlgorithm.equals(oSS.getEncryptionAlgorithm())) &&
                     (queryPFS == null || queryPFS.equals(oSS.getPerfectForwardSecrecy())) &&