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 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 return "(" + trap + ")";
285 if(trapDatas.getTrap1()!=null){
286 attributeList = trapDatas.getTrap1();
291 signatureBody = signatureBody + "(" + readAttributes(attributeList, attributeList.size()-1) + ")";
292 return signatureBody;
295 @SuppressWarnings("unchecked")
296 private String readAttributes(ArrayList<Object> object, int index) {
297 String attributes = "";
298 Map<String, String> trapSignatures = (Map<String, String>) object.get(index);
299 // Read the Elements.
301 if(trapSignatures.keySet().contains("notBox")){
302 notBox = trapSignatures.get("notBox");
305 attributes = attributes + notBox.toString();
307 Object trapName1 = trapSignatures.get("trigger1");
309 String attrib = trapName1.toString();
310 if(attrib.startsWith("A")){
312 int iy = Integer.parseInt(attrib.substring(1))-1;
313 attributes = attributes + "(" + readAttributes(object, iy) + ")";
314 }catch(NumberFormatException e){
316 attrib = getVarbindOID(attrib);
317 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8")+ ")";
318 } catch (UnsupportedEncodingException e1) {
319 //logger.error("Caused Exception while Encoding Varbind Dictionary Values"+e1);
324 attrib = getVarbindOID(attrib);
325 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8")+ ")";
326 } catch (UnsupportedEncodingException e) {
327 //logger.error("Caused Exception while Encoding Varbind Dictionary Values"+e);
333 Object comboBox = trapSignatures.get("operatorBox");
335 attributes = attributes + comboBox.toString();
339 Object trapName2 = trapSignatures.get("trigger2");
341 String attrib = trapName2.toString();
342 if(attrib.startsWith("A")){
344 int iy = Integer.parseInt(attrib.substring(1))-1;
345 attributes = attributes + "(" + readAttributes(object, iy) + ")";
346 }catch(NumberFormatException e){
348 attrib = getVarbindOID(attrib);
349 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8") + ")";
350 } catch (UnsupportedEncodingException e1) {
351 //logger.error("Caused Exception while Encoding Varbind Dictionary Values"+e1);
356 attrib = getVarbindOID(attrib);
357 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8") + ")";
358 } catch (UnsupportedEncodingException e) {
359 //logger.error("Caused Exception while Encoding Varbind Dictionary Values"+e);
366 private String getVarbindOID(String attrib) {
367 VarbindDictionary varbindId = null;
369 varbindId = (VarbindDictionary) commonclassdao.getEntityItem(VarbindDictionary.class, "varbindName", attrib);
370 return varbindId.getVarbindOID();
377 //connect traps data set to JSON Body as String
378 @SuppressWarnings({ "unchecked", "rawtypes" })
379 private String getUIConnectTraps(ArrayList<Object> connectTrapSignatures) {
380 String resultBody = "";
381 String connectMainBody = "";
382 for(int j = 0; j < connectTrapSignatures.size(); j++){
383 Map<String, String> connectTraps = (Map<String, String>)connectTrapSignatures.get(j);
384 String connectBody = "";
385 Object object = connectTraps;
386 if(object instanceof LinkedHashMap<?, ?>){
388 String connectTrap1 = "";
389 String trapCount1 = "";
390 String operatorBox = "";
391 String connectTrap2 = "";
392 String trapCount2 = "";
393 if(((LinkedHashMap) object).keySet().contains("notBox")){
394 notBox = ((LinkedHashMap) object).get("notBox").toString();
396 if(((LinkedHashMap) object).get("connectTrap1") != null){
397 connectTrap1 = ((LinkedHashMap) object).get("connectTrap1").toString();
399 if(((LinkedHashMap) object).get("trapCount1") != null){
400 trapCount1 = ((LinkedHashMap) object).get("trapCount1").toString();
402 if(((LinkedHashMap) object).get("operatorBox") != null){
403 operatorBox = ((LinkedHashMap) object).get("operatorBox").toString();
405 if(((LinkedHashMap) object).get("connectTrap2") != null){
406 connectTrap2 = ((LinkedHashMap) object).get("connectTrap2").toString();
408 if(((LinkedHashMap) object).get("trapCount2") != null){
409 trapCount2 = ((LinkedHashMap) object).get("trapCount2").toString();
411 connectBody = notBox + "@!" + connectTrap1 + "@!" + trapCount1 + "@!" + operatorBox + "@!" + connectTrap2 + "@!" + trapCount2 + "#!?!";
413 resultBody = resultBody + connectBody;
415 connectMainBody = connectMainBody + resultBody;
416 return connectMainBody;
421 // get Trigger signature from JSON body
422 @SuppressWarnings({ "rawtypes", "unchecked" })
423 private String getUITriggerSignature(String trap, Object object2) {
424 String triggerBody = "";
425 TrapDatas trapDatas = (TrapDatas) object2;
426 ArrayList<Object> attributeList = new ArrayList<>();
428 if(trap.startsWith("Trap")){
429 if(trapDatas.getTrap1()!= null){
430 attributeList.add(trapDatas.getTrap1());
432 if(trapDatas.getTrap2()!= null){
433 attributeList.add(trapDatas.getTrap2());
435 if(trapDatas.getTrap3()!= null){
436 attributeList.add(trapDatas.getTrap3());
438 if(trapDatas.getTrap4()!= null){
439 attributeList.add(trapDatas.getTrap4());
441 if(trapDatas.getTrap5()!= null){
442 attributeList.add(trapDatas.getTrap5());
444 if(trapDatas.getTrap6()!= null){
445 attributeList.add(trapDatas.getTrap6());
448 if(trap.startsWith("Fault")){
449 if(trapDatas.getTrap1()!= null){
450 attributeList.add(trapDatas.getTrap1());
452 if(trapDatas.getTrap2()!= null){
453 attributeList.add(trapDatas.getTrap2());
455 if(trapDatas.getTrap3()!= null){
456 attributeList.add(trapDatas.getTrap3());
458 if(trapDatas.getTrap4()!= null){
459 attributeList.add(trapDatas.getTrap4());
461 if(trapDatas.getTrap5()!= null){
462 attributeList.add(trapDatas.getTrap5());
464 if(trapDatas.getTrap6()!= null){
465 attributeList.add(trapDatas.getTrap6());
470 for(int j = 0; j < attributeList.size(); j++){
471 String signatureBody = "";
472 ArrayList<Object> connectTraps = (ArrayList<Object>) attributeList.get(j);
473 for(int i =0 ; i < connectTraps.size(); i++){
474 String connectBody = "";
475 Object object = connectTraps.get(i);
476 if(object instanceof LinkedHashMap<?, ?>){
478 String trigger1 = "";
479 String operatorBox = "";
480 String trigger2 = "";
481 if(((LinkedHashMap) object).keySet().contains("notBox")){
482 notBox = ((LinkedHashMap) object).get("notBox").toString();
484 if(((LinkedHashMap) object).get("trigger1") != null){
485 trigger1 = ((LinkedHashMap) object).get("trigger1").toString();
487 if(((LinkedHashMap) object).get("operatorBox") != null){
488 operatorBox = ((LinkedHashMap) object).get("operatorBox").toString();
490 if(((LinkedHashMap) object).get("trigger2") != null){
491 trigger2 = ((LinkedHashMap) object).get("trigger2").toString();
493 connectBody = notBox + "@!" + trigger1 + "@!" + operatorBox + "@!" + trigger2 + "#!";
495 signatureBody = signatureBody + connectBody;
497 triggerBody = triggerBody + signatureBody + "?!";
503 public void prePopulateClosedLoopFaultPolicyData(PolicyRestAdapter policyAdapter, PolicyEntity entity) {
504 if (policyAdapter.getPolicyData() instanceof PolicyType) {
505 Object policyData = policyAdapter.getPolicyData();
506 PolicyType policy = (PolicyType) policyData;
507 policyAdapter.setOldPolicyFileName(policyAdapter.getPolicyName());
508 String policyNameValue = policyAdapter.getPolicyName().substring(policyAdapter.getPolicyName().indexOf("Fault_") +6);
509 policyAdapter.setPolicyName(policyNameValue);
510 String description = "";
512 description = policy.getDescription().substring(0, policy.getDescription().indexOf("@CreatedBy:"));
514 description = policy.getDescription();
516 policyAdapter.setPolicyDescription(description);
517 // Get the target data under policy.
518 TargetType target = policy.getTarget();
519 if (target != null) {
520 // Under target we have AnyOFType
521 List<AnyOfType> anyOfList = target.getAnyOf();
522 if (anyOfList != null) {
523 Iterator<AnyOfType> iterAnyOf = anyOfList.iterator();
524 while (iterAnyOf.hasNext()) {
525 AnyOfType anyOf = iterAnyOf.next();
526 // Under AnyOFType we have AllOFType
527 List<AllOfType> allOfList = anyOf.getAllOf();
528 if (allOfList != null) {
529 Iterator<AllOfType> iterAllOf = allOfList.iterator();
530 while (iterAllOf.hasNext()) {
531 AllOfType allOf = iterAllOf.next();
532 // Under AllOFType we have Match
533 List<MatchType> matchList = allOf.getMatch();
534 if (matchList != null) {
535 Iterator<MatchType> iterMatch = matchList.iterator();
536 while (iterMatch.hasNext()) {
537 MatchType match = iterMatch.next();
539 // Under the match we have attribute value and
540 // attributeDesignator. So,finally down to the actual attribute.
542 AttributeValueType attributeValue = match.getAttributeValue();
543 String value = (String) attributeValue.getContent().get(0);
544 AttributeDesignatorType designator = match.getAttributeDesignator();
545 String attributeId = designator.getAttributeId();
547 // First match in the target is EcompName, so set that value.
548 if (attributeId.equals("ECOMPName")) {
549 policyAdapter.setEcompName(value);
550 EcompName ecompName = new EcompName();
551 ecompName.setEcompName(value);
552 policyAdapter.setEcompNameField(ecompName);
554 if (attributeId.equals("RiskType")){
555 policyAdapter.setRiskType(value);
557 if (attributeId.equals("RiskLevel")){
558 policyAdapter.setRiskLevel(value);
560 if (attributeId.equals("guard")){
561 policyAdapter.setGuard(value);
563 if (attributeId.equals("TTLDate") && !value.contains("NA")){
564 String newDate = convertDate(value, true);
565 policyAdapter.setTtlDate(newDate);
574 readClosedLoopJSONFile(policyAdapter, entity);
579 private String convertDate(String dateTTL, boolean portalType) {
580 String formateDate = null;
585 parts = dateTTL.split("-");
586 formateDate = parts[2] + "-" + parts[1] + "-" + parts[0] + "T05:00:00.000Z";
588 date = dateTTL.split("T");
589 parts = date[0].split("-");
590 formateDate = parts[2] + "-" + parts[1] + "-" + parts[0];
595 private String readClosedLoopJSONFile(PolicyRestAdapter policyAdapter, PolicyEntity entity) {
596 ObjectMapper mapper = new ObjectMapper();
598 ClosedLoopFaultBody closedLoopBody = mapper.readValue(entity.getConfigurationData().getConfigBody(), ClosedLoopFaultBody.class);
599 if(closedLoopBody.getClosedLoopPolicyStatus().equalsIgnoreCase("ACTIVE")){
600 closedLoopBody.setClosedLoopPolicyStatus("Active");
602 closedLoopBody.setClosedLoopPolicyStatus("InActive");
604 policyAdapter.setJsonBodyData(closedLoopBody);
605 if(closedLoopBody.getTrapMaxAgeUsedForUI() != null){
606 policyAdapter.setTrapMaxAge(closedLoopBody.getTrapMaxAgeUsedForUI().toString());
608 if(closedLoopBody.getTriggerTimeWindowUsedForUI() != null){
609 policyAdapter.setClearTimeOut(closedLoopBody.getTriggerTimeWindowUsedForUI().toString());
611 if(closedLoopBody.getVerfificationTimeWindowUsedForUI() != null){
612 policyAdapter.setVerificationclearTimeOut(closedLoopBody.getVerfificationTimeWindowUsedForUI().toString());
615 } catch (Exception e) {
616 policyLogger.error("Exception Occured"+e);
625 private ArrayList<Object> trap1;
626 private ArrayList<Object> trap2;
627 private ArrayList<Object> trap3;
628 private ArrayList<Object> trap4;
629 private ArrayList<Object> trap5;
630 private ArrayList<Object> trap6;
631 public ArrayList<Object> getTrap1() {
634 public void setTrap1(ArrayList<Object> trap1) {
637 public ArrayList<Object> getTrap2() {
640 public void setTrap2(ArrayList<Object> trap2) {
643 public ArrayList<Object> getTrap3() {
646 public void setTrap3(ArrayList<Object> trap3) {
649 public ArrayList<Object> getTrap4() {
652 public void setTrap4(ArrayList<Object> trap4) {
655 public ArrayList<Object> getTrap5() {
658 public void setTrap5(ArrayList<Object> trap5) {
661 public ArrayList<Object> getTrap6() {
664 public void setTrap6(ArrayList<Object> trap6) {
669 class ClosedLoopGridJSONData{
671 private String clearTimeOut;
672 private String trapMaxAge;
673 private String verificationclearTimeOut;
674 private ArrayList<Object> connecttriggerSignatures;
675 private ArrayList<Object> connectVerificationSignatures;
677 public String getClearTimeOut() {
680 public void setClearTimeOut(String clearTimeOut) {
681 this.clearTimeOut = clearTimeOut;
683 public String getTrapMaxAge() {
686 public void setTrapMaxAge(String trapMaxAge) {
687 this.trapMaxAge = trapMaxAge;
689 public String getVerificationclearTimeOut() {
690 return verificationclearTimeOut;
692 public void setVerificationclearTimeOut(String verificationclearTimeOut) {
693 this.verificationclearTimeOut = verificationclearTimeOut;
697 public ArrayList<Object> getConnecttriggerSignatures() {
698 return connecttriggerSignatures;
700 public void setConnecttriggerSignatures(ArrayList<Object> connecttriggerSignatures) {
701 this.connecttriggerSignatures = connecttriggerSignatures;
703 public ArrayList<Object> getConnectVerificationSignatures() {
704 return connectVerificationSignatures;
706 public void setConnectVerificationSignatures(ArrayList<Object> connectVerificationSignatures) {
707 this.connectVerificationSignatures = connectVerificationSignatures;