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.onap.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(){
80 public PolicyRestAdapter setDataToPolicyRestAdapter(PolicyRestAdapter policyData, JsonNode root){
82 ObjectMapper mapper = new ObjectMapper();
83 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
84 TrapDatas trapDatas = mapper.readValue(root.get("trapData").toString(), TrapDatas.class);
85 TrapDatas faultDatas = mapper.readValue(root.get("faultData").toString(), TrapDatas.class);
86 ClosedLoopGridJSONData policyJsonData = mapper.readValue(root.get("policyData").get("policy").toString(), ClosedLoopGridJSONData.class);
87 ClosedLoopFaultBody jsonBody = mapper.readValue(root.get("policyData").get("policy").get("jsonBodyData").toString(), ClosedLoopFaultBody.class);
89 ArrayList<Object> trapSignatureDatas = new ArrayList<>();
90 if(trapDatas.getTrap1() != null){
91 trapSignatureDatas.add(trapDatas);
93 ArrayList<Object> faultSignatureDatas = new ArrayList<>();
94 if(faultDatas.getTrap1() != null){
95 faultSignatureDatas.add(faultDatas);
98 StringBuilder resultBody = new StringBuilder();
99 if(!policyJsonData.getConnecttriggerSignatures().isEmpty()){
100 resultBody.append("(");
101 for(int i = policyJsonData.getConnecttriggerSignatures().size()-1; i>=0 ; i--){
102 String connectBody = connectTriggerSignature(i, policyJsonData.getConnecttriggerSignatures(), trapSignatureDatas.get(0));
103 resultBody.append(connectBody);
105 resultBody.append(resultBody + ")");
107 if(!trapSignatureDatas.isEmpty()){
108 resultBody.append(callTrap("nill", trapSignatureDatas.get(0)));
111 ClosedLoopSignatures triggerSignatures = new ClosedLoopSignatures();
112 triggerSignatures.setSignatures(resultBody.toString());
113 if(policyData.getClearTimeOut() != null){
114 triggerSignatures.setTimeWindow(Integer.parseInt(policyData.getClearTimeOut()));
115 triggerSignatures.setTrapMaxAge(Integer.parseInt(policyData.getTrapMaxAge()));
116 ClosedLoopFaultTriggerUISignatures uiTriggerSignatures = new ClosedLoopFaultTriggerUISignatures();
117 if(!trapSignatureDatas.isEmpty()){
118 uiTriggerSignatures.setSignatures(getUITriggerSignature("Trap", trapSignatureDatas.get(0)));
119 if(!policyJsonData.getConnecttriggerSignatures().isEmpty()){
120 uiTriggerSignatures.setConnectSignatures(getUIConnectTraps(policyJsonData.getConnecttriggerSignatures()));
123 jsonBody.setTriggerSignaturesUsedForUI(uiTriggerSignatures);
124 jsonBody.setTriggerTimeWindowUsedForUI(Integer.parseInt(policyData.getClearTimeOut()));
125 jsonBody.setTrapMaxAge(Integer.parseInt(policyData.getTrapMaxAge()));
128 jsonBody.setTriggerSignatures(triggerSignatures);
129 StringBuilder faultBody = new StringBuilder();
130 if(!policyJsonData.getConnectVerificationSignatures().isEmpty()){
131 faultBody.append("(");
132 for(int i = policyJsonData.getConnectVerificationSignatures().size()-1; i>=0 ; i--){
133 String connectBody = connectTriggerSignature(i, policyJsonData.getConnectVerificationSignatures(), faultSignatureDatas.get(0));
134 faultBody.append(connectBody);
136 faultBody.append(")");
138 if(!faultSignatureDatas.isEmpty()){
139 faultBody.append(callTrap("nill", faultSignatureDatas.get(0)));
142 ClosedLoopSignatures faultSignatures = new ClosedLoopSignatures();
143 faultSignatures.setSignatures(faultBody.toString());
144 if(policyData.getVerificationclearTimeOut() != null){
145 faultSignatures.setTimeWindow(Integer.parseInt(policyData.getVerificationclearTimeOut()));
146 ClosedLoopFaultTriggerUISignatures uifaultSignatures = new ClosedLoopFaultTriggerUISignatures();
147 if(!faultSignatureDatas.isEmpty()){
148 uifaultSignatures.setSignatures(getUITriggerSignature("Fault", faultSignatureDatas.get(0)));
149 if(!policyJsonData.getConnectVerificationSignatures().isEmpty()){
150 uifaultSignatures.setConnectSignatures(getUIConnectTraps(policyJsonData.getConnectVerificationSignatures()));
154 jsonBody.setVerificationSignaturesUsedForUI(uifaultSignatures);
155 jsonBody.setVerificationTimeWindowUsedForUI(Integer.parseInt(policyData.getVerificationclearTimeOut()));
157 jsonBody.setVerificationSignatures(faultSignatures);
158 ObjectWriter om = new ObjectMapper().writer();
159 String json = om.writeValueAsString(jsonBody);
160 policyData.setJsonBody(json);
163 policyLogger.error("Exception Occured while setting data to Adapter" , e);
169 @SuppressWarnings("unchecked")
170 private String connectTriggerSignature(int index, ArrayList<Object> triggerSignatures, Object object) {
171 StringBuilder resultBody = new StringBuilder();
172 Map<String, String> connectTraps = (Map<String, String>) triggerSignatures.get(index);
175 if(connectTraps.keySet().contains("notBox")){
176 notBox = connectTraps.get("notBox");
178 resultBody.append("(" + notBox);
179 }catch(NullPointerException e){
180 policyLogger.info("General error" , e);
181 resultBody.append("(");
183 String connectTrap1 = connectTraps.get("connectTrap1");
184 if(connectTrap1.startsWith("Trap") || connectTrap1.startsWith("Fault")){
185 String trapBody = callTrap(connectTrap1, object);
187 resultBody.append(trapBody);
189 }else if(connectTrap1.startsWith("C")){
190 for(int i=0; i<= triggerSignatures.size(); i++){
191 Map<String,String> triggerSignature = (Map<String, String>) triggerSignatures.get(i);
192 if(triggerSignature.get("id").equals(connectTrap1)){
193 resultBody.append("(");
194 String connectBody = connectTriggerSignature(i, triggerSignatures, object);
195 resultBody.append(connectBody + ")");
202 String trapCount1 = connectTraps.get("trapCount1");
203 resultBody.append(", Time = " + trapCount1 + ")");
204 }catch(NullPointerException e){
205 policyLogger.info("General error" , e);
208 String operatorBox = connectTraps.get("operatorBox");
209 resultBody.append(operatorBox +"(");
210 }catch (NullPointerException e){
211 policyLogger.info("General error" , e);
214 String connectTrap2 = connectTraps.get("connectTrap2");
215 if(connectTrap2.startsWith("Trap") || connectTrap2.startsWith("Fault")){
216 String trapBody = callTrap(connectTrap2, object);
218 resultBody.append(trapBody);
220 }else if(connectTrap2.startsWith("C")){
221 for(int i=0; i<= triggerSignatures.size(); i++){
222 Map<String,String> triggerSignature = (Map<String, String>) triggerSignatures.get(i);
223 if(triggerSignature.get("id").equals(connectTrap2)){
224 resultBody.append("(");
225 String connectBody = connectTriggerSignature(i, triggerSignatures, object);
226 resultBody.append(connectBody + ")");
232 }catch(NullPointerException e){
233 policyLogger.info("General error" , e);
236 String trapCount2 = connectTraps.get("trapCount2");
237 resultBody.append(", Time = " + trapCount2 + ")");
238 }catch(NullPointerException e){
239 policyLogger.info("General error" , e);
241 return resultBody.toString();
245 private String callTrap(String trap, Object object) {
246 String signatureBody = "";
247 TrapDatas trapDatas = (TrapDatas) object;
248 ArrayList<Object> attributeList = new ArrayList<>();
250 if(! "nill".equals(trap)){
252 if(trap.startsWith("Trap")){
253 if("Trap1".equals(trap)){
254 attributeList = trapDatas.getTrap1();
255 }else if("Trap2".equals(trap)){
256 attributeList = trapDatas.getTrap2();
257 }else if("Trap3".equals(trap)){
258 attributeList = trapDatas.getTrap3();
259 }else if("Trap4".equals(trap)){
260 attributeList = trapDatas.getTrap4();
261 }else if("Trap5".equals(trap)){
262 attributeList = trapDatas.getTrap5();
263 }else if("Trap6".equals(trap)){
264 attributeList = trapDatas.getTrap6();
267 if(trap.startsWith("Fault")){
268 if("Fault1".equals(trap)){
269 attributeList = trapDatas.getTrap1();
270 }else if("Fault2".equals(trap)){
271 attributeList = trapDatas.getTrap2();
272 }else if("Fault3".equals(trap)){
273 attributeList = trapDatas.getTrap3();
274 }else if("Fault4".equals(trap)){
275 attributeList = trapDatas.getTrap4();
276 }else if("Fault5".equals(trap)){
277 attributeList = trapDatas.getTrap5();
278 }else if("Fault6".equals(trap)){
279 attributeList = trapDatas.getTrap6();
283 } catch(Exception e){
284 policyLogger.warn("Error during callTrap" , e);
285 return "(" + trap + ")";
288 if(trapDatas.getTrap1()!=null){
289 attributeList = trapDatas.getTrap1();
294 signatureBody = signatureBody + "(" + readAttributes(attributeList, attributeList.size()-1) + ")";
295 return signatureBody;
298 @SuppressWarnings("unchecked")
299 private String readAttributes(ArrayList<Object> object, int index) {
300 String attributes = "";
301 Map<String, String> trapSignatures = (Map<String, String>) object.get(index);
302 // Read the Elements.
304 if(trapSignatures.keySet().contains("notBox")){
305 notBox = trapSignatures.get("notBox");
308 attributes = attributes + notBox.toString();
310 Object trapName1 = trapSignatures.get("trigger1");
312 String attrib = trapName1.toString();
313 if(attrib.startsWith("A")){
315 int iy = Integer.parseInt(attrib.substring(1))-1;
316 attributes = attributes + "(" + readAttributes(object, iy) + ")";
317 }catch(NumberFormatException e){
319 attrib = getVarbindOID(attrib);
320 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8")+ ")";
321 } catch (UnsupportedEncodingException e1) {
322 policyLogger.error("Caused Exception while Encoding Varbind Dictionary Values",e1);
327 attrib = getVarbindOID(attrib);
328 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8")+ ")";
329 } catch (UnsupportedEncodingException e) {
330 policyLogger.error("Caused Exception while Encoding Varbind Dictionary Values",e);
336 Object comboBox = trapSignatures.get("operatorBox");
338 attributes = attributes + comboBox.toString();
342 Object trapName2 = trapSignatures.get("trigger2");
344 String attrib = trapName2.toString();
345 if(attrib.startsWith("A")){
347 int iy = Integer.parseInt(attrib.substring(1))-1;
348 attributes = attributes + "(" + readAttributes(object, iy) + ")";
349 }catch(NumberFormatException e){
351 attrib = getVarbindOID(attrib);
352 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8") + ")";
353 } catch (UnsupportedEncodingException e1) {
354 policyLogger.error("Caused Exception while Encoding Varbind Dictionary Values",e1);
359 attrib = getVarbindOID(attrib);
360 attributes = attributes + "("+ URLEncoder.encode(attrib, "UTF-8") + ")";
361 } catch (UnsupportedEncodingException e) {
362 policyLogger.error("Caused Exception while Encoding Varbind Dictionary Values",e);
369 private String getVarbindOID(String attrib) {
370 VarbindDictionary varbindId = null;
372 varbindId = (VarbindDictionary) commonclassdao.getEntityItem(VarbindDictionary.class, "varbindName", attrib);
373 return varbindId.getVarbindOID();
375 policyLogger.error("Error during retrieving varbindName " + attrib, e);
381 //connect traps data set to JSON Body as String
382 @SuppressWarnings({ "unchecked", "rawtypes" })
383 private String getUIConnectTraps(ArrayList<Object> connectTrapSignatures) {
384 StringBuilder resultBody = new StringBuilder();
385 String connectMainBody = "";
386 for(int j = 0; j < connectTrapSignatures.size(); j++){
387 Map<String, String> connectTraps = (Map<String, String>)connectTrapSignatures.get(j);
388 String connectBody = "";
389 Object object = connectTraps;
390 if(object instanceof LinkedHashMap<?, ?>){
392 String connectTrap1 = "";
393 String trapCount1 = "";
394 String operatorBox = "";
395 String connectTrap2 = "";
396 String trapCount2 = "";
397 if(((LinkedHashMap) object).keySet().contains("notBox")){
398 notBox = ((LinkedHashMap) object).get("notBox").toString();
400 if(((LinkedHashMap) object).get("connectTrap1") != null){
401 connectTrap1 = ((LinkedHashMap) object).get("connectTrap1").toString();
403 if(((LinkedHashMap) object).get("trapCount1") != null){
404 trapCount1 = ((LinkedHashMap) object).get("trapCount1").toString();
406 if(((LinkedHashMap) object).get("operatorBox") != null){
407 operatorBox = ((LinkedHashMap) object).get("operatorBox").toString();
409 if(((LinkedHashMap) object).get("connectTrap2") != null){
410 connectTrap2 = ((LinkedHashMap) object).get("connectTrap2").toString();
412 if(((LinkedHashMap) object).get("trapCount2") != null){
413 trapCount2 = ((LinkedHashMap) object).get("trapCount2").toString();
415 connectBody = notBox + "@!" + connectTrap1 + "@!" + trapCount1 + "@!" + operatorBox + "@!" + connectTrap2 + "@!" + trapCount2 + "#!?!";
417 resultBody.append(connectBody);
419 connectMainBody = connectMainBody + resultBody;
420 return connectMainBody;
425 // get Trigger signature from JSON body
426 @SuppressWarnings({ "rawtypes", "unchecked" })
427 private String getUITriggerSignature(String trap, Object object2) {
428 StringBuilder triggerBody = new StringBuilder();
429 TrapDatas trapDatas = (TrapDatas) object2;
430 ArrayList<Object> attributeList = new ArrayList<>();
432 if(trap.startsWith("Trap")){
433 if(trapDatas.getTrap1()!= null){
434 attributeList.add(trapDatas.getTrap1());
436 if(trapDatas.getTrap2()!= null){
437 attributeList.add(trapDatas.getTrap2());
439 if(trapDatas.getTrap3()!= null){
440 attributeList.add(trapDatas.getTrap3());
442 if(trapDatas.getTrap4()!= null){
443 attributeList.add(trapDatas.getTrap4());
445 if(trapDatas.getTrap5()!= null){
446 attributeList.add(trapDatas.getTrap5());
448 if(trapDatas.getTrap6()!= null){
449 attributeList.add(trapDatas.getTrap6());
452 if(trap.startsWith("Fault")){
453 if(trapDatas.getTrap1()!= null){
454 attributeList.add(trapDatas.getTrap1());
456 if(trapDatas.getTrap2()!= null){
457 attributeList.add(trapDatas.getTrap2());
459 if(trapDatas.getTrap3()!= null){
460 attributeList.add(trapDatas.getTrap3());
462 if(trapDatas.getTrap4()!= null){
463 attributeList.add(trapDatas.getTrap4());
465 if(trapDatas.getTrap5()!= null){
466 attributeList.add(trapDatas.getTrap5());
468 if(trapDatas.getTrap6()!= null){
469 attributeList.add(trapDatas.getTrap6());
474 for(int j = 0; j < attributeList.size(); j++){
475 StringBuilder signatureBody = new StringBuilder();
476 ArrayList<Object> connectTraps = (ArrayList<Object>) attributeList.get(j);
477 for(int i =0 ; i < connectTraps.size(); i++){
478 String connectBody = "";
479 Object object = connectTraps.get(i);
480 if(object instanceof LinkedHashMap<?, ?>){
482 String trigger1 = "";
483 String operatorBox = "";
484 String trigger2 = "";
485 if(((LinkedHashMap) object).keySet().contains("notBox")){
486 notBox = ((LinkedHashMap) object).get("notBox").toString();
488 if(((LinkedHashMap) object).get("trigger1") != null){
489 trigger1 = ((LinkedHashMap) object).get("trigger1").toString();
491 if(((LinkedHashMap) object).get("operatorBox") != null){
492 operatorBox = ((LinkedHashMap) object).get("operatorBox").toString();
494 if(((LinkedHashMap) object).get("trigger2") != null){
495 trigger2 = ((LinkedHashMap) object).get("trigger2").toString();
497 connectBody = notBox + "@!" + trigger1 + "@!" + operatorBox + "@!" + trigger2 + "#!";
499 signatureBody.append(connectBody);
501 triggerBody.append(signatureBody + "?!");
504 return triggerBody.toString();
507 public void prePopulateClosedLoopFaultPolicyData(PolicyRestAdapter policyAdapter, PolicyEntity entity) {
508 if (policyAdapter.getPolicyData() instanceof PolicyType) {
509 Object policyData = policyAdapter.getPolicyData();
510 PolicyType policy = (PolicyType) policyData;
511 policyAdapter.setOldPolicyFileName(policyAdapter.getPolicyName());
512 String policyNameValue = policyAdapter.getPolicyName().substring(policyAdapter.getPolicyName().indexOf("Fault_") +6);
513 policyAdapter.setPolicyName(policyNameValue);
514 String description = "";
516 description = policy.getDescription().substring(0, policy.getDescription().indexOf("@CreatedBy:"));
518 policyLogger.error("Error during collecting the description tag info for createClosedLoopFault " + policyNameValue , e);
519 description = policy.getDescription();
521 policyAdapter.setPolicyDescription(description);
522 // Get the target data under policy.
523 TargetType target = policy.getTarget();
524 if (target != null) {
525 // Under target we have AnyOFType
526 List<AnyOfType> anyOfList = target.getAnyOf();
527 if (anyOfList != null) {
528 Iterator<AnyOfType> iterAnyOf = anyOfList.iterator();
529 while (iterAnyOf.hasNext()) {
530 AnyOfType anyOf = iterAnyOf.next();
531 // Under AnyOFType we have AllOFType
532 List<AllOfType> allOfList = anyOf.getAllOf();
533 if (allOfList != null) {
534 Iterator<AllOfType> iterAllOf = allOfList.iterator();
535 while (iterAllOf.hasNext()) {
536 AllOfType allOf = iterAllOf.next();
537 // Under AllOFType we have Match
538 List<MatchType> matchList = allOf.getMatch();
539 if (matchList != null) {
540 Iterator<MatchType> iterMatch = matchList.iterator();
541 while (iterMatch.hasNext()) {
542 MatchType match = iterMatch.next();
544 // Under the match we have attribute value and
545 // attributeDesignator. So,finally down to the actual attribute.
547 AttributeValueType attributeValue = match.getAttributeValue();
548 String value = (String) attributeValue.getContent().get(0);
549 AttributeDesignatorType designator = match.getAttributeDesignator();
550 String attributeId = designator.getAttributeId();
552 // First match in the target is OnapName, so set that value.
553 if ("ONAPName".equals(attributeId)) {
554 policyAdapter.setOnapName(value);
555 OnapName onapName = new OnapName();
556 onapName.setOnapName(value);
557 policyAdapter.setOnapNameField(onapName);
559 if ("RiskType".equals(attributeId)){
560 policyAdapter.setRiskType(value);
562 if ("RiskLevel".equals(attributeId)){
563 policyAdapter.setRiskLevel(value);
565 if ("guard".equals(attributeId)){
566 policyAdapter.setGuard(value);
568 if ("TTLDate".equals(attributeId) && !value.contains("NA")){
569 PolicyController controller = new PolicyController();
570 String newDate = controller.convertDate(value);
571 policyAdapter.setTtlDate(newDate);
580 readClosedLoopJSONFile(policyAdapter, entity);
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("ACTIVE".equalsIgnoreCase(closedLoopBody.getClosedLoopPolicyStatus())){
590 closedLoopBody.setClosedLoopPolicyStatus("Active");
592 closedLoopBody.setClosedLoopPolicyStatus("InActive");
594 policyAdapter.setJsonBodyData(closedLoopBody);
595 if(closedLoopBody.getTrapMaxAge() != null){
596 policyAdapter.setTrapMaxAge(closedLoopBody.getTrapMaxAge().toString());
598 if(closedLoopBody.getTriggerTimeWindowUsedForUI() != null){
599 policyAdapter.setClearTimeOut(closedLoopBody.getTriggerTimeWindowUsedForUI().toString());
601 if(closedLoopBody.getVerificationTimeWindowUsedForUI() != null){
602 policyAdapter.setVerificationclearTimeOut(closedLoopBody.getVerificationTimeWindowUsedForUI().toString());
605 } catch (Exception e) {
606 policyLogger.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;