Clover icon

Coverage Report

  1. Project Clover database Tue Mar 10 2026 14:58:44 GMT
  2. Package jalview.ws2.api

File WebService.java

 

Coverage histogram

../../../img/srcFileCovDistChart0.png
0% of files have more coverage

Code metrics

0
44
22
2
182
141
22
0.5
2
11
1

Classes

Class Line # Actions
WebService 12 27 13
0.00%
WebService.Builder 14 17 9
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package jalview.ws2.api;
2   
3    import java.net.URL;
4    import java.util.ArrayList;
5    import java.util.Collection;
6    import java.util.List;
7    import jalview.ws.params.ParamDatastoreI;
8    import jalview.ws2.actions.api.ActionI;
9   
10    import static java.util.Objects.requireNonNull;
11   
 
12    public class WebService<A extends ActionI<?>>
13    {
 
14    public static class Builder<A extends ActionI<?>>
15    {
16    private URL url;
17   
18    private String clientName;
19   
20    private String category;
21   
22    private String name;
23   
24    private String description = "";
25   
26    private boolean interactive = false;
27   
28    private ParamDatastoreI paramDatastore;
29   
30    private Class<A> actionClass;
31   
 
32  0 toggle public Builder<A> url(URL val)
33    {
34  0 url = val;
35  0 return this;
36    }
37   
 
38  0 toggle public Builder<A> clientName(String val)
39    {
40  0 clientName = val;
41  0 return this;
42    }
43   
 
44  0 toggle public Builder<A> category(String val)
45    {
46  0 category = val;
47  0 return this;
48    }
49   
 
50  0 toggle public Builder<A> name(String val)
51    {
52  0 name = val;
53  0 return this;
54    }
55   
 
56  0 toggle public Builder<A> description(String val)
57    {
58  0 description = val;
59  0 return this;
60    }
61   
 
62  0 toggle public Builder<A> interactive(boolean val)
63    {
64  0 interactive = val;
65  0 return this;
66    }
67   
 
68  0 toggle public Builder<A> paramDatastore(ParamDatastoreI val)
69    {
70  0 paramDatastore = val;
71  0 return this;
72    }
73   
 
74  0 toggle public Builder<A> actionClass(Class<A> val)
75    {
76  0 actionClass = val;
77  0 return this;
78    }
79   
 
80  0 toggle public WebService<A> build()
81    {
82  0 return new WebService<A>(this);
83    }
84    }
85   
86    private final URL url;
87   
88    private final String clientName;
89   
90    private final String category;
91   
92    private final String name;
93   
94    private final String description;
95   
96    private final boolean interactive;
97   
98    private final ParamDatastoreI paramDatastore;
99   
100    private final List<A> actions;
101   
102    private final Class<A> actionClass;
103   
 
104  0 toggle protected WebService(Builder<A> builder)
105    {
106  0 requireNonNull(builder.url);
107  0 requireNonNull(builder.clientName);
108  0 requireNonNull(builder.category);
109  0 requireNonNull(builder.name);
110  0 requireNonNull(builder.paramDatastore);
111  0 requireNonNull(builder.actionClass);
112  0 this.url = builder.url;
113  0 this.clientName = builder.clientName;
114  0 this.category = builder.category;
115  0 this.name = builder.name;
116  0 this.description = builder.description;
117  0 this.interactive = builder.interactive;
118  0 this.paramDatastore = builder.paramDatastore;
119  0 this.actions = new ArrayList<>();
120  0 this.actionClass = builder.actionClass;
121    }
122   
 
123  0 toggle public static <A extends ActionI<?>> Builder<A> newBuilder()
124    {
125  0 return new Builder<A>();
126    }
127   
 
128  0 toggle public void addAction(A action)
129    {
130  0 this.actions.add(action);
131    }
132   
 
133  0 toggle public void addActions(Collection<? extends A> actions)
134    {
135  0 this.actions.addAll(actions);
136    }
137   
 
138  0 toggle public URL getUrl()
139    {
140  0 return url;
141    }
142   
 
143  0 toggle public String getClientName()
144    {
145  0 return clientName;
146    }
147   
 
148  0 toggle public String getCategory()
149    {
150  0 return category;
151    }
152   
 
153  0 toggle public String getName()
154    {
155  0 return name;
156    }
157   
 
158  0 toggle public String getDescription()
159    {
160  0 return description;
161    }
162   
 
163  0 toggle public boolean isInteractive()
164    {
165  0 return interactive;
166    }
167   
 
168  0 toggle public ParamDatastoreI getParamDatastore()
169    {
170  0 return paramDatastore;
171    }
172   
 
173  0 toggle public List<A> getActions()
174    {
175  0 return actions;
176    }
177   
 
178  0 toggle public Class<A> getActionClass()
179    {
180  0 return actionClass;
181    }
182    }