TOSCA Compliant Guard Policies
[policy/models.git] / models-provider / src / main / java / org / onap / policy / models / provider / impl / DummyPolicyModelsProviderImpl.java
index 90545f3..aece188 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2019-2020 Nordix Foundation.
  *  Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,9 +22,8 @@
 package org.onap.policy.models.provider.impl;
 
 import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.Date;
 import java.util.List;
-import java.util.Map;
 
 import javax.ws.rs.core.Response;
 
@@ -44,8 +43,6 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyFilter;
 import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyType;
 import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeFilter;
 import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
-import org.onap.policy.models.tosca.legacy.concepts.LegacyGuardPolicyInput;
-import org.onap.policy.models.tosca.legacy.concepts.LegacyGuardPolicyOutput;
 import org.onap.policy.models.tosca.legacy.concepts.LegacyOperationalPolicy;
 
 /**
@@ -60,7 +57,9 @@ public class DummyPolicyModelsProviderImpl implements PolicyModelsProvider {
      *
      * @param parameters the parameters for the provider
      */
-    public DummyPolicyModelsProviderImpl(final PolicyModelsProviderParameters parameters) {}
+    public DummyPolicyModelsProviderImpl(final PolicyModelsProviderParameters parameters) {
+        // Default constructor
+    }
 
     @Override
     public void init() throws PfModelException {
@@ -93,20 +92,17 @@ public class DummyPolicyModelsProviderImpl implements PolicyModelsProvider {
     }
 
     @Override
-    public ToscaServiceTemplate createPolicyTypes(final ToscaServiceTemplate serviceTemplate)
-            throws PfModelException {
+    public ToscaServiceTemplate createPolicyTypes(final ToscaServiceTemplate serviceTemplate) throws PfModelException {
         return serviceTemplate;
     }
 
     @Override
-    public ToscaServiceTemplate updatePolicyTypes(final ToscaServiceTemplate serviceTemplate)
-            throws PfModelException {
+    public ToscaServiceTemplate updatePolicyTypes(final ToscaServiceTemplate serviceTemplate) throws PfModelException {
         return serviceTemplate;
     }
 
     @Override
-    public ToscaServiceTemplate deletePolicyType(final String name, final String version)
-            throws PfModelException {
+    public ToscaServiceTemplate deletePolicyType(final String name, final String version) throws PfModelException {
         return getDummyResponse("dummyimpl/DummyToscaPolicyTypeDeleteResponse.json");
     }
 
@@ -131,116 +127,110 @@ public class DummyPolicyModelsProviderImpl implements PolicyModelsProvider {
     }
 
     @Override
-    public ToscaServiceTemplate createPolicies(final ToscaServiceTemplate serviceTemplate)
-            throws PfModelException {
+    public ToscaServiceTemplate createPolicies(final ToscaServiceTemplate serviceTemplate) throws PfModelException {
         return serviceTemplate;
     }
 
     @Override
-    public ToscaServiceTemplate updatePolicies(final ToscaServiceTemplate serviceTemplate)
-            throws PfModelException {
+    public ToscaServiceTemplate updatePolicies(final ToscaServiceTemplate serviceTemplate) throws PfModelException {
         return serviceTemplate;
     }
 
     @Override
-    public ToscaServiceTemplate deletePolicy(final String name, final String version)
-            throws PfModelException {
+    public ToscaServiceTemplate deletePolicy(final String name, final String version) throws PfModelException {
         return getDummyResponse("dummyimpl/DummyToscaPolicyDeleteResponse.json");
     }
 
     @Override
 
-    public LegacyOperationalPolicy getOperationalPolicy(final String policyId) throws PfModelException {
+    public LegacyOperationalPolicy getOperationalPolicy(final String policyId, final String policyVersion)
+            throws PfModelException {
         return new LegacyOperationalPolicy();
     }
 
     @Override
-    public LegacyOperationalPolicy createOperationalPolicy(
-            final LegacyOperationalPolicy legacyOperationalPolicy) throws PfModelException {
+    public LegacyOperationalPolicy createOperationalPolicy(final LegacyOperationalPolicy legacyOperationalPolicy)
+            throws PfModelException {
         return legacyOperationalPolicy;
     }
 
     @Override
-    public LegacyOperationalPolicy updateOperationalPolicy(
-            final LegacyOperationalPolicy legacyOperationalPolicy) throws PfModelException {
+    public LegacyOperationalPolicy updateOperationalPolicy(final LegacyOperationalPolicy legacyOperationalPolicy)
+            throws PfModelException {
         return legacyOperationalPolicy;
     }
 
     @Override
-    public LegacyOperationalPolicy deleteOperationalPolicy(final String policyId) throws PfModelException {
+    public LegacyOperationalPolicy deleteOperationalPolicy(final String policyId, final String policyVersion)
+            throws PfModelException {
         return new LegacyOperationalPolicy();
     }
 
     @Override
-    public Map<String, LegacyGuardPolicyOutput> getGuardPolicy(final String policyId) throws PfModelException {
-        return new HashMap<>();
+    public List<PdpGroup> getPdpGroups(final String name) throws PfModelException {
+        return new ArrayList<>();
     }
 
     @Override
-    public Map<String, LegacyGuardPolicyOutput> createGuardPolicy(
-            final LegacyGuardPolicyInput legacyGuardPolicy) throws PfModelException {
-        return new HashMap<>();
+    public List<PdpGroup> getFilteredPdpGroups(PdpGroupFilter filter) throws PfModelException {
+        return new ArrayList<>();
     }
 
     @Override
-    public Map<String, LegacyGuardPolicyOutput> updateGuardPolicy(
-            final LegacyGuardPolicyInput legacyGuardPolicy) throws PfModelException {
-        return new HashMap<>();
+    public List<PdpGroup> createPdpGroups(final List<PdpGroup> pdpGroups) throws PfModelException {
+        return new ArrayList<>();
     }
 
     @Override
-    public Map<String, LegacyGuardPolicyOutput> deleteGuardPolicy(final String policyId)
-            throws PfModelException {
-        return new HashMap<>();
+    public List<PdpGroup> updatePdpGroups(final List<PdpGroup> pdpGroups) throws PfModelException {
+        return new ArrayList<>();
     }
 
     @Override
-    public List<PdpGroup> getPdpGroups(final String name, final String version) throws PfModelException {
-        return new ArrayList<>();
+    public void updatePdpSubGroup(final String pdpGroupName, final PdpSubGroup pdpSubGroup) throws PfModelException {
+        // Not implemented
     }
 
     @Override
-    public List<PdpGroup> getFilteredPdpGroups(PdpGroupFilter filter) throws PfModelException {
-        return new ArrayList<>();
+    public void updatePdp(String pdpGroupName, String pdpSubGroup, Pdp pdp) throws PfModelException {
+        // Not implemented
     }
 
     @Override
-    public List<PdpGroup> createPdpGroups(final List<PdpGroup> pdpGroups) throws PfModelException {
-        return new ArrayList<>();
+    public PdpGroup deletePdpGroup(final String name) throws PfModelException {
+        return null;
     }
 
     @Override
-    public List<PdpGroup> updatePdpGroups(final List<PdpGroup> pdpGroups) throws PfModelException {
+    public List<PdpStatistics> getPdpStatistics(final String name, final Date timestamp) throws PfModelException {
         return new ArrayList<>();
     }
 
     @Override
-    public void updatePdpSubGroup(final String pdpGroupName, final String pdpGroupVersion,
-            final PdpSubGroup pdpSubGroup) throws PfModelException {
+    public List<PdpStatistics> getFilteredPdpStatistics(String name, String pdpGroupName, String pdpSubGroup,
+            Date startTimeStamp, Date endTimeStamp, String sortOrder, int getRecordNum) {
         // Not implemented
+        return new ArrayList<>();
     }
 
     @Override
-    public void updatePdp(String pdpGroupName, String pdpGroupVersion,
-            String pdpSubGroup, Pdp pdp) throws PfModelException {
+    public List<PdpStatistics> createPdpStatistics(final List<PdpStatistics> pdpStatisticsList)
+            throws PfModelException {
         // Not implemented
+        return new ArrayList<>();
     }
 
     @Override
-    public PdpGroup deletePdpGroup(final String name, final String version) throws PfModelException {
-        return null;
-    }
-
-    @Override
-    public List<PdpStatistics> getPdpStatistics(final String name, final String version) throws PfModelException {
+    public List<PdpStatistics> updatePdpStatistics(final List<PdpStatistics> pdpStatisticsList)
+            throws PfModelException {
+        // Not implemented
         return new ArrayList<>();
     }
 
     @Override
-    public void updatePdpStatistics(final String pdpGroupName, final String pdpGroupVersion,
-            final String pdpType, final String pdpInstanceId,
-            final PdpStatistics pdppStatistics) throws PfModelException {
+    public List<PdpStatistics> deletePdpStatistics(final String name, final Date timestamp) {
         // Not implemented
+        return new ArrayList<>();
     }
 
     /**