2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.controller;
24 import java.io.UnsupportedEncodingException;
25 import java.net.URLEncoder;
26 import java.util.ArrayList;
27 import java.util.Iterator;
28 import java.util.LinkedHashMap;
29 import java.util.List;
32 import org.onap.policy.common.logging.flexlogger.FlexLogger;
33 import org.onap.policy.common.logging.flexlogger.Logger;
34 import org.onap.policy.rest.adapter.ClosedLoopFaultBody;
35 import org.onap.policy.rest.adapter.ClosedLoopFaultTriggerUISignatures;
36 import org.onap.policy.rest.adapter.ClosedLoopSignatures;
37 import org.onap.policy.rest.adapter.PolicyRestAdapter;
38 import org.onap.policy.rest.dao.CommonClassDao;
39 import org.onap.policy.rest.jpa.OnapName;
40 import org.onap.policy.rest.jpa.PolicyEntity;
41 import org.onap.policy.rest.jpa.VarbindDictionary;
42 import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
43 import org.springframework.beans.factory.annotation.Autowired;
44 import org.springframework.stereotype.Controller;
45 import org.springframework.web.bind.annotation.RequestMapping;
47 import com.fasterxml.jackson.databind.DeserializationFeature;
48 import com.fasterxml.jackson.databind.JsonNode;
49 import com.fasterxml.jackson.databind.ObjectMapper;
50 import com.fasterxml.jackson.databind.ObjectWriter;
52 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AllOfType;
53 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AnyOfType;
54 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType;
55 import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeValueType;
56 import oasis.names.tc.xacml._3_0.core.schema.wd_17.MatchType;
57 import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicyType;
58 import oasis.names.tc.xacml._3_0.core.schema.wd_17.TargetType;
62 public class CreateClosedLoopFaultController extends RestrictedBaseController{
64 private static final Logger policyLogger = FlexLogger.getLogger(CreateClosedLoopFaultController.class);
66 protected PolicyRestAdapter policyAdapter = null;
69 private static CommonClassDao commonclassdao;
72 private CreateClosedLoopFaultController(CommonClassDao commonclassdao){
73 CreateClosedLoopFaultController.commonclassdao = commonclassdao;
76 public CreateClosedLoopFaultController(){}
78 public PolicyRestAdapter setDataToPolicyRestAdapter(PolicyRestAdapter policyData, JsonNode root){
80 ObjectMapper mapper = new ObjectMapper();
81 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
82 TrapDatas trapDatas = mapper.readValue(root.get("trapData").toString(), TrapDatas.class);
83 TrapDatas faultDatas = mapper.readValue(root.get("faultData").toString(), TrapDatas.class);
84 ClosedLoopGridJSONData policyJsonData = mapper.readValue(root.get("policyData").get("policy").toString(), ClosedLoopGridJSONData.class);
85 ClosedLoopFaultBody jsonBody = mapper.readValue(root.get("policyData").get("policy").get("jsonBodyData").toString(), ClosedLoopFaultBody.class);
87 ArrayList<Object> trapSignatureDatas = new ArrayList<>();
88 if(trapDatas.getTrap1() != null){
89 trapSignatureDatas.add(trapDatas);
91 ArrayList<Object> faultSignatureDatas = new ArrayList<>();
92 if(faultDatas.getTrap1() != null){
93 faultSignatureDatas.add(faultDatas);
96 String resultBody = "";
97 if(!policyJsonData.getConnecttriggerSignatures().isEmpty()){
98 resultBody = resultBody + "(";
99 for(int i = policyJsonData.getConnecttriggerSignatures().size()-1; i>=0 ; i--){
100 String connectBody = connectTriggerSignature(i, policyJsonData.getConnecttriggerSignatures(), trapSignatureDatas.get(0));
101 resultBody = resultBody + connectBody;
103 resultBody = resultBody + ")";
105 if(!trapSignatureDatas.isEmpty()){
106 resultBody = callTrap("nill", trapSignatureDatas.get(0));
109 ClosedLoopSignatures triggerSignatures = new ClosedLoopSignatures();
110 triggerSignatures.setSignatures(resultBody);
111 if(policyData.getClearTimeOut() != null){
112 triggerSignatures.setTimeWindow(Integer.parseInt(policyData.getClearTimeOut()));
113 triggerSignatures.setTrapMaxAge(Integer.parseInt(policyData.getTrapMaxAge()));
114 ClosedLoopFaultTriggerUISignatures uiTriggerSignatures = new ClosedLoopFaultTriggerUISignatures();
115 if(!trapSignatureDatas.isEmpty()){
116 uiTriggerSignatures.setSignatures(getUITriggerSignature("Trap", trapSignatureDatas.get(0)));
117 if(!policyJsonData.getConnecttriggerSignatures().isEmpty()){
118 uiTriggerSignatures.setConnectSignatures(getUIConnectTraps(policyJsonData.getConnecttriggerSignatures()));
121 jsonBody.setTriggerSignaturesUsedForUI(uiTriggerSignatures);
122 jsonBody.setTriggerTimeWindowUsedForUI(Integer.parseInt(policyData.getClearTimeOut()));
123 jsonBody.setTrapMaxAgeUsedForUI(Integer.parseInt(policyData.getTrapMaxAge()));
126 jsonBody.setTriggerSignatures(triggerSignatures);
127 String faultBody = "";
128 if(!policyJsonData.getConnectVerificationSignatures().isEmpty()){
129 faultBody = faultBody + "(";
130 for(int i = policyJsonData.getConnectVerificationSignatures().size()-1; i>=0 ; i--){
131 String connectBody = connectTriggerSignature(i, policyJsonData.getConnectVerificationSignatures(), faultSignatureDatas.get(0));
132 faultBody = faultBody + connectBody;
134 faultBody = faultBody + ")";
136 if(!faultSignatureDatas.isEmpty()){
137 faultBody = callTrap("nill", faultSignatureDatas.get(0));
140 ClosedLoopSignatures faultSignatures = new ClosedLoopSignatures();
141 faultSignatures.setSignatures(faultBody);
142 if(policyData.getVerificationclearTimeOut() != null){
143 faultSignatures.setTimeWindow(Integer.parseInt(policyData.getVerificationclearTimeOut()));
144 ClosedLoopFaultTriggerUISignatures uifaultSignatures = new ClosedLoopFaultTriggerUISignatures();
145 if(!faultSignatureDatas.isEmpty()){
146 uifaultSignatures.setSignatures(getUITriggerSignature("Fault", faultSignatureDatas.get(0)));
147 if(!policyJsonData.getConnectVerificationSignatures().isEmpty()){
148 uifaultSignatures.setConnectSignatures(getUIConnectTraps(policyJsonData.getConnectVerificationSignatures()));
152 jsonBody.setVerificationSignaturesUsedForUI(uifaultSignatures);
153 jsonBody.setVerfificationTimeWindowUsedForUI(Integer.parseInt(policyData.getVerificationclearTimeOut()));
155 jsonBody.setVerificationSignatures(faultSignatures);
156 ObjectWriter om = new ObjectMapper().writer();
157 String json = om.writeValueAsString(jsonBody);
158 policyData.setJsonBody(json);
161 policyLogger.error("Exception Occured while setting data to Adapter" , e);
167 @SuppressWarnings("unchecked")
168 private String connectTriggerSignature(int index, ArrayList<Object> triggerSignatures, Object object) {
169 String resultBody = "";
170 Map<String, String> connectTraps = (Map<String, String>) triggerSignatures.get(index);
173 if(connectTraps.keySet().contains("notBox")){
174 notBox = connectTraps.get("notBox");
176 resultBody = resultBody + "(" + notBox;
177 }catch(NullPointerException e){
178 policyLogger.info("General error" , e);
179 resultBody = resultBody + "(";
181 String connectTrap1 = connectTraps.get("connectTrap1");
182 if(connectTrap1.startsWith("Trap") || connectTrap1.startsWith("Fault")){
183 String trapBody = callTrap(connectTrap1, object);
185 resultBody = resultBody + trapBody;
187 }else if(connectTrap1.startsWith("C")){
188 for(int i=0; i<= triggerSignatures.size(); i++){
189 Map<String,String> triggerSignature = (Map<String, String>) triggerSignatures.get(i);
190 if(triggerSignature.get("id").equals(connectTrap1)){
191 resultBody = resultBody + "(";
192 String connectBody = connectTriggerSignature(i, triggerSignatures, object);
193 resultBody = resultBody + connectBody + ")";
200 String trapCount1 = connectTraps.get("trapCount1");
201 resultBody = resultBody + ", Time = " + trapCount1 + ")";
202 }catch(NullPointerException e){
203 policyLogger.info("General error" , e);
206 String operatorBox = connectTraps.get("operatorBox");
207 resultBody = resultBody + operatorBox +"(";
208 }catch (NullPointerException e){
209 policyLogger.info("General error" , e);
212 String connectTrap2 = connectTraps.get("connectTrap2");
213 if(connectTrap2.startsWith("Trap") || connectTrap2.startsWith("Fault")){
214 String trapBody = callTrap(connectTrap2, object);
216 resultBody = resultBody + trapBody;
218 }else if(connectTrap2.startsWith("C")){
219 for(int i=0; i<= triggerSignatures.size(); i++){
220 Map<String,String> triggerSignature = (Map<String, String>) triggerSignatures.get(i);
221 if(triggerSignature.get("id").equals(connectTrap2)){
222 resultBody = resultBody + "(";
223 String connectBody = connectTriggerSignature(i, triggerSignatures, object);
224 resultBody = resultBody + connectBody + ")";
230 }catch(NullPointerException e){
231 policyLogger.info("General error" , e);
234 String trapCount2 = connectTraps.get("trapCount2");
235 resultBody = resultBody + ", Time = " + trapCount2 + ")";
236 }catch(NullPointerException e){
237 policyLogger.info("General error" , e);
243 private String callTrap(String trap, Object object) {
244 String signatureBody = "";
245 TrapDatas trapDatas = (TrapDatas) object;
246 ArrayList<Object> attributeList = new ArrayList<>();
248 if(!trap.equals("nill")){
250 if(trap.startsWith("Trap")){
251 if(trap.equals("Trap1")){
252 attributeList = trapDatas.getTrap1();
253 }else if(trap.equals("Trap2")){
254 attributeList = trapDatas.getTrap2();
255 }else if(trap.equals("Trap3")){
256 attributeList = trapDatas.getTrap3();
257 }else if(trap.equals("Trap4")){
258 attributeList = trapDatas.getTrap4();
259 }else if(trap.equals("Trap5")){
260 attributeList = trapDatas.getTrap5();
261 }else if(trap.equals("Trap6")){
262 attributeList = trapDatas.getTrap6();
265 if(trap.startsWith("Fault")){
266 if(trap.equals("Fault1")){
267 attributeList = trapDatas.getTrap1();
268 }else if(trap.equals("Fault2")){
269 attributeList = trapDatas.getTrap2();
270 }else if(trap.equals("Fault3")){
271 attributeList = trapDatas.getTrap3();
272 }else if(trap.equals("Fault4")){
273 attributeList = trapDatas.getTrap4();
274 }else if(trap.equals("Fault5")){
275 attributeList = trapDatas.getTrap5();
276 }else if(trap.equals("Fault6")){
277 attributeList = trapDatas.getTrap6();
281 } catch(Exception e){
282 policyLogger.warn("Error during callTrap" , e);
283 return "(" + trap + ")";
286 if(trapDatas.getTrap1()!=null){
287 attributeList = trapDatas.getTrap1();
292 signatureBody = signatureBody + "(" + readAttributes(attributeList, attributeList.size()-1) + ")";
293 return signatureBody;
296 @SuppressWarnings("unchecked")
297 private String readAttributes(ArrayList<Object> object, int index) {
298 String attributes = "";
299 Map<String, String> trapSignatures = (Map<String, String>) object.get(index);
300 // Read the Elements.
302 if(trapSignatures.keySet().contains("notBox")){
303 notBox = trapSignatures.get("notBox");
306 attributes = attributes + notBox.toString();
308 Object trapName1 = trapSignatures.get("trigger1");
310 String attrib = trapName1.toString();
311 if(attrib.startsWith("A")){
313 int iy = Integer.parseInt(attrib.substring(1))-1;
314 attributes = attributes + "(" + readAttributes(object, iy) + ")";
315 }catch(NumberFormatException e){
317 attrib = getVarbindOID(attrib);
318 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8")+ ")";
319 } catch (UnsupportedEncodingException e1) {
320 policyLogger.error("Caused Exception while Encoding Varbind Dictionary Values",e1);
325 attrib = getVarbindOID(attrib);
326 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8")+ ")";
327 } catch (UnsupportedEncodingException e) {
328 policyLogger.error("Caused Exception while Encoding Varbind Dictionary Values",e);
334 Object comboBox = trapSignatures.get("operatorBox");
336 attributes = attributes + comboBox.toString();
340 Object trapName2 = trapSignatures.get("trigger2");
342 String attrib = trapName2.toString();
343 if(attrib.startsWith("A")){
345 int iy = Integer.parseInt(attrib.substring(1))-1;
346 attributes = attributes + "(" + readAttributes(object, iy) + ")";
347 }catch(NumberFormatException e){
349 attrib = getVarbindOID(attrib);
350 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8") + ")";
351 } catch (UnsupportedEncodingException e1) {
352 policyLogger.error("Caused Exception while Encoding Varbind Dictionary Values",e1);
357 attrib = getVarbindOID(attrib);
358 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8") + ")";
359 } catch (UnsupportedEncodingException e) {
360 policyLogger.error("Caused Exception while Encoding Varbind Dictionary Values",e);
367 private String getVarbindOID(String attrib) {
368 VarbindDictionary varbindId = null;
370 varbindId = (VarbindDictionary) commonclassdao.getEntityItem(VarbindDictionary.class, "varbindName", attrib);
371 return varbindId.getVarbindOID();
373 policyLogger.error("Error during retrieving varbindName " + attrib, e);
379 //connect traps data set to JSON Body as String
380 @SuppressWarnings({ "unchecked", "rawtypes" })
381 private String getUIConnectTraps(ArrayList<Object> connectTrapSignatures) {
382 String resultBody = "";
383 String connectMainBody = "";
384 for(int j = 0; j < connectTrapSignatures.size(); j++){
385 Map<String, String> connectTraps = (Map<String, String>)connectTrapSignatures.get(j);
386 String connectBody = "";
387 Object object = connectTraps;
388 if(object instanceof LinkedHashMap<?, ?>){
390 String connectTrap1 = "";
391 String trapCount1 = "";
392 String operatorBox = "";
393 String connectTrap2 = "";
394 String trapCount2 = "";
395 if(((LinkedHashMap) object).keySet().contains("notBox")){
396 notBox = ((LinkedHashMap) object).get("notBox").toString();
398 if(((LinkedHashMap) object).get("connectTrap1") != null){
399 connectTrap1 = ((LinkedHashMap) object).get("connectTrap1").toString();
401 if(((LinkedHashMap) object).get("trapCount1") != null){
402 trapCount1 = ((LinkedHashMap) object).get("trapCount1").toString();
404 if(((LinkedHashMap) object).get("operatorBox") != null){
405 operatorBox = ((LinkedHashMap) object).get("operatorBox").toString();
407 if(((LinkedHashMap) object).get("connectTrap2") != null){
408 connectTrap2 = ((LinkedHashMap) object).get("connectTrap2").toString();
410 if(((LinkedHashMap) object).get("trapCount2") != null){
411 trapCount2 = ((LinkedHashMap) object).get("trapCount2").toString();
413 connectBody = notBox + "@!" + connectTrap1 + "@!" + trapCount1 + "@!" + operatorBox + "@!" + connectTrap2 + "@!" + trapCount2 + "#!?!";
415 resultBody = resultBody + connectBody;
417 connectMainBody = connectMainBody + resultBody;
418 return connectMainBody;
423 // get Trigger signature from JSON body
424 @SuppressWarnings({ "rawtypes", "unchecked" })
425 private String getUITriggerSignature(String trap, Object object2) {
426 String triggerBody = "";
427 TrapDatas trapDatas = (TrapDatas) object2;
428 ArrayList<Object> attributeList = new ArrayList<>();
430 if(trap.startsWith("Trap")){
431 if(trapDatas.getTrap1()!= null){
432 attributeList.add(trapDatas.getTrap1());
434 if(trapDatas.getTrap2()!= null){
435 attributeList.add(trapDatas.getTrap2());
437 if(trapDatas.getTrap3()!= null){
438 attributeList.add(trapDatas.getTrap3());
440 if(trapDatas.getTrap4()!= null){
441 attributeList.add(trapDatas.getTrap4());
443 if(trapDatas.getTrap5()!= null){
444 attributeList.add(trapDatas.getTrap5());
446 if(trapDatas.getTrap6()!= null){
447 attributeList.add(trapDatas.getTrap6());
450 if(trap.startsWith("Fault")){
451 if(trapDatas.getTrap1()!= null){
452 attributeList.add(trapDatas.getTrap1());
454 if(trapDatas.getTrap2()!= null){
455 attributeList.add(trapDatas.getTrap2());
457 if(trapDatas.getTrap3()!= null){
458 attributeList.add(trapDatas.getTrap3());
460 if(trapDatas.getTrap4()!= null){
461 attributeList.add(trapDatas.getTrap4());
463 if(trapDatas.getTrap5()!= null){
464 attributeList.add(trapDatas.getTrap5());
466 if(trapDatas.getTrap6()!= null){
467 attributeList.add(trapDatas.getTrap6());
472 for(int j = 0; j < attributeList.size(); j++){
473 String signatureBody = "";
474 ArrayList<Object> connectTraps = (ArrayList<Object>) attributeList.get(j);
475 for(int i =0 ; i < connectTraps.size(); i++){
476 String connectBody = "";
477 Object object = connectTraps.get(i);
478 if(object instanceof LinkedHashMap<?, ?>){
480 String trigger1 = "";
481 String operatorBox = "";
482 String trigger2 = "";
483 if(((LinkedHashMap) object).keySet().contains("notBox")){
484 notBox = ((LinkedHashMap) object).get("notBox").toString();
486 if(((LinkedHashMap) object).get("trigger1") != null){
487 trigger1 = ((LinkedHashMap) object).get("trigger1").toString();
489 if(((LinkedHashMap) object).get("operatorBox") != null){
490 operatorBox = ((LinkedHashMap) object).get("operatorBox").toString();
492 if(((LinkedHashMap) object).get("trigger2") != null){
493 trigger2 = ((LinkedHashMap) object).get("trigger2").toString();
495 connectBody = notBox + "@!" + trigger1 + "@!" + operatorBox + "@!" + trigger2 + "#!";
497 signatureBody = signatureBody + connectBody;
499 triggerBody = triggerBody + signatureBody + "?!";
505 public void prePopulateClosedLoopFaultPolicyData(PolicyRestAdapter policyAdapter, PolicyEntity entity) {
506 if (policyAdapter.getPolicyData() instanceof PolicyType) {
507 Object policyData = policyAdapter.getPolicyData();
508 PolicyType policy = (PolicyType) policyData;
509 policyAdapter.setOldPolicyFileName(policyAdapter.getPolicyName());
510 String policyNameValue = policyAdapter.getPolicyName().substring(policyAdapter.getPolicyName().indexOf("Fault_") +6);
511 policyAdapter.setPolicyName(policyNameValue);
512 String description = "";
514 description = policy.getDescription().substring(0, policy.getDescription().indexOf("@CreatedBy:"));
516 policyLogger.error("Error during collecting the description tag info for createClosedLoopFault " + policyNameValue , e);
517 description = policy.getDescription();
519 policyAdapter.setPolicyDescription(description);
520 // Get the target data under policy.
521 TargetType target = policy.getTarget();
522 if (target != null) {
523 // Under target we have AnyOFType
524 List<AnyOfType> anyOfList = target.getAnyOf();
525 if (anyOfList != null) {
526 Iterator<AnyOfType> iterAnyOf = anyOfList.iterator();
527 while (iterAnyOf.hasNext()) {
528 AnyOfType anyOf = iterAnyOf.next();
529 // Under AnyOFType we have AllOFType
530 List<AllOfType> allOfList = anyOf.getAllOf();
531 if (allOfList != null) {
532 Iterator<AllOfType> iterAllOf = allOfList.iterator();
533 while (iterAllOf.hasNext()) {
534 AllOfType allOf = iterAllOf.next();
535 // Under AllOFType we have Match
536 List<MatchType> matchList = allOf.getMatch();
537 if (matchList != null) {
538 Iterator<MatchType> iterMatch = matchList.iterator();
539 while (iterMatch.hasNext()) {
540 MatchType match = iterMatch.next();
542 // Under the match we have attribute value and
543 // attributeDesignator. So,finally down to the actual attribute.
545 AttributeValueType attributeValue = match.getAttributeValue();
546 String value = (String) attributeValue.getContent().get(0);
547 AttributeDesignatorType designator = match.getAttributeDesignator();
548 String attributeId = designator.getAttributeId();
550 // First match in the target is OnapName, so set that value.
551 if (attributeId.equals("ONAPName")) {
552 policyAdapter.setOnapName(value);
553 OnapName onapName = new OnapName();
554 onapName.setOnapName(value);
555 policyAdapter.setOnapNameField(onapName);
557 if (attributeId.equals("RiskType")){
558 policyAdapter.setRiskType(value);
560 if (attributeId.equals("RiskLevel")){
561 policyAdapter.setRiskLevel(value);
563 if (attributeId.equals("guard")){
564 policyAdapter.setGuard(value);
566 if (attributeId.equals("TTLDate") && !value.contains("NA")){
567 PolicyController controller = new PolicyController();
568 String newDate = controller.convertDate(value);
569 policyAdapter.setTtlDate(newDate);
578 readClosedLoopJSONFile(policyAdapter, entity);
583 private String readClosedLoopJSONFile(PolicyRestAdapter policyAdapter, PolicyEntity entity) {
584 ObjectMapper mapper = new ObjectMapper();
586 ClosedLoopFaultBody closedLoopBody = mapper.readValue(entity.getConfigurationData().getConfigBody(), ClosedLoopFaultBody.class);
587 if(closedLoopBody.getClosedLoopPolicyStatus().equalsIgnoreCase("ACTIVE")){
588 closedLoopBody.setClosedLoopPolicyStatus("Active");
590 closedLoopBody.setClosedLoopPolicyStatus("InActive");
592 policyAdapter.setJsonBodyData(closedLoopBody);
593 if(closedLoopBody.getTrapMaxAgeUsedForUI() != null){
594 policyAdapter.setTrapMaxAge(closedLoopBody.getTrapMaxAgeUsedForUI().toString());
596 if(closedLoopBody.getTriggerTimeWindowUsedForUI() != null){
597 policyAdapter.setClearTimeOut(closedLoopBody.getTriggerTimeWindowUsedForUI().toString());
599 if(closedLoopBody.getVerfificationTimeWindowUsedForUI() != null){
600 policyAdapter.setVerificationclearTimeOut(closedLoopBody.getVerfificationTimeWindowUsedForUI().toString());
603 } catch (Exception e) {
604 policyLogger.error("Exception Occured"+e);
613 private ArrayList<Object> trap1;
614 private ArrayList<Object> trap2;
615 private ArrayList<Object> trap3;
616 private ArrayList<Object> trap4;
617 private ArrayList<Object> trap5;
618 private ArrayList<Object> trap6;
619 public ArrayList<Object> getTrap1() {
622 public void setTrap1(ArrayList<Object> trap1) {
625 public ArrayList<Object> getTrap2() {
628 public void setTrap2(ArrayList<Object> trap2) {
631 public ArrayList<Object> getTrap3() {
634 public void setTrap3(ArrayList<Object> trap3) {
637 public ArrayList<Object> getTrap4() {
640 public void setTrap4(ArrayList<Object> trap4) {
643 public ArrayList<Object> getTrap5() {
646 public void setTrap5(ArrayList<Object> trap5) {
649 public ArrayList<Object> getTrap6() {
652 public void setTrap6(ArrayList<Object> trap6) {
657 class ClosedLoopGridJSONData{
659 private String clearTimeOut;
660 private String trapMaxAge;
661 private String verificationclearTimeOut;
662 private ArrayList<Object> connecttriggerSignatures;
663 private ArrayList<Object> connectVerificationSignatures;
665 public String getClearTimeOut() {
668 public void setClearTimeOut(String clearTimeOut) {
669 this.clearTimeOut = clearTimeOut;
671 public String getTrapMaxAge() {
674 public void setTrapMaxAge(String trapMaxAge) {
675 this.trapMaxAge = trapMaxAge;
677 public String getVerificationclearTimeOut() {
678 return verificationclearTimeOut;
680 public void setVerificationclearTimeOut(String verificationclearTimeOut) {
681 this.verificationclearTimeOut = verificationclearTimeOut;
685 public ArrayList<Object> getConnecttriggerSignatures() {
686 return connecttriggerSignatures;
688 public void setConnecttriggerSignatures(ArrayList<Object> connecttriggerSignatures) {
689 this.connecttriggerSignatures = connecttriggerSignatures;
691 public ArrayList<Object> getConnectVerificationSignatures() {
692 return connectVerificationSignatures;
694 public void setConnectVerificationSignatures(ArrayList<Object> connectVerificationSignatures) {
695 this.connectVerificationSignatures = connectVerificationSignatures;