2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
6 * Modifications Copyright (C) 2019 Bell Canada
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
22 package org.onap.policy.controller;
24 import com.fasterxml.jackson.databind.DeserializationFeature;
25 import com.fasterxml.jackson.databind.JsonNode;
26 import com.fasterxml.jackson.databind.ObjectMapper;
28 import java.io.UnsupportedEncodingException;
29 import java.net.URLEncoder;
30 import java.util.ArrayList;
31 import java.util.Arrays;
32 import java.util.Collection;
33 import java.util.LinkedHashMap;
34 import java.util.List;
36 import java.util.Objects;
37 import java.util.stream.IntStream;
40 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AllOfType;
41 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AnyOfType;
42 import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicyType;
43 import oasis.names.tc.xacml._3_0.core.schema.wd_17.TargetType;
45 import org.onap.policy.common.logging.flexlogger.FlexLogger;
46 import org.onap.policy.common.logging.flexlogger.Logger;
47 import org.onap.policy.rest.adapter.ClosedLoopFaultBody;
48 import org.onap.policy.rest.adapter.ClosedLoopFaultTrapDatas;
49 import org.onap.policy.rest.adapter.ClosedLoopFaultTriggerUISignatures;
50 import org.onap.policy.rest.adapter.ClosedLoopSignatures;
51 import org.onap.policy.rest.adapter.PolicyRestAdapter;
52 import org.onap.policy.rest.dao.CommonClassDao;
53 import org.onap.policy.rest.jpa.PolicyEntity;
54 import org.onap.policy.rest.jpa.VarbindDictionary;
55 import org.onap.policy.utils.PolicyUtils;
56 import org.onap.portalsdk.core.controller.RestrictedBaseController;
57 import org.springframework.beans.factory.annotation.Autowired;
58 import org.springframework.stereotype.Controller;
59 import org.springframework.web.bind.annotation.RequestMapping;
63 public class CreateClosedLoopFaultController extends RestrictedBaseController {
65 private static final Logger policyLogger = FlexLogger.getLogger(CreateClosedLoopFaultController.class);
66 private static final String FAULT = "Fault";
67 private static final String TRAP = "Trap";
68 private static final String NOT_BOX = "notBox";
69 private static final String OPERATOR_BOX = "operatorBox";
70 private static final String CONNECT_TRAP_1 = "connectTrap1";
71 private static final String TRAP_COUNT_1 = "trapCount1";
72 private static final String CONNECT_TRAP_2 = "connectTrap2";
73 private static final String TRAP_COUNT_2 = "trapCount2";
74 private static final String TRIGGER_1 = "trigger1";
75 private static final String TRIGGER_2 = "trigger2";
77 protected PolicyRestAdapter policyAdapter = null;
79 private static CommonClassDao commonclassdao;
82 private CreateClosedLoopFaultController(CommonClassDao commonclassdao) {
83 CreateClosedLoopFaultController.commonclassdao = commonclassdao;
86 public CreateClosedLoopFaultController() {
91 * setDataToPolicyRestAdapter.
93 * @param policyData PolicyRestAdapter
94 * @param root JsonNode
95 * @return PolicyRestAdapter
97 public PolicyRestAdapter setDataToPolicyRestAdapter(PolicyRestAdapter policyData, JsonNode root) {
99 ObjectMapper mapper = new ObjectMapper();
100 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
101 final ClosedLoopFaultTrapDatas trapDatas =
102 mapper.readValue(root.get("trapData").toString(), ClosedLoopFaultTrapDatas.class);
103 final ClosedLoopFaultTrapDatas faultDatas =
104 mapper.readValue(root.get("faultData").toString(), ClosedLoopFaultTrapDatas.class);
105 final ClosedLoopGridJsonData policyJsonData =
106 mapper.readValue(root.get("policyData").get("policy").toString(), ClosedLoopGridJsonData.class);
107 final ClosedLoopFaultBody jsonBody = mapper.readValue(
108 root.get("policyData").get("policy").get("jsonBodyData").toString(), ClosedLoopFaultBody.class);
110 // Build trapSignatureDatas list from faultData
111 List<Object> trapSignatureDatas = new ArrayList<>();
112 if (trapDatas.getTrap1() != null) {
113 trapSignatureDatas.add(trapDatas);
115 // Extract resultBody and set jsonBody with trap ClosedLoopSignatures
116 String resultBody = getResultBody(policyJsonData, trapSignatureDatas);
117 ClosedLoopSignatures triggerSignatures = new ClosedLoopSignatures();
118 triggerSignatures.setSignatures(resultBody);
119 if (policyData.getClearTimeOut() != null) {
120 triggerSignatures.setTimeWindow(Integer.parseInt(policyData.getClearTimeOut()));
121 triggerSignatures.setTrapMaxAge(Integer.parseInt(policyData.getTrapMaxAge()));
122 ClosedLoopFaultTriggerUISignatures uiTriggerSignatures = new ClosedLoopFaultTriggerUISignatures();
123 if (!trapSignatureDatas.isEmpty()) {
124 uiTriggerSignatures.setSignatures(getUiTriggerSignature(TRAP, trapSignatureDatas.get(0)));
125 if (!policyJsonData.getConnecttriggerSignatures().isEmpty()) {
127 .setConnectSignatures(getUiConnectTraps(policyJsonData.getConnecttriggerSignatures()));
130 jsonBody.setTriggerSignaturesUsedForUI(uiTriggerSignatures);
131 jsonBody.setTriggerTimeWindowUsedForUI(Integer.parseInt(policyData.getClearTimeOut()));
132 jsonBody.setTrapMaxAge(Integer.parseInt(policyData.getTrapMaxAge()));
135 jsonBody.setTriggerSignatures(triggerSignatures);
137 // Build faultSignatureData list from faultData
138 List<Object> faultSignatureDatas = new ArrayList<>();
139 if (faultDatas.getTrap1() != null) {
140 faultSignatureDatas.add(faultDatas);
142 // Extract faultBody and set jsonBody with fault ClosedLoopSignatures
143 String faultBody = getFaultBody(policyJsonData, faultSignatureDatas);
144 ClosedLoopSignatures faultSignatures = new ClosedLoopSignatures();
145 faultSignatures.setSignatures(faultBody);
146 if (policyData.getVerificationclearTimeOut() != null) {
147 faultSignatures.setTimeWindow(Integer.parseInt(policyData.getVerificationclearTimeOut()));
148 ClosedLoopFaultTriggerUISignatures uifaultSignatures = new ClosedLoopFaultTriggerUISignatures();
149 if (!faultSignatureDatas.isEmpty()) {
150 uifaultSignatures.setSignatures(getUiTriggerSignature(FAULT, faultSignatureDatas.get(0)));
151 if (!policyJsonData.getConnectVerificationSignatures().isEmpty()) {
152 uifaultSignatures.setConnectSignatures(
153 getUiConnectTraps(policyJsonData.getConnectVerificationSignatures()));
156 jsonBody.setVerificationSignaturesUsedForUI(uifaultSignatures);
157 jsonBody.setVerificationTimeWindowUsedForUI(Integer.parseInt(policyData.getVerificationclearTimeOut()));
159 jsonBody.setVerificationSignatures(faultSignatures);
160 policyData.setJsonBody(new ObjectMapper().writer().writeValueAsString(jsonBody));
162 } catch (Exception e) {
163 policyLogger.error("Exception Occured while setting data to Adapter", e);
168 // TODO: Can getResultBody() and getFaultBody() be merged?
169 private String getResultBody(final ClosedLoopGridJsonData policyJsonData, final List<Object> trapSignatureDatas) {
170 StringBuilder resultBody = new StringBuilder();
171 if (!policyJsonData.getConnecttriggerSignatures().isEmpty()) {
172 resultBody.append("(");
173 IntStream.range(0, policyJsonData.getConnecttriggerSignatures().size())
174 .mapToObj(i -> connectTriggerSignature(i, policyJsonData.getConnecttriggerSignatures(),
175 trapSignatureDatas.get(0)))
176 .forEach(resultBody::append);
177 resultBody.append(resultBody).append(")");
179 if (!trapSignatureDatas.isEmpty()) {
180 resultBody.append(callTrap("nill", trapSignatureDatas.get(0)));
183 return resultBody.toString();
186 private String getFaultBody(final ClosedLoopGridJsonData policyJsonData, final List<Object> faultSignatureDatas) {
187 StringBuilder faultBody = new StringBuilder();
188 if (!policyJsonData.getConnectVerificationSignatures().isEmpty()) {
189 faultBody.append("(");
190 IntStream.range(0, policyJsonData.getConnectVerificationSignatures().size())
191 .mapToObj(i -> connectTriggerSignature(i, policyJsonData.getConnectVerificationSignatures(),
192 faultSignatureDatas.get(0)))
193 .forEach(faultBody::append);
194 faultBody.append(")");
196 if (!faultSignatureDatas.isEmpty()) {
197 faultBody.append(callTrap("nill", faultSignatureDatas.get(0)));
200 return faultBody.toString();
203 @SuppressWarnings("unchecked")
204 private String connectTriggerSignature(int index, List<Object> triggerSignatures, Object object) {
205 StringBuilder resultBody = new StringBuilder();
206 Map<String, String> connectTraps = (Map<String, String>) triggerSignatures.get(index);
209 if (connectTraps.keySet().contains(NOT_BOX)) {
210 notBox = connectTraps.get(NOT_BOX);
212 resultBody.append("(").append(notBox);
213 } catch (NullPointerException e) {
214 policyLogger.info("General error", e);
215 resultBody.append("(");
219 // Append connectTrap1 body to resultBody
220 appendTrapToResultBody(triggerSignatures, object, resultBody, connectTraps, CONNECT_TRAP_1);
222 // Update trap1 count to resultBody
223 String trapCount1 = connectTraps.get(TRAP_COUNT_1);
224 resultBody.append(", Time = ").append(trapCount1).append(")");
226 // Append connectTrap2 body to resultBody
227 appendTrapToResultBody(triggerSignatures, object, resultBody, connectTraps, CONNECT_TRAP_2);
229 // Update operatorBox to resultBody
230 String operatorBox = connectTraps.get(OPERATOR_BOX);
231 resultBody.append(operatorBox).append("(");
233 // Update trap2 count to resultBody
234 String trapCount2 = connectTraps.get(TRAP_COUNT_2);
235 resultBody.append(", Time = ").append(trapCount2).append(")");
236 } catch (NullPointerException e) {
237 policyLogger.info("General error", e);
239 return resultBody.toString();
242 private void appendTrapToResultBody(List<Object> triggerSignatures, Object object, StringBuilder resultBody,
243 Map<String, String> connectTraps, String connectTrapName) {
244 String connectTrap = connectTraps.get(connectTrapName);
245 if (connectTrap.startsWith(TRAP) || connectTrap.startsWith(FAULT)) {
246 String trapBody = callTrap(connectTrap, object);
247 resultBody.append(trapBody);
248 } else if (connectTrap.startsWith("C")) {
249 for (int i = 0; i <= triggerSignatures.size(); i++) {
250 Map<String, String> triggerSignature = (Map<String, String>) triggerSignatures.get(i);
251 if (triggerSignature.get("id").equals(connectTrap)) {
252 resultBody.append("(");
253 String connectBody = connectTriggerSignature(i, triggerSignatures, object);
254 resultBody.append(connectBody).append(")");
255 } else { // FIXME: Is this a bug and can it be removed?
262 private String callTrap(String trap, Object object) {
263 String signatureBody = "";
264 ClosedLoopFaultTrapDatas trapDatas = (ClosedLoopFaultTrapDatas) object;
265 List<Object> attributeList = new ArrayList<>();
267 if (!"nill".equals(trap)) {
268 List<String> trapTypes = new ArrayList<>();
269 if (trap.startsWith(TRAP)) {
270 trapTypes = Arrays.asList("Trap1", "Trap2", "Trap3", "Trap4", "Trap5", "Trap6");
271 } else if (trap.startsWith(FAULT)) {
272 trapTypes = Arrays.asList("Fault1", "Fault2", "Fault3", "Fault4", "Fault5", "Fault6");
275 if (trapTypes.get(0).equals(trap)) {
276 attributeList = trapDatas.getTrap1();
277 } else if (trapTypes.get(1).equals(trap)) {
278 attributeList = trapDatas.getTrap2();
279 } else if (trapTypes.get(2).equals(trap)) {
280 attributeList = trapDatas.getTrap3();
281 } else if (trapTypes.get(3).equals(trap)) {
282 attributeList = trapDatas.getTrap4();
283 } else if (trapTypes.get(4).equals(trap)) {
284 attributeList = trapDatas.getTrap5();
285 } else if (trapTypes.get(5).equals(trap)) {
286 attributeList = trapDatas.getTrap6();
288 } catch (Exception e) {
289 policyLogger.warn("Error during callTrap", e);
290 return "(" + trap + ")";
293 if (trapDatas.getTrap1() == null) {
296 attributeList = trapDatas.getTrap1();
298 signatureBody = signatureBody + "(" + readAttributes(attributeList, attributeList.size() - 1) + ")";
299 return signatureBody;
302 @SuppressWarnings("unchecked")
303 private String readAttributes(List<Object> object, int index) {
304 String attributes = "";
305 Map<String, String> trapSignatures = (Map<String, String>) object.get(index);
306 // Read the Elements.
308 if (trapSignatures.keySet().contains(NOT_BOX)) {
309 notBox = trapSignatures.get(NOT_BOX);
311 if (notBox != null) {
312 attributes = attributes + notBox.toString();
315 // Get Attributes for trap1 name
316 Object trapName1 = trapSignatures.get(TRIGGER_1);
317 if (trapName1 == null) {
320 attributes = getTrapAttributesString(object, attributes, trapName1);
322 Object comboBox = trapSignatures.get(OPERATOR_BOX);
323 if (comboBox != null) {
324 attributes = attributes + comboBox.toString();
329 // Get Attributes for trap1 name
330 Object trapName2 = trapSignatures.get(TRIGGER_2);
331 if (trapName2 != null) {
332 attributes = getTrapAttributesString(object, attributes, trapName2);
337 private String getTrapAttributesString(List<Object> objectList, String attributesStr, Object trapName) {
338 String trap1Attrib = trapName.toString();
339 if (trap1Attrib.startsWith("A")) {
341 int iy = Integer.parseInt(trap1Attrib.substring(1)) - 1;
342 attributesStr = attributesStr + "(" + readAttributes(objectList, iy) + ")";
343 } catch (NumberFormatException e) {
345 trap1Attrib = getVarbindOid(trap1Attrib);
346 attributesStr = attributesStr + "(" + URLEncoder.encode(trap1Attrib,
347 PolicyUtils.CHARACTER_ENCODING) + ")";
348 } catch (UnsupportedEncodingException e1) {
349 policyLogger.error("Caused Exception while Encoding Varbind Dictionary Values", e1);
354 trap1Attrib = getVarbindOid(trap1Attrib);
355 attributesStr = attributesStr + "(" + URLEncoder.encode(trap1Attrib,
356 PolicyUtils.CHARACTER_ENCODING) + ")";
357 } catch (UnsupportedEncodingException e) {
358 policyLogger.error("Caused Exception while Encoding Varbind Dictionary Values", e);
361 return attributesStr;
364 private String getVarbindOid(String attrib) {
365 VarbindDictionary varbindId;
368 (VarbindDictionary) commonclassdao.getEntityItem(VarbindDictionary.class, "varbindName", attrib);
369 return varbindId.getVarbindOid();
370 } catch (Exception e) {
371 policyLogger.error("Error during retrieving varbindName " + attrib, e);
376 // connect traps data set to JSON Body as String
377 @SuppressWarnings({"unchecked", "rawtypes"})
378 private String getUiConnectTraps(List<Object> connectTrapSignatures) {
379 StringBuilder resultBody = new StringBuilder();
380 String connectMainBody = "";
381 for (Object connectTrapSignature : connectTrapSignatures) {
382 Map<String, String> connectTraps = (Map<String, String>) connectTrapSignature;
383 String connectBody = "";
384 if (connectTraps instanceof LinkedHashMap<?, ?>) {
386 String connectTrap1 = "";
387 String trapCount1 = "";
388 String operatorBox = "";
389 String connectTrap2 = "";
390 String trapCount2 = "";
391 if (((LinkedHashMap) connectTraps).keySet().contains(NOT_BOX)) {
392 notBox = ((LinkedHashMap) connectTraps).get(NOT_BOX).toString();
394 if (((LinkedHashMap) connectTraps).get(CONNECT_TRAP_1) != null) {
395 connectTrap1 = ((LinkedHashMap) connectTraps).get(CONNECT_TRAP_1).toString();
397 if (((LinkedHashMap) connectTraps).get(TRAP_COUNT_1) != null) {
398 trapCount1 = ((LinkedHashMap) connectTraps).get(TRAP_COUNT_1).toString();
400 if (((LinkedHashMap) connectTraps).get(OPERATOR_BOX) != null) {
401 operatorBox = ((LinkedHashMap) connectTraps).get(OPERATOR_BOX).toString();
403 if (((LinkedHashMap) connectTraps).get(CONNECT_TRAP_2) != null) {
404 connectTrap2 = ((LinkedHashMap) connectTraps).get(CONNECT_TRAP_2).toString();
406 if (((LinkedHashMap) connectTraps).get(TRAP_COUNT_2) != null) {
407 trapCount2 = ((LinkedHashMap) connectTraps).get(TRAP_COUNT_2).toString();
409 connectBody = notBox + "@!" + connectTrap1 + "@!" + trapCount1 + "@!" + operatorBox + "@!"
410 + connectTrap2 + "@!" + trapCount2 + "#!?!";
412 resultBody.append(connectBody);
414 connectMainBody = connectMainBody + resultBody;
415 return connectMainBody;
418 // get Trigger signature from JSON body
419 private String getUiTriggerSignature(String trap, Object object2) {
420 ClosedLoopFaultTrapDatas trapDatas = (ClosedLoopFaultTrapDatas) object2;
421 List<Object> attributeList = new ArrayList<>();
423 if (trap.startsWith(TRAP) || trap.startsWith(FAULT)) {
424 if (trapDatas.getTrap1() != null) {
425 attributeList.add(trapDatas.getTrap1());
427 if (trapDatas.getTrap2() != null) {
428 attributeList.add(trapDatas.getTrap2());
430 if (trapDatas.getTrap3() != null) {
431 attributeList.add(trapDatas.getTrap3());
433 if (trapDatas.getTrap4() != null) {
434 attributeList.add(trapDatas.getTrap4());
436 if (trapDatas.getTrap5() != null) {
437 attributeList.add(trapDatas.getTrap5());
439 if (trapDatas.getTrap6() != null) {
440 attributeList.add(trapDatas.getTrap6());
443 return getTriggerBody(attributeList);
446 @SuppressWarnings({"rawtypes", "unchecked"})
447 private String getTriggerBody(final List<Object> attributeList) {
448 StringBuilder triggerBody = new StringBuilder();
449 for (Object o : attributeList) {
450 StringBuilder signatureBody = new StringBuilder();
451 List<Object> connectTraps = (ArrayList<Object>) o;
452 for (Object connectTrap : connectTraps) {
453 String connectBody = "";
454 if (connectTrap instanceof LinkedHashMap<?, ?>) {
456 String trigger1 = "";
457 String operatorBox = "";
458 String trigger2 = "";
459 if (((LinkedHashMap) connectTrap).keySet().contains(NOT_BOX)) {
460 notBox = ((LinkedHashMap) connectTrap).get(NOT_BOX).toString();
462 if (((LinkedHashMap) connectTrap).get(TRIGGER_1) != null) {
463 trigger1 = ((LinkedHashMap) connectTrap).get(TRIGGER_1).toString();
465 if (((LinkedHashMap) connectTrap).get(OPERATOR_BOX) != null) {
466 operatorBox = ((LinkedHashMap) connectTrap).get(OPERATOR_BOX).toString();
468 if (((LinkedHashMap) connectTrap).get(TRIGGER_2) != null) {
469 trigger2 = ((LinkedHashMap) connectTrap).get(TRIGGER_2).toString();
471 connectBody = notBox + "@!" + trigger1 + "@!" + operatorBox + "@!" + trigger2 + "#!";
473 signatureBody.append(connectBody);
475 triggerBody.append(signatureBody).append("?!");
477 return triggerBody.toString();
481 * prePopulateClosedLoopFaultPolicyData.
483 * @param policyAdapter PolicyRestAdapter
484 * @param entity PolicyEntity
486 public void prePopulateClosedLoopFaultPolicyData(PolicyRestAdapter policyAdapter, PolicyEntity entity) {
487 if (! (policyAdapter.getPolicyData() instanceof PolicyType)) {
490 PolicyType policy = (PolicyType) policyAdapter.getPolicyData();
492 // Set PolicyAdapter policyName, description
493 setPolicyAdapterPolicyNameAndDescription(policyAdapter, policy);
495 // Set PolicyAdapter JsonBodyData, timeout settings
496 setClosedLoopJsonFile(policyAdapter, entity);
498 // Get the target data under policy.
499 TargetType target = policy.getTarget();
500 if (target == null) {
504 // Set PolicyAdapter OnapNameField, riskType, riskLevel, guard, ttlDate from match attributes
505 setPolicyAdapterMatchAttributes(policyAdapter, target.getAnyOf());
508 private void setPolicyAdapterMatchAttributes(PolicyRestAdapter policyAdapter, List<AnyOfType> anyOfList) {
510 // Extract nonNull list of AllOfType objs from each AnyOfType obj
511 .map(AnyOfType::getAllOf).filter(Objects::nonNull).forEach(allOfList ->
512 // Extract nonNull list of MatchType objs from each AllOFType obj
513 allOfList.stream().map(AllOfType::getMatch).filter(Objects::nonNull).flatMap(Collection::stream)
515 // Under the match we have attribute value and
516 // attributeDesignator. So,finally down to the actual attribute.
517 policyAdapter.setupUsingAttribute(match.getAttributeDesignator().getAttributeId(),
518 (String) match.getAttributeValue().getContent().get(0));
522 private void setPolicyAdapterPolicyNameAndDescription(PolicyRestAdapter policyAdapter, PolicyType policy) {
523 policyAdapter.setOldPolicyFileName(policyAdapter.getPolicyName());
524 String policyNameValue =
525 policyAdapter.getPolicyName().substring(policyAdapter.getPolicyName().indexOf("Fault_") + 6);
526 policyAdapter.setPolicyName(policyNameValue);
529 description = policy.getDescription().substring(0, policy.getDescription().indexOf("@CreatedBy:"));
530 } catch (Exception e) {
532 "Error during collecting the description tag info for createClosedLoopFault " + policyNameValue, e);
533 description = policy.getDescription();
535 policyAdapter.setPolicyDescription(description);
538 private void setClosedLoopJsonFile(PolicyRestAdapter policyAdapter, PolicyEntity entity) {
540 ClosedLoopFaultBody closedLoopBody =
541 new ObjectMapper().readValue(entity.getConfigurationData().getConfigBody(),
542 ClosedLoopFaultBody.class);
543 if ("ACTIVE".equalsIgnoreCase(closedLoopBody.getClosedLoopPolicyStatus())) {
544 closedLoopBody.setClosedLoopPolicyStatus("Active");
546 closedLoopBody.setClosedLoopPolicyStatus("InActive");
548 policyAdapter.setJsonBodyData(closedLoopBody);
549 if (closedLoopBody.getTrapMaxAge() != null) {
550 policyAdapter.setTrapMaxAge(closedLoopBody.getTrapMaxAge().toString());
552 if (closedLoopBody.getTriggerTimeWindowUsedForUI() != null) {
553 policyAdapter.setClearTimeOut(closedLoopBody.getTriggerTimeWindowUsedForUI().toString());
555 if (closedLoopBody.getVerificationTimeWindowUsedForUI() != null) {
557 .setVerificationclearTimeOut(closedLoopBody.getVerificationTimeWindowUsedForUI().toString());
559 } catch (Exception e) {
560 policyLogger.error("Exception Occured" + e);
568 class ClosedLoopGridJsonData {
570 private String clearTimeOut;
571 private String trapMaxAge;
572 private String verificationclearTimeOut;
573 private List<Object> connecttriggerSignatures;
574 private List<Object> connectVerificationSignatures;