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 | package Torello.Browser.JavaScriptAPI;
// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
// Java-HTML Imports
// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
import Torello.Browser.*;
import Torello.Browser.helper.*;
import Torello.Browser.BrowserAPI.*;
import Torello.JSON.*;
import Torello.Java.ReadOnly.ReadOnlyList;
import Torello.Java.ReadOnly.ReadOnlyArrayList;
import Torello.JavaDoc.Annotations.StaticFunctional;
import Torello.JavaDoc.Annotations.JDHeaderBackgroundImg;
import Torello.Browser.JavaScriptAPI.NestedHelpers.Commands.Schema$$Commands;
// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
// JDK Imports
// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
import javax.json.JsonObject;
import javax.json.JsonValue;
/**
* <SPAN CLASS=COPIEDJDK><B>This domain is deprecated.</B></SPAN>
* <EMBED CLASS='external-html' DATA-FILE-ID=CDP.CODE_GEN_NOTE>
*/
@StaticFunctional@JDHeaderBackgroundImg(EmbedTagFileID="CDP.WOOD_PLANK_NOTE")
public class Schema
{
// No Pubic Constructors
private Schema() { }
// ********************************************************************************************
// ********************************************************************************************
// Basic Types
// ********************************************************************************************
// ********************************************************************************************
/**
* Description of the protocol domain.
*
* <EMBED CLASS=globalDefs DATA-DOMAIN=Schema DATA-API=JavaScriptAPI>
*/
@JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
public static class Domain
extends BaseType<Domain>
implements java.io.Serializable
{
/** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
protected static final long serialVersionUID = 1;
private static final NestedHelper<Schema.Domain> singleton =
Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
Schema$$Domain$$.singleton;
/** Domain name. */
public final String name;
/** Domain version. */
public final String version;
/** Constructor. Please review this class' fields for documentation. */
public Domain(ReadOnlyList<Boolean> isPresent, String name, String version)
{
super(singleton, Domains.Schema, "Domain", 2);
this.name = name;
this.version = version;
this.isPresent = (isPresent == null)
? singleton.generateIsPresentList(this)
: THROWS.check(isPresent, 2, "Schema.Domain");
}
/** Creates an instance of this class from a {@link JsonObject}.*/
public static Domain fromJSON(JsonObject jo)
{ return singleton.fromJSON(jo); }
/** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
public static NestedDescriptor<Domain> descriptor()
{ return singleton.descriptor(); }
}
// ********************************************************************************************
// ********************************************************************************************
// Commands
// ********************************************************************************************
// ********************************************************************************************
/**
* Returns supported domains.
*
* @return An instance of <CODE>{@link Script}<{@link Schema.Domain}[]></CODE>
*
* <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
* {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
* <CODE><{@link Schema.Domain}[]></CODE> will be returned
*
* <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
* using {@link Promise#await()}, <I>and the returned result of this Browser Function may
* be retrieved.</I>
*
* <BR /><BR /><DIV CLASS=JDHint>
* This Browser Function's {@code Promise} returns:
* <CODE>{@link Schema.Domain}[] (<B>domains</B>)</CODE>
* <BR />
* List of supported domains.
* </DIV>
*/
public static Script<Schema.Domain[]> getDomains()
{
// Ultra-Simple Request JSON - Because this method has no parameters
final String requestJSON = "{\"method\":\"Schema.getDomains\"}";
return new Script<>(
Domains.Schema, "getDomains", requestJSON,
Schema$$Commands::getDomains,
Schema.Domain[].class
);
}
}
|