1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145 | package Torello.Browser.BrowserAPI.NestedHelpers.Commands;
import static Torello.Browser.CDPTypes.*; // The 'Type as Byte' constants
import Torello.JSON.*;
import Torello.Browser.BrowserAPI.*;
import Torello.Browser.Domains;
import Torello.Browser.CommandDescriptor;
import Torello.Browser.helper.DV;
import Torello.Java.ReadOnly.ReadOnlyArrayList;
import javax.json.JsonObject;
import javax.json.JsonValue; // Not all helpers require this
import Torello.Browser.JavaScriptAPI.RunTime;
import Torello.Browser.JavaScriptAPI.Debugger;
public class IndexedDB$$Commands
{
// ********************************************************************************************
// ********************************************************************************************
// Command Descriptors
// ********************************************************************************************
// ********************************************************************************************
public static final CommandDescriptor<Void> clearObjectStore$$=
new CommandDescriptor<>(
"clearObjectStore", Domains.IndexedDB,
new ReadOnlyArrayList<>(
String.class, "securityOrigin", "storageKey", "storageBucket", "databaseName",
"objectStoreName"
),
new ReadOnlyArrayList<>(Byte.class, STRING, STRING, CDP_TYPE, STRING, STRING),
new ReadOnlyArrayList<>(Boolean.class, true, true, true, false, false),
new ReadOnlyArrayList<>(Boolean.class, false, false, false, false, false),
Void.class
);
public static final CommandDescriptor<Void> deleteDatabase$$=
new CommandDescriptor<>(
"deleteDatabase", Domains.IndexedDB,
new ReadOnlyArrayList<>
(String.class, "securityOrigin", "storageKey", "storageBucket", "databaseName"),
new ReadOnlyArrayList<>(Byte.class, STRING, STRING, CDP_TYPE, STRING),
new ReadOnlyArrayList<>(Boolean.class, true, true, true, false),
new ReadOnlyArrayList<>(Boolean.class, false, false, false, false),
Void.class
);
public static final CommandDescriptor<Void> deleteObjectStoreEntries$$=
new CommandDescriptor<>(
"deleteObjectStoreEntries", Domains.IndexedDB,
new ReadOnlyArrayList<>(
String.class, "securityOrigin", "storageKey", "storageBucket", "databaseName",
"objectStoreName", "keyRange"
),
new ReadOnlyArrayList<>
(Byte.class, STRING, STRING, CDP_TYPE, STRING, STRING, CDP_TYPE),
new ReadOnlyArrayList<>(Boolean.class, true, true, true, false, false, false),
new ReadOnlyArrayList<>(Boolean.class, false, false, false, false, false, false),
Void.class
);
public static final CommandDescriptor<IndexedDB.getMetadata$$RET> getMetadata$$=
new CommandDescriptor<>(
"getMetadata", Domains.IndexedDB,
new ReadOnlyArrayList<>(
String.class, "securityOrigin", "storageKey", "storageBucket", "databaseName",
"objectStoreName"
),
new ReadOnlyArrayList<>(Byte.class, STRING, STRING, CDP_TYPE, STRING, STRING),
new ReadOnlyArrayList<>(Boolean.class, true, true, true, false, false),
new ReadOnlyArrayList<>(Boolean.class, false, false, false, false, false),
IndexedDB.getMetadata$$RET.class
);
public static final CommandDescriptor<IndexedDB.requestData$$RET> requestData$$=
new CommandDescriptor<>(
"requestData", Domains.IndexedDB,
new ReadOnlyArrayList<>(
String.class, "securityOrigin", "storageKey", "storageBucket", "databaseName",
"objectStoreName", "indexName", "skipCount", "pageSize", "keyRange"
),
new ReadOnlyArrayList<>(
Byte.class, STRING, STRING, CDP_TYPE, STRING, STRING, STRING, PRIMITIVE_INT,
PRIMITIVE_INT, CDP_TYPE
),
new ReadOnlyArrayList<>
(Boolean.class, true, true, true, false, false, false, false, false, true),
new ReadOnlyArrayList<>
(Boolean.class, false, false, false, false, false, false, false, false, false),
IndexedDB.requestData$$RET.class
);
public static final CommandDescriptor<IndexedDB.DatabaseWithObjectStores> requestDatabase$$=
new CommandDescriptor<>(
"requestDatabase", Domains.IndexedDB,
new ReadOnlyArrayList<>
(String.class, "securityOrigin", "storageKey", "storageBucket", "databaseName"),
new ReadOnlyArrayList<>(Byte.class, STRING, STRING, CDP_TYPE, STRING),
new ReadOnlyArrayList<>(Boolean.class, true, true, true, false),
new ReadOnlyArrayList<>(Boolean.class, false, false, false, false),
IndexedDB.DatabaseWithObjectStores.class
);
public static final CommandDescriptor<String[]> requestDatabaseNames$$=
new CommandDescriptor<>(
"requestDatabaseNames", Domains.IndexedDB,
new ReadOnlyArrayList<>(String.class, "securityOrigin", "storageKey", "storageBucket"),
new ReadOnlyArrayList<>(Byte.class, STRING, STRING, CDP_TYPE),
new ReadOnlyArrayList<>(Boolean.class, true, true, true),
new ReadOnlyArrayList<>(Boolean.class, false, false, false),
String[].class
);
// ********************************************************************************************
// ********************************************************************************************
// JSON Response Methods
// ********************************************************************************************
// ********************************************************************************************
public static IndexedDB.DatabaseWithObjectStores requestDatabase(final JsonObject jo)
{
return ReadJSON.getObject(
jo, "databaseWithObjectStores",
IndexedDB.DatabaseWithObjectStores::fromJSON,
IndexedDB.DatabaseWithObjectStores.class,
true, false
);
}
public static String[] requestDatabaseNames(final JsonObject jo)
{
return (jo.getJsonArray("databaseNames") == null)
? null
: RJArrIntoStream
.strArr(jo.getJsonArray("databaseNames"), null, 0)
.toArray(String[]::new);
}
}
|