forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathListSecretsCmdImpl.java
More file actions
49 lines (39 loc) · 1.29 KB
/
Copy pathListSecretsCmdImpl.java
File metadata and controls
49 lines (39 loc) · 1.29 KB
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
package com.github.dockerjava.core.command;
import com.github.dockerjava.api.command.ListSecretsCmd;
import com.github.dockerjava.api.model.Secret;
import com.github.dockerjava.core.util.FiltersBuilder;
import java.util.List;
import java.util.Map;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* List services.
*/
public class ListSecretsCmdImpl extends AbstrDockerCmd<ListSecretsCmd, List<Secret>> implements
ListSecretsCmd {
private FiltersBuilder filters = new FiltersBuilder();
public ListSecretsCmdImpl(Exec exec) {
super(exec);
}
@Override
public Map<String, List<String>> getFilters() {
return filters.build();
}
@Override
public ListSecretsCmd withIdFilter(List<String> ids) {
checkNotNull(ids, "ids was not specified");
this.filters.withFilter("id", ids);
return this;
}
@Override
public ListSecretsCmd withNameFilter(List<String> names) {
checkNotNull(names, "names was not specified");
this.filters.withFilter("name", names);
return this;
}
@Override
public ListSecretsCmd withLabelFilter(Map<String, String> labels) {
checkNotNull(labels, "labels was not specified");
this.filters.withLabels(labels);
return this;
}
}