diff options
Diffstat (limited to 'applications/guard')
4 files changed, 6 insertions, 13 deletions
diff --git a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java index 92e0301d..eb793f69 100644 --- a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java +++ b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java @@ -50,6 +50,7 @@ import org.onap.policy.models.decisions.concepts.DecisionResponse; import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy; import org.onap.policy.pdp.xacml.application.common.ToscaPolicyConversionException; import org.onap.policy.pdp.xacml.application.common.ToscaPolicyTranslator; +import org.onap.policy.pdp.xacml.application.common.XacmlPolicyUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -153,7 +154,7 @@ public class CoordinationGuardTranslator implements ToscaPolicyTranslator { return stream.map(s -> s.replaceAll("UNIQUE_ID", uniqueId)) .map(s -> s.replaceAll("CONTROL_LOOP_ONE", cLOne)) .map(s -> s.replaceAll("CONTROL_LOOP_TWO", cLTwo)) - .collect(Collectors.joining(System.lineSeparator())); + .collect(Collectors.joining(XacmlPolicyUtils.LINE_SEPARATOR)); } catch (IOException e) { throw new ToscaPolicyConversionException("Error while generating XACML policy for coordination directive", e); diff --git a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/LegacyGuardTranslator.java b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/LegacyGuardTranslator.java index 3ccbd9cd..0cb06ea0 100644 --- a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/LegacyGuardTranslator.java +++ b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/LegacyGuardTranslator.java @@ -342,10 +342,6 @@ public class LegacyGuardTranslator implements ToscaPolicyTranslator { // permit.setCondition(condition); // - // TODO Add the advice - Is the request id needed to be returned? - // - // permit . setAdviceExpressions (adviceExpressions) - // // Done // return permit; @@ -400,10 +396,6 @@ public class LegacyGuardTranslator implements ToscaPolicyTranslator { // permit.setCondition(createCondition(timeRange, minApply, maxApply)); // - // TODO Add the advice - Is the request id needed to be returned? - // - // permit . setAdviceExpressions (adviceExpressions) - // // Done // return permit; diff --git a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/CoordinationTest.java b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/CoordinationTest.java index efa0bdc9..c75156df 100644 --- a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/CoordinationTest.java +++ b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/CoordinationTest.java @@ -106,7 +106,7 @@ public class CoordinationTest { // // Find the guard service application and save for use in all the tests // - StringBuilder strDump = new StringBuilder("Loaded applications:" + System.lineSeparator()); + StringBuilder strDump = new StringBuilder("Loaded applications:" + XacmlPolicyUtils.LINE_SEPARATOR); Iterator<XacmlApplicationServiceProvider> iterator = applicationLoader.iterator(); while (iterator.hasNext()) { XacmlApplicationServiceProvider application = iterator.next(); @@ -123,7 +123,7 @@ public class CoordinationTest { strDump.append(application.applicationName()); strDump.append(" supports "); strDump.append(application.supportedPolicyTypes()); - strDump.append(System.lineSeparator()); + strDump.append(XacmlPolicyUtils.LINE_SEPARATOR); } LOGGER.info("{}", strDump); // diff --git a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java index 7435fb96..9c3ae5b2 100644 --- a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java +++ b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java @@ -104,7 +104,7 @@ public class GuardPdpApplicationTest { // // Find the guard service application and save for use in all the tests // - StringBuilder strDump = new StringBuilder("Loaded applications:" + System.lineSeparator()); + StringBuilder strDump = new StringBuilder("Loaded applications:" + XacmlPolicyUtils.LINE_SEPARATOR); Iterator<XacmlApplicationServiceProvider> iterator = applicationLoader.iterator(); while (iterator.hasNext()) { XacmlApplicationServiceProvider application = iterator.next(); @@ -121,7 +121,7 @@ public class GuardPdpApplicationTest { strDump.append(application.applicationName()); strDump.append(" supports "); strDump.append(application.supportedPolicyTypes()); - strDump.append(System.lineSeparator()); + strDump.append(XacmlPolicyUtils.LINE_SEPARATOR); } LOGGER.info("{}", strDump); // |