diff options
author | liamfallon <liam.fallon@est.tech> | 2021-01-04 12:15:18 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2021-01-06 14:20:06 +0000 |
commit | f2b0318f53abf9f2345a5cdca74f3dd635aa9b60 (patch) | |
tree | 0a5d64add719e43596f95b9415db04257c037988 /models-provider/src/main | |
parent | 8ad3f95cdcec48b8315a5febfd4ec07bae7aabba (diff) |
Changed identifiers to concept identifiers
The policy models tosca classes ToscaPolicyIdentifier and
ToscaPolicyIdentifierOptVersion can be used to identify any TOSCA
concept, not just TOSCA policies so they are renamed to
ToscaConceptIdentifier and ToscaCinceptIdentifierOptVersion
respectively.
The class ToscaPolicyTypeIdentifier is redundant and is replaced by
ToscaConceptIdentifier.
Issue-ID: POLICY-2900
Change-Id: Id0a37c42ea4e74f07b47e1694c4f8291c35879c9
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-provider/src/main')
-rw-r--r-- | models-provider/src/main/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderImpl.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/models-provider/src/main/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderImpl.java b/models-provider/src/main/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderImpl.java index 29b2d70b0..c80ca3194 100644 --- a/models-provider/src/main/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderImpl.java +++ b/models-provider/src/main/java/org/onap/policy/models/provider/impl/DatabasePolicyModelsProviderImpl.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019-2020 Nordix Foundation. + * Copyright (C) 2019-2021 Nordix Foundation. * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2020 Bell Canada. All rights reserved. * ================================================================================ @@ -43,12 +43,11 @@ import org.onap.policy.models.pdp.persistence.provider.PdpProvider; import org.onap.policy.models.pdp.persistence.provider.PdpStatisticsProvider; import org.onap.policy.models.provider.PolicyModelsProvider; import org.onap.policy.models.provider.PolicyModelsProviderParameters; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy; import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyFilter; -import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyIdentifier; 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.ToscaPolicyTypeIdentifier; import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate; import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplateFilter; import org.onap.policy.models.tosca.authorative.provider.AuthorativeToscaProvider; @@ -212,7 +211,7 @@ public class DatabasePolicyModelsProviderImpl implements PolicyModelsProvider { throws PfModelException { assertInitialized(); - ToscaPolicyTypeIdentifier policyTypeIdentifier = new ToscaPolicyTypeIdentifier(name, version); + ToscaConceptIdentifier policyTypeIdentifier = new ToscaConceptIdentifier(name, version); assertPolicyTypeNotSupportedInPdpGroup(policyTypeIdentifier); return new AuthorativeToscaProvider().deletePolicyType(pfDao, name, version); @@ -261,7 +260,7 @@ public class DatabasePolicyModelsProviderImpl implements PolicyModelsProvider { throws PfModelException { assertInitialized(); - ToscaPolicyIdentifier policyIdentifier = new ToscaPolicyIdentifier(name, version); + ToscaConceptIdentifier policyIdentifier = new ToscaConceptIdentifier(name, version); assertPolicyNotDeployedInPdpGroup(policyIdentifier); return new AuthorativeToscaProvider().deletePolicy(pfDao, name, version); @@ -363,7 +362,7 @@ public class DatabasePolicyModelsProviderImpl implements PolicyModelsProvider { * @param policyTypeIdentifier the policy type identifier * @throws PfModelException if the policy type is supported in a PDP group */ - private void assertPolicyTypeNotSupportedInPdpGroup(ToscaPolicyTypeIdentifier policyTypeIdentifier) + private void assertPolicyTypeNotSupportedInPdpGroup(ToscaConceptIdentifier policyTypeIdentifier) throws PfModelException { for (PdpGroup pdpGroup : getPdpGroups(null)) { for (PdpSubGroup pdpSubGroup : pdpGroup.getPdpSubgroups()) { @@ -382,7 +381,7 @@ public class DatabasePolicyModelsProviderImpl implements PolicyModelsProvider { * @param policyIdentifier the identifier of the policy * @throws PfModelException thrown if the policy is deployed in a PDP group */ - private void assertPolicyNotDeployedInPdpGroup(final ToscaPolicyIdentifier policyIdentifier) + private void assertPolicyNotDeployedInPdpGroup(final ToscaConceptIdentifier policyIdentifier) throws PfModelException { for (PdpGroup pdpGroup : getPdpGroups(null)) { for (PdpSubGroup pdpSubGroup : pdpGroup.getPdpSubgroups()) { |