aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-02-06 16:21:59 +0100
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-02-06 16:21:59 +0100
commit9dc1bebdf768fe33b5c9b983c8072ba5cb16f8a8 (patch)
tree358725480d84a4220c808e07f60269f728915715
parente68b499fab138086c7d5d49363f31e5944765a9a (diff)
Improve code and comments.
Improve the code and comments of the execute method. Issue-ID: CLAMP-74 Change-Id: I74a26f9daf1336aa36f1d31d7ac74e87b370d642 Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
-rw-r--r--src/main/java/org/onap/clamp/clds/client/OperationalPolicyDelegate.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/org/onap/clamp/clds/client/OperationalPolicyDelegate.java b/src/main/java/org/onap/clamp/clds/client/OperationalPolicyDelegate.java
index 58f5e008..e2d16c56 100644
--- a/src/main/java/org/onap/clamp/clds/client/OperationalPolicyDelegate.java
+++ b/src/main/java/org/onap/clamp/clds/client/OperationalPolicyDelegate.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP CLAMP
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
* reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -45,7 +45,7 @@ import org.springframework.beans.factory.annotation.Autowired;
/**
* Send Operational Policy info to policy api. It uses the policy code to define
* the model and communicate with it. See also the PolicyClient class.
- *
+ *
*/
public class OperationalPolicyDelegate implements JavaDelegate {
protected static final EELFLogger logger = EELFManager.getInstance()
@@ -70,19 +70,18 @@ public class OperationalPolicyDelegate implements JavaDelegate {
* @throws BuilderException
* In case of issues with OperationalPolicyReq
* @throws UnsupportedEncodingException
+ * In case of issues with the Charset encoding
*/
@Override
- public void execute(DelegateExecution execution)
- throws BuilderException, UnsupportedEncodingException {
+ public void execute(DelegateExecution execution) throws BuilderException, UnsupportedEncodingException {
String responseMessage = null;
ModelProperties prop = ModelProperties.create(execution);
Policy policy = prop.getType(Policy.class);
if (policy.isFound()) {
for (PolicyChain policyChain : prop.getType(Policy.class).getPolicyChains()) {
- String operationalPolicyRequestUuid = LoggingUtils.getRequestId();
Map<AttributeType, Map<String, String>> attributes = OperationalPolicyReq.formatAttributes(refProp,
prop, prop.getType(Policy.class).getId(), policyChain);
- responseMessage = policyClient.sendBrmsPolicy(attributes, prop, operationalPolicyRequestUuid);
+ responseMessage = policyClient.sendBrmsPolicy(attributes, prop, LoggingUtils.getRequestId());
}
if (responseMessage != null) {
execution.setVariable("operationalPolicyResponseMessage", responseMessage.getBytes());