summaryrefslogtreecommitdiffstats
path: root/models-provider/src/main
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-03-26 22:31:43 +0000
committerliamfallon <liam.fallon@est.tech>2019-03-26 22:31:43 +0000
commitcee84a9344f35356f86384b0d48127f5a83e3776 (patch)
treec2a796218273fa4553f07d1328adac3882ab4711 /models-provider/src/main
parent38e3ea9ff6a0a1534a30655e22082cf4c8d887d0 (diff)
Add Legacy Op Policy Persistence
Legacy operational policies now fully supported for serialization and persistence from provider through to database and back. Unit test coverage completed also Issue-ID: POLICY-1095 Change-Id: I65755859c94b50edee537d2685f51a7838c6541f 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.java18
1 files changed, 9 insertions, 9 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 970aa8fef..43f75d2a9 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
@@ -41,7 +41,7 @@ import org.onap.policy.models.provider.PolicyModelsProvider;
import org.onap.policy.models.provider.PolicyModelsProviderParameters;
import org.onap.policy.models.tosca.legacy.concepts.LegacyGuardPolicy;
import org.onap.policy.models.tosca.legacy.concepts.LegacyOperationalPolicy;
-import org.onap.policy.models.tosca.legacy.provider.LegacyToscaProvider;
+import org.onap.policy.models.tosca.legacy.provider.LegacyProvider;
import org.onap.policy.models.tosca.simple.concepts.ToscaServiceTemplate;
import org.onap.policy.models.tosca.simple.provider.SimpleToscaProvider;
import org.slf4j.Logger;
@@ -190,53 +190,53 @@ public class DatabasePolicyModelsProviderImpl implements PolicyModelsProvider {
@Override
public LegacyOperationalPolicy getOperationalPolicy(@NonNull final String policyId) throws PfModelException {
assertInitilized();
- return new LegacyToscaProvider().getOperationalPolicy(pfDao, policyId);
+ return new LegacyProvider().getOperationalPolicy(pfDao, policyId);
}
@Override
public LegacyOperationalPolicy createOperationalPolicy(
@NonNull final LegacyOperationalPolicy legacyOperationalPolicy) throws PfModelException {
assertInitilized();
- return new LegacyToscaProvider().createOperationalPolicy(pfDao, legacyOperationalPolicy);
+ return new LegacyProvider().createOperationalPolicy(pfDao, legacyOperationalPolicy);
}
@Override
public LegacyOperationalPolicy updateOperationalPolicy(
@NonNull final LegacyOperationalPolicy legacyOperationalPolicy) throws PfModelException {
assertInitilized();
- return new LegacyToscaProvider().updateOperationalPolicy(pfDao, legacyOperationalPolicy);
+ return new LegacyProvider().updateOperationalPolicy(pfDao, legacyOperationalPolicy);
}
@Override
public LegacyOperationalPolicy deleteOperationalPolicy(@NonNull final String policyId) throws PfModelException {
assertInitilized();
- return new LegacyToscaProvider().deleteOperationalPolicy(pfDao, policyId);
+ return new LegacyProvider().deleteOperationalPolicy(pfDao, policyId);
}
@Override
public LegacyGuardPolicy getGuardPolicy(@NonNull final String policyId) throws PfModelException {
assertInitilized();
- return new LegacyToscaProvider().getGuardPolicy(pfDao, policyId);
+ return new LegacyProvider().getGuardPolicy(pfDao, policyId);
}
@Override
public LegacyGuardPolicy createGuardPolicy(@NonNull final LegacyGuardPolicy legacyGuardPolicy)
throws PfModelException {
assertInitilized();
- return new LegacyToscaProvider().createGuardPolicy(pfDao, legacyGuardPolicy);
+ return new LegacyProvider().createGuardPolicy(pfDao, legacyGuardPolicy);
}
@Override
public LegacyGuardPolicy updateGuardPolicy(@NonNull final LegacyGuardPolicy legacyGuardPolicy)
throws PfModelException {
assertInitilized();
- return new LegacyToscaProvider().updateGuardPolicy(pfDao, legacyGuardPolicy);
+ return new LegacyProvider().updateGuardPolicy(pfDao, legacyGuardPolicy);
}
@Override
public LegacyGuardPolicy deleteGuardPolicy(@NonNull final String policyId) throws PfModelException {
assertInitilized();
- return new LegacyToscaProvider().deleteGuardPolicy(pfDao, policyId);
+ return new LegacyProvider().deleteGuardPolicy(pfDao, policyId);
}
@Override