Fix bugs on filters
[policy/models.git] / models-tosca / src / main / java / org / onap / policy / models / tosca / simple / provider / SimpleToscaProvider.java
index 6c588a5..a207c42 100644 (file)
@@ -33,8 +33,6 @@ import org.onap.policy.models.base.PfConceptKey;
 import org.onap.policy.models.base.PfModelException;
 import org.onap.policy.models.base.PfModelRuntimeException;
 import org.onap.policy.models.dao.PfDao;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyFilter;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeFilter;
 import org.onap.policy.models.tosca.simple.concepts.JpaToscaPolicies;
 import org.onap.policy.models.tosca.simple.concepts.JpaToscaPolicy;
 import org.onap.policy.models.tosca.simple.concepts.JpaToscaPolicyType;
@@ -81,28 +79,6 @@ public class SimpleToscaProvider {
         }
     }
 
-    /**
-     * Get filtered policy types.
-     *
-     * @param dao the DAO to use to access the database
-     * @param filter the filter for the policy types to get
-     * @return the policy types found
-     * @throws PfModelException on errors getting policy types
-     */
-    public JpaToscaServiceTemplate getFilteredPolicyTypes(@NonNull final PfDao dao,
-            @NonNull final ToscaPolicyTypeFilter filter) throws PfModelException {
-
-        // Create the structure of the TOSCA service template to contain the policy type
-        JpaToscaServiceTemplate serviceTemplate = new JpaToscaServiceTemplate();
-        serviceTemplate.setPolicyTypes(new JpaToscaPolicyTypes());
-
-        List<JpaToscaPolicyType> jpaPolicyTypeList = dao.getAll(JpaToscaPolicyType.class);
-        // TODO: The actual filtering
-
-        serviceTemplate.getPolicyTypes().getConceptMap().putAll(asConceptMap(jpaPolicyTypeList));
-        return serviceTemplate;
-    }
-
     /**
      * Create policy types.
      *
@@ -212,29 +188,6 @@ public class SimpleToscaProvider {
         }
     }
 
-    /**
-     * Get filtered policies.
-     *
-     * @param dao the DAO to use to access the database
-     * @param filter the filter for the policies to get
-     * @return the policies found
-     * @throws PfModelException on errors getting policies
-     */
-    public JpaToscaServiceTemplate getFilteredPolicies(@NonNull final PfDao dao,
-            @NonNull final ToscaPolicyFilter filter) throws PfModelException {
-
-        // Create the structure of the TOSCA service template to contain the policy type
-        JpaToscaServiceTemplate serviceTemplate = new JpaToscaServiceTemplate();
-        serviceTemplate.setTopologyTemplate(new JpaToscaTopologyTemplate());
-        serviceTemplate.getTopologyTemplate().setPolicies(new JpaToscaPolicies());
-
-        List<JpaToscaPolicy> jpaPolicyList = dao.getAll(JpaToscaPolicy.class);
-        // TODO: Do the actual filtering
-
-        serviceTemplate.getTopologyTemplate().getPolicies().getConceptMap().putAll(asConceptMap(jpaPolicyList));
-        return serviceTemplate;
-    }
-
     /**
      * Create policies.
      *