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.openecomp.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.openecomp.policy.common.logging.flexlogger.FlexLogger;
33 import org.openecomp.policy.common.logging.flexlogger.Logger;
34 import org.openecomp.policy.rest.adapter.ClosedLoopFaultBody;
35 import org.openecomp.policy.rest.adapter.ClosedLoopFaultTriggerUISignatures;
36 import org.openecomp.policy.rest.adapter.ClosedLoopSignatures;
37 import org.openecomp.policy.rest.adapter.PolicyRestAdapter;
38 import org.openecomp.policy.rest.dao.CommonClassDao;
39 import org.openecomp.policy.rest.jpa.EcompName;
40 import org.openecomp.policy.rest.jpa.PolicyEntity;
41 import org.openecomp.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 LOGGER = 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) throws Exception{
79 ObjectMapper mapper = new ObjectMapper();
80 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
81 TrapDatas trapDatas = mapper.readValue(root.get("trapData").toString(), TrapDatas.class);
82 TrapDatas faultDatas = mapper.readValue(root.get("faultData").toString(), TrapDatas.class);
83 ClosedLoopGridJSONData policyJsonData = mapper.readValue(root.get("policyData").get("policy").toString(), ClosedLoopGridJSONData.class);
84 ClosedLoopFaultBody jsonBody = mapper.readValue(root.get("policyData").get("policy").get("jsonBodyData").toString(), ClosedLoopFaultBody.class);
86 ArrayList<Object> trapSignatureDatas = new ArrayList<>();
87 if(trapDatas.getTrap1() != null){
88 trapSignatureDatas.add(trapDatas);
90 ArrayList<Object> faultSignatureDatas = new ArrayList<>();
91 if(faultDatas.getTrap1() != null){
92 faultSignatureDatas.add(faultDatas);
95 String resultBody = "";
96 if(!policyJsonData.getConnecttriggerSignatures().isEmpty()){
97 resultBody = resultBody + "(";
98 for(int i = policyJsonData.getConnecttriggerSignatures().size()-1; i>=0 ; i--){
99 String connectBody = connectTriggerSignature(i, policyJsonData.getConnecttriggerSignatures(), trapSignatureDatas.get(0));
100 resultBody = resultBody + connectBody;
102 resultBody = resultBody + ")";
104 if(!trapSignatureDatas.isEmpty()){
105 resultBody = callTrap("nill", trapSignatureDatas.get(0));
108 ClosedLoopSignatures triggerSignatures = new ClosedLoopSignatures();
109 triggerSignatures.setSignatures(resultBody);
110 if(policyData.getClearTimeOut() != null){
111 triggerSignatures.setTimeWindow(Integer.parseInt(policyData.getClearTimeOut()));
112 triggerSignatures.setTrapMaxAge(Integer.parseInt(policyData.getTrapMaxAge()));
113 ClosedLoopFaultTriggerUISignatures uiTriggerSignatures = new ClosedLoopFaultTriggerUISignatures();
114 if(!trapSignatureDatas.isEmpty()){
115 uiTriggerSignatures.setSignatures(getUITriggerSignature("Trap", trapSignatureDatas.get(0)));
116 if(!policyJsonData.getConnecttriggerSignatures().isEmpty()){
117 uiTriggerSignatures.setConnectSignatures(getUIConnectTraps(policyJsonData.getConnecttriggerSignatures()));
120 jsonBody.setTriggerSignaturesUsedForUI(uiTriggerSignatures);
121 jsonBody.setTriggerTimeWindowUsedForUI(Integer.parseInt(policyData.getClearTimeOut()));
122 jsonBody.setTrapMaxAgeUsedForUI(Integer.parseInt(policyData.getTrapMaxAge()));
125 jsonBody.setTriggerSignatures(triggerSignatures);
126 String faultBody = "";
127 if(!policyJsonData.getConnectVerificationSignatures().isEmpty()){
128 faultBody = faultBody + "(";
129 for(int i = policyJsonData.getConnectVerificationSignatures().size()-1; i>=0 ; i--){
130 String connectBody = connectTriggerSignature(i, policyJsonData.getConnectVerificationSignatures(), faultSignatureDatas.get(0));
131 faultBody = faultBody + connectBody;
133 faultBody = faultBody + ")";
135 if(!faultSignatureDatas.isEmpty()){
136 faultBody = callTrap("nill", faultSignatureDatas.get(0));
139 ClosedLoopSignatures faultSignatures = new ClosedLoopSignatures();
140 faultSignatures.setSignatures(faultBody);
141 if(policyData.getVerificationclearTimeOut() != null){
142 faultSignatures.setTimeWindow(Integer.parseInt(policyData.getVerificationclearTimeOut()));
143 ClosedLoopFaultTriggerUISignatures uifaultSignatures = new ClosedLoopFaultTriggerUISignatures();
144 if(!faultSignatureDatas.isEmpty()){
145 uifaultSignatures.setSignatures(getUITriggerSignature("Fault", faultSignatureDatas.get(0)));
146 if(!policyJsonData.getConnectVerificationSignatures().isEmpty()){
147 uifaultSignatures.setConnectSignatures(getUIConnectTraps(policyJsonData.getConnectVerificationSignatures()));
151 jsonBody.setVerificationSignaturesUsedForUI(uifaultSignatures);
152 jsonBody.setVerfificationTimeWindowUsedForUI(Integer.parseInt(policyData.getVerificationclearTimeOut()));
154 jsonBody.setVerificationSignatures(faultSignatures);
155 ObjectWriter om = new ObjectMapper().writer();
156 String json = om.writeValueAsString(jsonBody);
157 policyData.setJsonBody(json);
162 @SuppressWarnings("unchecked")
163 private String connectTriggerSignature(int index, ArrayList<Object> triggerSignatures, Object object) {
164 String resultBody = "";
165 Map<String, String> connectTraps = (Map<String, String>) triggerSignatures.get(index);
168 if(connectTraps.keySet().contains("notBox")){
169 notBox = connectTraps.get("notBox");
171 resultBody = resultBody + "(" + notBox;
172 }catch(NullPointerException e){
173 resultBody = resultBody + "(";
175 String connectTrap1 = connectTraps.get("connectTrap1");
176 if(connectTrap1.startsWith("Trap") || connectTrap1.startsWith("Fault")){
177 String trapBody = callTrap(connectTrap1, object);
179 resultBody = resultBody + trapBody;
181 }else if(connectTrap1.startsWith("C")){
182 for(int i=0; i<= triggerSignatures.size(); i++){
183 Map<String,String> triggerSignature = (Map<String, String>) triggerSignatures.get(i);
184 if(triggerSignature.get("id").equals(connectTrap1)){
185 resultBody = resultBody + "(";
186 String connectBody = connectTriggerSignature(i, triggerSignatures, object);
187 resultBody = resultBody + connectBody + ")";
194 String trapCount1 = connectTraps.get("trapCount1");
195 resultBody = resultBody + ", Time = " + trapCount1 + ")";
196 }catch(NullPointerException e){
199 String operatorBox = connectTraps.get("operatorBox");
200 resultBody = resultBody + operatorBox +"(";
201 }catch (NullPointerException e){
204 String connectTrap2 = connectTraps.get("connectTrap2");
205 if(connectTrap2.startsWith("Trap") || connectTrap2.startsWith("Fault")){
206 String trapBody = callTrap(connectTrap2, object);
208 resultBody = resultBody + trapBody;
210 }else if(connectTrap2.startsWith("C")){
211 for(int i=0; i<= triggerSignatures.size(); i++){
212 Map<String,String> triggerSignature = (Map<String, String>) triggerSignatures.get(i);
213 if(triggerSignature.get("id").equals(connectTrap2)){
214 resultBody = resultBody + "(";
215 String connectBody = connectTriggerSignature(i, triggerSignatures, object);
216 resultBody = resultBody + connectBody + ")";
222 }catch(NullPointerException e){
225 String trapCount2 = connectTraps.get("trapCount2");
226 resultBody = resultBody + ", Time = " + trapCount2 + ")";
227 }catch(NullPointerException e){
233 private String callTrap(String trap, Object object) {
234 String signatureBody = "";
235 TrapDatas trapDatas = (TrapDatas) object;
236 ArrayList<Object> attributeList = new ArrayList<>();
238 if(!trap.equals("nill")){
240 if(trap.startsWith("Trap")){
241 if(trap.equals("Trap1")){
242 attributeList = trapDatas.getTrap1();
243 }else if(trap.equals("Trap2")){
244 attributeList = trapDatas.getTrap2();
245 }else if(trap.equals("Trap3")){
246 attributeList = trapDatas.getTrap3();
247 }else if(trap.equals("Trap4")){
248 attributeList = trapDatas.getTrap4();
249 }else if(trap.equals("Trap5")){
250 attributeList = trapDatas.getTrap5();
251 }else if(trap.equals("Trap6")){
252 attributeList = trapDatas.getTrap6();
255 if(trap.startsWith("Fault")){
256 if(trap.equals("Fault1")){
257 attributeList = trapDatas.getTrap1();
258 }else if(trap.equals("Fault2")){
259 attributeList = trapDatas.getTrap2();
260 }else if(trap.equals("Fault3")){
261 attributeList = trapDatas.getTrap3();
262 }else if(trap.equals("Fault4")){
263 attributeList = trapDatas.getTrap4();
264 }else if(trap.equals("Fault5")){
265 attributeList = trapDatas.getTrap5();
266 }else if(trap.equals("Fault6")){
267 attributeList = trapDatas.getTrap6();
271 } catch(Exception e){
272 return "(" + trap + ")";
275 if(trapDatas.getTrap1()!=null){
276 attributeList = trapDatas.getTrap1();
281 signatureBody = signatureBody + "(" + readAttributes(attributeList, attributeList.size()-1) + ")";
282 return signatureBody;
285 @SuppressWarnings("unchecked")
286 private String readAttributes(ArrayList<Object> object, int index) {
287 String attributes = "";
288 Map<String, String> trapSignatures = (Map<String, String>) object.get(index);
289 // Read the Elements.
291 if(trapSignatures.keySet().contains("notBox")){
292 notBox = trapSignatures.get("notBox");
295 attributes = attributes + notBox.toString();
297 Object trapName1 = trapSignatures.get("trigger1");
299 String attrib = trapName1.toString();
300 if(attrib.startsWith("A")){
302 int iy = Integer.parseInt(attrib.substring(1))-1;
303 attributes = attributes + "(" + readAttributes(object, iy) + ")";
304 }catch(NumberFormatException e){
306 attrib = getVarbindOID(attrib);
307 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8")+ ")";
308 } catch (UnsupportedEncodingException e1) {
309 //logger.error("Caused Exception while Encoding Varbind Dictionary Values"+e1);
314 attrib = getVarbindOID(attrib);
315 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8")+ ")";
316 } catch (UnsupportedEncodingException e) {
317 //logger.error("Caused Exception while Encoding Varbind Dictionary Values"+e);
323 Object comboBox = trapSignatures.get("operatorBox");
325 attributes = attributes + comboBox.toString();
329 Object trapName2 = trapSignatures.get("trigger2");
331 String attrib = trapName2.toString();
332 if(attrib.startsWith("A")){
334 int iy = Integer.parseInt(attrib.substring(1))-1;
335 attributes = attributes + "(" + readAttributes(object, iy) + ")";
336 }catch(NumberFormatException e){
338 attrib = getVarbindOID(attrib);
339 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8") + ")";
340 } catch (UnsupportedEncodingException e1) {
341 //logger.error("Caused Exception while Encoding Varbind Dictionary Values"+e1);
346 attrib = getVarbindOID(attrib);
347 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8") + ")";
348 } catch (UnsupportedEncodingException e) {
349 //logger.error("Caused Exception while Encoding Varbind Dictionary Values"+e);
356 private String getVarbindOID(String attrib) {
357 VarbindDictionary varbindId = null;
359 varbindId = (VarbindDictionary) commonclassdao.getEntityItem(VarbindDictionary.class, "varbindName", attrib);
360 return varbindId.getVarbindOID();
367 //connect traps data set to JSON Body as String
368 @SuppressWarnings({ "unchecked", "rawtypes" })
369 private String getUIConnectTraps(ArrayList<Object> connectTrapSignatures) {
370 String resultBody = "";
371 String connectMainBody = "";
372 for(int j = 0; j < connectTrapSignatures.size(); j++){
373 Map<String, String> connectTraps = (Map<String, String>)connectTrapSignatures.get(j);
374 String connectBody = "";
375 Object object = connectTraps;
376 if(object instanceof LinkedHashMap<?, ?>){
378 String connectTrap1 = "";
379 String trapCount1 = "";
380 String operatorBox = "";
381 String connectTrap2 = "";
382 String trapCount2 = "";
383 if(((LinkedHashMap) object).keySet().contains("notBox")){
384 notBox = ((LinkedHashMap) object).get("notBox").toString();
386 if(((LinkedHashMap) object).get("connectTrap1") != null){
387 connectTrap1 = ((LinkedHashMap) object).get("connectTrap1").toString();
389 if(((LinkedHashMap) object).get("trapCount1") != null){
390 trapCount1 = ((LinkedHashMap) object).get("trapCount1").toString();
392 if(((LinkedHashMap) object).get("operatorBox") != null){
393 operatorBox = ((LinkedHashMap) object).get("operatorBox").toString();
395 if(((LinkedHashMap) object).get("connectTrap2") != null){
396 connectTrap2 = ((LinkedHashMap) object).get("connectTrap2").toString();
398 if(((LinkedHashMap) object).get("trapCount2") != null){
399 trapCount2 = ((LinkedHashMap) object).get("trapCount2").toString();
401 connectBody = notBox + "@!" + connectTrap1 + "@!" + trapCount1 + "@!" + operatorBox + "@!" + connectTrap2 + "@!" + trapCount2 + "#!?!";
403 resultBody = resultBody + connectBody;
405 connectMainBody = connectMainBody + resultBody;
406 return connectMainBody;
411 // get Trigger signature from JSON body
412 @SuppressWarnings({ "rawtypes", "unchecked" })
413 private String getUITriggerSignature(String trap, Object object2) {
414 String triggerBody = "";
415 TrapDatas trapDatas = (TrapDatas) object2;
416 ArrayList<Object> attributeList = new ArrayList<>();
418 if(trap.startsWith("Trap")){
419 if(trapDatas.getTrap1()!= null){
420 attributeList.add(trapDatas.getTrap1());
422 if(trapDatas.getTrap2()!= null){
423 attributeList.add(trapDatas.getTrap2());
425 if(trapDatas.getTrap3()!= null){
426 attributeList.add(trapDatas.getTrap3());
428 if(trapDatas.getTrap4()!= null){
429 attributeList.add(trapDatas.getTrap4());
431 if(trapDatas.getTrap5()!= null){
432 attributeList.add(trapDatas.getTrap5());
434 if(trapDatas.getTrap6()!= null){
435 attributeList.add(trapDatas.getTrap6());
438 if(trap.startsWith("Fault")){
439 if(trapDatas.getTrap1()!= null){
440 attributeList.add(trapDatas.getTrap1());
442 if(trapDatas.getTrap2()!= null){
443 attributeList.add(trapDatas.getTrap2());
445 if(trapDatas.getTrap3()!= null){
446 attributeList.add(trapDatas.getTrap3());
448 if(trapDatas.getTrap4()!= null){
449 attributeList.add(trapDatas.getTrap4());
451 if(trapDatas.getTrap5()!= null){
452 attributeList.add(trapDatas.getTrap5());
454 if(trapDatas.getTrap6()!= null){
455 attributeList.add(trapDatas.getTrap6());
460 for(int j = 0; j < attributeList.size(); j++){
461 String signatureBody = "";
462 ArrayList<Object> connectTraps = (ArrayList<Object>) attributeList.get(j);
463 for(int i =0 ; i < connectTraps.size(); i++){
464 String connectBody = "";
465 Object object = connectTraps.get(i);
466 if(object instanceof LinkedHashMap<?, ?>){
468 String trigger1 = "";
469 String operatorBox = "";
470 String trigger2 = "";
471 if(((LinkedHashMap) object).keySet().contains("notBox")){
472 notBox = ((LinkedHashMap) object).get("notBox").toString();
474 if(((LinkedHashMap) object).get("trigger1") != null){
475 trigger1 = ((LinkedHashMap) object).get("trigger1").toString();
477 if(((LinkedHashMap) object).get("operatorBox") != null){
478 operatorBox = ((LinkedHashMap) object).get("operatorBox").toString();
480 if(((LinkedHashMap) object).get("trigger2") != null){
481 trigger2 = ((LinkedHashMap) object).get("trigger2").toString();
483 connectBody = notBox + "@!" + trigger1 + "@!" + operatorBox + "@!" + trigger2 + "#!";
485 signatureBody = signatureBody + connectBody;
487 triggerBody = triggerBody + signatureBody + "?!";
493 public void prePopulateClosedLoopFaultPolicyData(PolicyRestAdapter policyAdapter, PolicyEntity entity) {
494 if (policyAdapter.getPolicyData() instanceof PolicyType) {
495 Object policyData = policyAdapter.getPolicyData();
496 PolicyType policy = (PolicyType) policyData;
497 policyAdapter.setOldPolicyFileName(policyAdapter.getPolicyName());
498 String policyNameValue = policyAdapter.getPolicyName().substring(policyAdapter.getPolicyName().indexOf("Fault_") +6);
499 policyAdapter.setPolicyName(policyNameValue);
500 String description = "";
502 description = policy.getDescription().substring(0, policy.getDescription().indexOf("@CreatedBy:"));
504 description = policy.getDescription();
506 policyAdapter.setPolicyDescription(description);
507 // Get the target data under policy.
508 TargetType target = policy.getTarget();
509 if (target != null) {
510 // Under target we have AnyOFType
511 List<AnyOfType> anyOfList = target.getAnyOf();
512 if (anyOfList != null) {
513 Iterator<AnyOfType> iterAnyOf = anyOfList.iterator();
514 while (iterAnyOf.hasNext()) {
515 AnyOfType anyOf = iterAnyOf.next();
516 // Under AnyOFType we have AllOFType
517 List<AllOfType> allOfList = anyOf.getAllOf();
518 if (allOfList != null) {
519 Iterator<AllOfType> iterAllOf = allOfList.iterator();
520 while (iterAllOf.hasNext()) {
521 AllOfType allOf = iterAllOf.next();
522 // Under AllOFType we have Match
523 List<MatchType> matchList = allOf.getMatch();
524 if (matchList != null) {
525 Iterator<MatchType> iterMatch = matchList.iterator();
526 while (iterMatch.hasNext()) {
527 MatchType match = iterMatch.next();
529 // Under the match we have attribute value and
530 // attributeDesignator. So,finally down to the actual attribute.
532 AttributeValueType attributeValue = match.getAttributeValue();
533 String value = (String) attributeValue.getContent().get(0);
534 AttributeDesignatorType designator = match.getAttributeDesignator();
535 String attributeId = designator.getAttributeId();
537 // First match in the target is EcompName, so set that value.
538 if (attributeId.equals("ECOMPName")) {
539 policyAdapter.setEcompName(value);
540 EcompName ecompName = new EcompName();
541 ecompName.setEcompName(value);
542 policyAdapter.setEcompNameField(ecompName);
544 if (attributeId.equals("RiskType")){
545 policyAdapter.setRiskType(value);
547 if (attributeId.equals("RiskLevel")){
548 policyAdapter.setRiskLevel(value);
550 if (attributeId.equals("guard")){
551 policyAdapter.setGuard(value);
553 if (attributeId.equals("TTLDate") && !value.contains("NA")){
554 String newDate = convertDate(value, true);
555 policyAdapter.setTtlDate(newDate);
564 readClosedLoopJSONFile(policyAdapter, entity);
569 private String convertDate(String dateTTL, boolean portalType) {
570 String formateDate = null;
575 parts = dateTTL.split("-");
576 formateDate = parts[2] + "-" + parts[1] + "-" + parts[0] + "T05:00:00.000Z";
578 date = dateTTL.split("T");
579 parts = date[0].split("-");
580 formateDate = parts[2] + "-" + parts[1] + "-" + parts[0];
585 private String readClosedLoopJSONFile(PolicyRestAdapter policyAdapter, PolicyEntity entity) {
586 ObjectMapper mapper = new ObjectMapper();
588 ClosedLoopFaultBody closedLoopBody = mapper.readValue(entity.getConfigurationData().getConfigBody(), ClosedLoopFaultBody.class);
589 if(closedLoopBody.getClosedLoopPolicyStatus().equalsIgnoreCase("ACTIVE")){
590 closedLoopBody.setClosedLoopPolicyStatus("Active");
592 closedLoopBody.setClosedLoopPolicyStatus("InActive");
594 policyAdapter.setJsonBodyData(closedLoopBody);
595 if(closedLoopBody.getTrapMaxAgeUsedForUI() != null){
596 policyAdapter.setTrapMaxAge(closedLoopBody.getTrapMaxAgeUsedForUI().toString());
598 if(closedLoopBody.getTriggerTimeWindowUsedForUI() != null){
599 policyAdapter.setClearTimeOut(closedLoopBody.getTriggerTimeWindowUsedForUI().toString());
601 if(closedLoopBody.getVerfificationTimeWindowUsedForUI() != null){
602 policyAdapter.setVerificationclearTimeOut(closedLoopBody.getVerfificationTimeWindowUsedForUI().toString());
605 } catch (Exception e) {
606 LOGGER.error("Exception Occured"+e);
615 private ArrayList<Object> trap1;
616 private ArrayList<Object> trap2;
617 private ArrayList<Object> trap3;
618 private ArrayList<Object> trap4;
619 private ArrayList<Object> trap5;
620 private ArrayList<Object> trap6;
621 public ArrayList<Object> getTrap1() {
624 public void setTrap1(ArrayList<Object> trap1) {
627 public ArrayList<Object> getTrap2() {
630 public void setTrap2(ArrayList<Object> trap2) {
633 public ArrayList<Object> getTrap3() {
636 public void setTrap3(ArrayList<Object> trap3) {
639 public ArrayList<Object> getTrap4() {
642 public void setTrap4(ArrayList<Object> trap4) {
645 public ArrayList<Object> getTrap5() {
648 public void setTrap5(ArrayList<Object> trap5) {
651 public ArrayList<Object> getTrap6() {
654 public void setTrap6(ArrayList<Object> trap6) {
659 class ClosedLoopGridJSONData{
661 private String clearTimeOut;
662 private String trapMaxAge;
663 private String verificationclearTimeOut;
664 private ArrayList<Object> connecttriggerSignatures;
665 private ArrayList<Object> connectVerificationSignatures;
667 public String getClearTimeOut() {
670 public void setClearTimeOut(String clearTimeOut) {
671 this.clearTimeOut = clearTimeOut;
673 public String getTrapMaxAge() {
676 public void setTrapMaxAge(String trapMaxAge) {
677 this.trapMaxAge = trapMaxAge;
679 public String getVerificationclearTimeOut() {
680 return verificationclearTimeOut;
682 public void setVerificationclearTimeOut(String verificationclearTimeOut) {
683 this.verificationclearTimeOut = verificationclearTimeOut;
687 public ArrayList<Object> getConnecttriggerSignatures() {
688 return connecttriggerSignatures;
690 public void setConnecttriggerSignatures(ArrayList<Object> connecttriggerSignatures) {
691 this.connecttriggerSignatures = connecttriggerSignatures;
693 public ArrayList<Object> getConnectVerificationSignatures() {
694 return connectVerificationSignatures;
696 public void setConnectVerificationSignatures(ArrayList<Object> connectVerificationSignatures) {
697 this.connectVerificationSignatures = connectVerificationSignatures;