1
2
3
4
5
6
7
8
9
10
11 package com.jsql.view.swing.list;
12
13 import org.json.JSONObject;
14
15
16
17
18 public class ItemListScan extends ItemList {
19
20 private final BeanInjection beanInjection;
21
22 public ItemListScan(BeanInjection newString) {
23 super(newString.getUrl());
24 this.beanInjection = newString;
25 }
26
27 public ItemListScan(JSONObject json) {
28 this(new BeanInjection(
29 json.optString("url"),
30 json.optString("request"),
31 json.optString("header"),
32 json.optString("method"),
33 json.optString("vendor"),
34 json.optString("requestType")
35 ));
36 }
37
38 public BeanInjection getBeanInjection() {
39 return this.beanInjection;
40 }
41
42 public String getBeanInjectionToJSON() {
43 return new JSONObject(this.beanInjection).toString();
44 }
45 }