diff options
Diffstat (limited to 'applications/common/src/main/java')
3 files changed, 18 insertions, 3 deletions
diff --git a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/ToscaDictionary.java b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/ToscaDictionary.java index 1a899971..c8dab3a8 100644 --- a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/ToscaDictionary.java +++ b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/ToscaDictionary.java @@ -106,6 +106,22 @@ public final class ToscaDictionary { new IdentifierImpl(ID_URN_ONAP, "guard:advice:request-id"); /* + * These id's are specifically for optimization subscriber policies + */ + public static final Identifier ID_SUBJECT_OPTIMIZATION_SUBSCRIBER_NAME = + new IdentifierImpl(ID_URN_ONAP, "optimization:subscriber:name"); + + /* + * These ids are specifically for optimization advice + */ + public static final Identifier ID_ADVICE_OPTIMIZATION_SUBSCRIBER = + new IdentifierImpl(ID_URN_ONAP, "optimization:advice:subscriber"); + public static final Identifier ID_ADVICE_OPTIMIZATION_SUBSCRIBER_ROLE = + new IdentifierImpl(ID_URN_ONAP, "optimization:advice:subscriber:role"); + public static final Identifier ID_ADVICE_OPTIMIZATION_SUBSCRIBER_STATUS = + new IdentifierImpl(ID_URN_ONAP, "optimization:advice:subscriber:status"); + + /* * Obligation specific ID's */ diff --git a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchablePolicyRequest.java b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchablePolicyRequest.java index b478e8c1..2d83b897 100644 --- a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchablePolicyRequest.java +++ b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchablePolicyRequest.java @@ -163,7 +163,7 @@ public class StdMatchablePolicyRequest { return mutableRequest; } - private static StdMutableRequestAttributes addResources(StdMutableRequestAttributes attributes, + protected static StdMutableRequestAttributes addResources(StdMutableRequestAttributes attributes, Collection<Object> values, String id) throws DataTypeException { DataTypeFactory factory = getDataTypeFactory(); diff --git a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProvider.java b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProvider.java index 5aea3457..e43e6519 100644 --- a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProvider.java +++ b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProvider.java @@ -121,8 +121,7 @@ public abstract class StdXacmlApplicationServiceProvider implements XacmlApplica // // Convert the policies first // - PolicyType xacmlPolicy = this.getTranslator(toscaPolicy.getType()) - .convertPolicy(toscaPolicy); + PolicyType xacmlPolicy = this.getTranslator(toscaPolicy.getType()).convertPolicy(toscaPolicy); if (xacmlPolicy == null) { throw new ToscaPolicyConversionException("Failed to convert policy"); } |