X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-XACML%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fxacml%2Fstd%2Fpip%2Fengines%2FOperationHistoryEngine.java;h=355a6f644bc658548c0bf0bfb2d38e4fc914c457;hb=cd417e811577a3efd26a57c3cad3a48d42d9e2d6;hp=d393d7edb7d730f9dbb36eec275ee4aba4b66e98;hpb=663ed59389f1e1125a659f2e55dbe3c3a30d3ea9;p=policy%2Fengine.git diff --git a/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pip/engines/OperationHistoryEngine.java b/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pip/engines/OperationHistoryEngine.java index d393d7edb..355a6f644 100644 --- a/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pip/engines/OperationHistoryEngine.java +++ b/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pip/engines/OperationHistoryEngine.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-XACML * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -80,6 +80,10 @@ public class OperationHistoryEngine extends StdConfigurableEngine{ XACML3.ID_ATTRIBUTE_CATEGORY_RESOURCE, new IdentifierImpl("target"), XACML.ID_DATATYPE_STRING); + + public OperationHistoryEngine() { + super(); + } private void addIntegerAttribute(StdMutablePIPResponse stdPIPResponse, Identifier category, Identifier attributeId, int value, PIPRequest pipRequest) { AttributeValue attributeValue = null; @@ -93,10 +97,6 @@ public class OperationHistoryEngine extends StdConfigurableEngine{ } } - public OperationHistoryEngine() { - super(); - } - @Override public Collection attributesRequired() { return new ArrayList<>(); @@ -290,8 +290,8 @@ public class OperationHistoryEngine extends StdConfigurableEngine{ // Validating Time Units to prevent SQL Injection. private static boolean validTimeUnits(String timeUnits) { - return (timeUnits.equalsIgnoreCase("minute") || timeUnits.equalsIgnoreCase("hour") || timeUnits.equalsIgnoreCase("day") - || timeUnits.equalsIgnoreCase("week") || timeUnits.equalsIgnoreCase("month")||timeUnits.equalsIgnoreCase("year"))? + return ("minute".equalsIgnoreCase(timeUnits) || "hour".equalsIgnoreCase(timeUnits) || "day".equalsIgnoreCase(timeUnits) + || "week".equalsIgnoreCase(timeUnits) || "month".equalsIgnoreCase(timeUnits)|| "year".equalsIgnoreCase(timeUnits))? true: false; } }