diff options
author | liamfallon <liam.fallon@est.tech> | 2021-01-04 13:47:42 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2021-01-04 16:19:42 +0000 |
commit | f4a86b5bc37350c15c62544cea5e22ce7b6f931b (patch) | |
tree | e3ee53a4459a7d690918613399565951014ed71f /tutorials/tutorial-xacml-application/src | |
parent | e15fe6da7b38df5e6003006acc8f166653685d85 (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: Id614bbed34ed8897e7e882b70147b98ffe90bf57
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'tutorials/tutorial-xacml-application/src')
-rw-r--r-- | tutorials/tutorial-xacml-application/src/main/java/org/onap/policy/tutorial/tutorial/TutorialApplication.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tutorials/tutorial-xacml-application/src/main/java/org/onap/policy/tutorial/tutorial/TutorialApplication.java b/tutorials/tutorial-xacml-application/src/main/java/org/onap/policy/tutorial/tutorial/TutorialApplication.java index 3c76494b..5d486c42 100644 --- a/tutorials/tutorial-xacml-application/src/main/java/org/onap/policy/tutorial/tutorial/TutorialApplication.java +++ b/tutorials/tutorial-xacml-application/src/main/java/org/onap/policy/tutorial/tutorial/TutorialApplication.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2021 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,14 +21,14 @@ package org.onap.policy.tutorial.tutorial; import java.util.Arrays; import java.util.List; -import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; import org.onap.policy.pdp.xacml.application.common.ToscaPolicyTranslator; import org.onap.policy.pdp.xacml.application.common.std.StdXacmlApplicationServiceProvider; public class TutorialApplication extends StdXacmlApplicationServiceProvider { - private final ToscaPolicyTypeIdentifier supportedPolicyType = - new ToscaPolicyTypeIdentifier("onap.policies.Authorization", "1.0.0"); + private final ToscaConceptIdentifier supportedPolicyType = + new ToscaConceptIdentifier("onap.policies.Authorization", "1.0.0"); private final TutorialTranslator translator = new TutorialTranslator(); @Override @@ -41,12 +42,12 @@ public class TutorialApplication extends StdXacmlApplicationServiceProvider { } @Override - public synchronized List<ToscaPolicyTypeIdentifier> supportedPolicyTypes() { + public synchronized List<ToscaConceptIdentifier> supportedPolicyTypes() { return Arrays.asList(supportedPolicyType); } @Override - public boolean canSupportPolicyType(ToscaPolicyTypeIdentifier policyTypeId) { + public boolean canSupportPolicyType(ToscaConceptIdentifier policyTypeId) { return supportedPolicyType.equals(policyTypeId); } |