|
23 | 23 | import java.util.Map; |
24 | 24 | import java.util.Optional; |
25 | 25 | import org.openqa.selenium.bidi.script.RemoteReference; |
26 | | -import org.openqa.selenium.bidi.script.ResultOwnership; |
27 | 26 | import org.openqa.selenium.bidi.script.SerializationOptions; |
28 | 27 |
|
29 | 28 | public class LocateNodeParameters { |
30 | 29 |
|
31 | 30 | private final Locator locator; |
32 | 31 | private Optional<Long> maxNodeCount = Optional.empty(); |
33 | | - private Optional<ResultOwnership> ownership = Optional.empty(); |
34 | 32 | private Optional<String> sandbox = Optional.empty(); |
35 | 33 | private Optional<SerializationOptions> serializationOptions = Optional.empty(); |
36 | 34 | private Optional<List<RemoteReference>> startNodes = Optional.empty(); |
37 | 35 |
|
38 | | - private LocateNodeParameters(Builder builder) { |
39 | | - this.locator = builder.locator; |
40 | | - this.maxNodeCount = Optional.ofNullable(builder.maxNodeCount); |
41 | | - this.sandbox = Optional.ofNullable(builder.sandbox); |
42 | | - this.serializationOptions = Optional.ofNullable(builder.serializationOptions); |
43 | | - this.startNodes = Optional.ofNullable(builder.startNodes); |
44 | | - } |
45 | | - |
46 | 36 | public LocateNodeParameters(Locator locator) { |
47 | 37 | this.locator = locator; |
48 | 38 | } |
@@ -83,47 +73,4 @@ public Map<String, Object> toMap() { |
83 | 73 |
|
84 | 74 | return map; |
85 | 75 | } |
86 | | - |
87 | | - /** |
88 | | - * @deprecated Use the chaining of LocateNodeParameters methods to add optional parameters. This |
89 | | - * is in favor of keeping the usage pattern consistent for BiDi parameters. Use the {@link |
90 | | - * LocateNodeParameters#LocateNodeParameters(Locator locator)} constructor and chain methods. |
91 | | - */ |
92 | | - @Deprecated(since = "4.20", forRemoval = true) |
93 | | - public static class Builder { |
94 | | - |
95 | | - private final Locator locator; |
96 | | - private Long maxNodeCount = null; |
97 | | - private String sandbox; |
98 | | - private SerializationOptions serializationOptions; |
99 | | - private List<RemoteReference> startNodes; |
100 | | - |
101 | | - public Builder(Locator locator) { |
102 | | - this.locator = locator; |
103 | | - } |
104 | | - |
105 | | - public Builder setMaxNodeCount(long maxNodeCount) { |
106 | | - this.maxNodeCount = maxNodeCount; |
107 | | - return this; |
108 | | - } |
109 | | - |
110 | | - public Builder setSandbox(String sandbox) { |
111 | | - this.sandbox = sandbox; |
112 | | - return this; |
113 | | - } |
114 | | - |
115 | | - public Builder setSerializationOptions(SerializationOptions options) { |
116 | | - this.serializationOptions = options; |
117 | | - return this; |
118 | | - } |
119 | | - |
120 | | - public Builder setStartNodes(List<RemoteReference> startNodes) { |
121 | | - this.startNodes = startNodes; |
122 | | - return this; |
123 | | - } |
124 | | - |
125 | | - public LocateNodeParameters build() { |
126 | | - return new LocateNodeParameters(this); |
127 | | - } |
128 | | - } |
129 | 76 | } |
0 commit comments