/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
+ * Copyright (C) 2019-2022 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020, 2022 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.models.provider.impl;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
import java.util.Map;
-
import javax.ws.rs.core.Response;
-
import lombok.NonNull;
-
import org.onap.policy.models.base.PfModelException;
import org.onap.policy.models.base.PfModelRuntimeException;
-import org.onap.policy.models.pdp.concepts.PdpGroups;
+import org.onap.policy.models.pdp.concepts.Pdp;
+import org.onap.policy.models.pdp.concepts.PdpGroup;
+import org.onap.policy.models.pdp.concepts.PdpGroupFilter;
+import org.onap.policy.models.pdp.concepts.PdpPolicyStatus;
+import org.onap.policy.models.pdp.concepts.PdpSubGroup;
import org.onap.policy.models.provider.PolicyModelsProvider;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifierOptVersion;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaEntityFilter;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaEntityKey;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaNodeTemplate;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyType;
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;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaTypedEntityFilter;
/**
* Dummy implementation of {@link PolicyModelsProvider} with bad constructor.
}
@Override
- public void close() throws Exception {}
+ public void close() throws PfModelException {
+ // do nothing
+ }
@Override
- public void init() throws PfModelException {}
+ public void init() throws PfModelException {
+ // do nothing
+ }
+
+ @Override
+ public List<ToscaServiceTemplate> getFilteredServiceTemplateList(
+ @NonNull ToscaEntityFilter<ToscaServiceTemplate> filter) throws PfModelException {
+ return null;
+ }
+
+ @Override
+ public ToscaServiceTemplate createServiceTemplate(@NonNull ToscaServiceTemplate serviceTemplate)
+ throws PfModelException {
+ return null;
+ }
+
+ @Override
+ public ToscaServiceTemplate updateServiceTemplate(@NonNull ToscaServiceTemplate serviceTemplate)
+ throws PfModelException {
+ return null;
+ }
+
+ @Override
+ public ToscaServiceTemplate deleteServiceTemplate(@NonNull String name, @NonNull String version)
+ throws PfModelException {
+ return null;
+ }
@Override
public ToscaServiceTemplate getPolicyTypes(final String name, final String version) throws PfModelException {
}
@Override
- public ToscaServiceTemplate deletePolicyTypes(final String name, final String version) throws PfModelException {
+ public ToscaServiceTemplate deletePolicyType(final String name, final String version) throws PfModelException {
return null;
}
}
@Override
- public ToscaServiceTemplate createPolicies(@NonNull ToscaServiceTemplate serviceTemplate)
- throws PfModelException {
+ public ToscaServiceTemplate createPolicies(@NonNull ToscaServiceTemplate serviceTemplate) throws PfModelException {
return null;
}
@Override
- public ToscaServiceTemplate updatePolicies(@NonNull ToscaServiceTemplate serviceTemplate)
- throws PfModelException {
+ public ToscaServiceTemplate updatePolicies(@NonNull ToscaServiceTemplate serviceTemplate) throws PfModelException {
return null;
}
@Override
- public ToscaServiceTemplate deletePolicies(final String name, final String version) throws PfModelException {
+ public ToscaServiceTemplate deletePolicy(final String name, final String version) throws PfModelException {
return null;
}
@Override
- public LegacyOperationalPolicy getOperationalPolicy(@NonNull String policyId) throws PfModelException {
+ public ToscaServiceTemplate createToscaNodeTemplates(@NonNull ToscaServiceTemplate serviceTemplate)
+ throws PfModelException {
return null;
}
@Override
- public LegacyOperationalPolicy createOperationalPolicy(@NonNull LegacyOperationalPolicy legacyOperationalPolicy)
- throws PfModelException {
+ public ToscaServiceTemplate updateToscaNodeTemplates(@NonNull ToscaServiceTemplate serviceTemplate)
+ throws PfModelRuntimeException, PfModelException {
return null;
}
@Override
- public LegacyOperationalPolicy updateOperationalPolicy(@NonNull LegacyOperationalPolicy legacyOperationalPolicy)
- throws PfModelException {
+ public ToscaServiceTemplate deleteToscaNodeTemplate(@NonNull String name, @NonNull String version)
+ throws PfModelException {
return null;
}
@Override
- public LegacyOperationalPolicy deleteOperationalPolicy(@NonNull String policyId) throws PfModelException {
+ public List<Map<ToscaEntityKey, Map<String, Object>>> getNodeTemplateMetadataSets(@NonNull String name,
+ @NonNull String version)
+ throws PfModelException {
return null;
}
@Override
- public Map<String, LegacyGuardPolicyOutput> getGuardPolicy(@NonNull String policyId) throws PfModelException {
+ public List<ToscaNodeTemplate> getToscaNodeTemplate(final String name, final String version)
+ throws PfModelException {
return null;
}
@Override
- public Map<String, LegacyGuardPolicyOutput> createGuardPolicy(@NonNull LegacyGuardPolicyInput legacyGuardPolicy)
+ public List<PdpGroup> getPdpGroups(String name) throws PfModelException {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public List<PdpGroup> createPdpGroups(@NonNull List<PdpGroup> pdpGroups) throws PfModelException {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public List<PdpGroup> updatePdpGroups(@NonNull List<PdpGroup> pdpGroups) throws PfModelException {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public void updatePdp(@NonNull String pdpGroupName, @NonNull String pdpSubGroup, @NonNull Pdp pdp)
throws PfModelException {
+ // do nothing
+ }
+
+ @Override
+ public PdpGroup deletePdpGroup(@NonNull String name) throws PfModelException {
return null;
}
@Override
- public Map<String, LegacyGuardPolicyOutput> updateGuardPolicy(@NonNull LegacyGuardPolicyInput legacyGuardPolicy)
+ public List<ToscaPolicyType> getPolicyTypeList(String name, String version) throws PfModelException {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public ToscaServiceTemplate getFilteredPolicyTypes(@NonNull ToscaEntityFilter<ToscaPolicyType> filter)
throws PfModelException {
return null;
}
@Override
- public Map<String, LegacyGuardPolicyOutput> deleteGuardPolicy(@NonNull String policyId) throws PfModelException {
+ public List<ToscaPolicyType> getFilteredPolicyTypeList(@NonNull ToscaEntityFilter<ToscaPolicyType> filter)
+ throws PfModelException {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public List<ToscaPolicy> getPolicyList(String name, String version) throws PfModelException {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public ToscaServiceTemplate getFilteredPolicies(@NonNull ToscaTypedEntityFilter<ToscaPolicy> filter)
+ throws PfModelException {
return null;
}
@Override
- public PdpGroups getPdpGroups(@NonNull String pdpGroupFilter) throws PfModelException {
+ public List<ToscaPolicy> getFilteredPolicyList(@NonNull ToscaTypedEntityFilter<ToscaPolicy> filter)
+ throws PfModelException {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public List<PdpGroup> getFilteredPdpGroups(@NonNull PdpGroupFilter filter) throws PfModelException {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public void updatePdpSubGroup(@NonNull String pdpGroupName, @NonNull PdpSubGroup pdpSubGroup)
+ throws PfModelException {
+ // do nothing
+ }
+
+ @Override
+ public List<PdpPolicyStatus> getAllPolicyStatus() throws PfModelException {
+ // Not implemented
return null;
}
@Override
- public PdpGroups createPdpGroups(@NonNull PdpGroups pdpGroups) throws PfModelException {
+ public List<PdpPolicyStatus> getAllPolicyStatus(@NonNull ToscaConceptIdentifierOptVersion policy)
+ throws PfModelException {
+ // Not implemented
return null;
}
@Override
- public PdpGroups updatePdpGroups(@NonNull PdpGroups pdpGroups) throws PfModelException {
+ public List<PdpPolicyStatus> getGroupPolicyStatus(@NonNull String groupName) throws PfModelException {
+ // Not implemented
return null;
}
@Override
- public PdpGroups deletePdpGroups(@NonNull String pdpGroupFilter) throws PfModelException {
+ public void cudPolicyStatus(Collection<PdpPolicyStatus> createObjs, Collection<PdpPolicyStatus> updateObjs,
+ Collection<PdpPolicyStatus> deleteObjs) {
+ // Not implemented
+ }
+
+ @Override
+ public List<ToscaServiceTemplate> getServiceTemplateList(String name, String version) throws PfModelException {
+ // Not implemented
return null;
}
}