From d85e766c5538de762820132ac723d928f5a9bf89 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 21 Sep 2018 09:31:25 -0400 Subject: new sonar issues in drools-applications Don't return null lists from AAI. Transient TargetLock. Extract aai.url, et. al., constants. Don't allocate extra unneeded variable. Re-order fields in xacml attributes. Extract "vserver" constant from simulator. Replace thread sleep with join. Change-Id: Iee1bd182862632af1f131cca5db5b526f5865b9f Issue-ID: POLICY-1129 Signed-off-by: Jim Hahn --- .../guard/PolicyGuardXacmlRequestAttributes.java | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'controlloop/common/guard/src/main/java') diff --git a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlRequestAttributes.java b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlRequestAttributes.java index 6b17af804..d7e608cb8 100644 --- a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlRequestAttributes.java +++ b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlRequestAttributes.java @@ -28,6 +28,24 @@ import com.att.research.xacml.std.annotations.XACMLSubject; @XACMLRequest(ReturnPolicyIdList = true, CombinedDecision = true) public class PolicyGuardXacmlRequestAttributes { + @XACMLSubject(includeInResults = true, attributeId = "urn:oasis:names:tc:xacml:1.0:clname:clname-id") + String clnameID; + + @XACMLSubject(includeInResults = true, attributeId = "urn:oasis:names:tc:xacml:1.0:actor:actor-id") + String actorID; + + @XACMLAction(includeInResults = true, attributeId = "urn:oasis:names:tc:xacml:1.0:operation:operation-id") + String operationID; + + @XACMLResource(includeInResults = true, attributeId = "urn:oasis:names:tc:xacml:1.0:target:target-id") + String targetID; + + @XACMLResource(includeInResults = true, attributeId = "urn:oasis:names:tc:xacml:1.0:request:request-id") + String requestID; + + @XACMLResource(includeInResults = true, attributeId = "urn:oasis:names:tc:xacml:1.0:request:vf-count") + Integer vfCount; + /** * Construct an instance. * @@ -55,24 +73,6 @@ public class PolicyGuardXacmlRequestAttributes { + targetID + ", requestID=" + requestID + "]"; } - @XACMLSubject(includeInResults = true, attributeId = "urn:oasis:names:tc:xacml:1.0:clname:clname-id") - String clnameID; - - @XACMLSubject(includeInResults = true, attributeId = "urn:oasis:names:tc:xacml:1.0:actor:actor-id") - String actorID; - - @XACMLAction(includeInResults = true, attributeId = "urn:oasis:names:tc:xacml:1.0:operation:operation-id") - String operationID; - - @XACMLResource(includeInResults = true, attributeId = "urn:oasis:names:tc:xacml:1.0:target:target-id") - String targetID; - - @XACMLResource(includeInResults = true, attributeId = "urn:oasis:names:tc:xacml:1.0:request:request-id") - String requestID; - - @XACMLResource(includeInResults = true, attributeId = "urn:oasis:names:tc:xacml:1.0:request:vf-count") - Integer vfCount; - public String getActorID() { return actorID; } -- cgit 1.2.3-korg