Skip to content

Commit 62843f3

Browse files
Merge remote-tracking branch 'origin/master'
Conflicts: src/main/java/com/kpelykh/docker/client/DockerClient.java src/test/java/com/kpelykh/docker/client/test/DockerClientTest.java
2 parents 5395edb + ff68cfe commit 62843f3

17 files changed

Lines changed: 1514 additions & 933 deletions

src/main/java/com/kpelykh/docker/client/DockerClient.java

Lines changed: 52 additions & 44 deletions
Large diffs are not rendered by default.
Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,33 @@
1-
package com.kpelykh.docker.client.model;
2-
3-
import org.codehaus.jackson.annotate.JsonProperty;
4-
5-
/**
6-
*
7-
* @author Konstantin Pelykh (kpelykh@gmail.com)
8-
*
9-
*/
10-
public class ChangeLog {
11-
12-
@JsonProperty("Path")
13-
public String path;
14-
15-
@JsonProperty("Kind")
16-
public int kind;
17-
18-
@Override
19-
public String toString() {
20-
return "ChangeLog{" +
21-
"path='" + path + '\'' +
22-
", kind=" + kind +
23-
'}';
24-
}
25-
}
1+
package com.kpelykh.docker.client.model;
2+
3+
import org.codehaus.jackson.annotate.JsonProperty;
4+
5+
/**
6+
*
7+
* @author Konstantin Pelykh (kpelykh@gmail.com)
8+
*
9+
*/
10+
public class ChangeLog {
11+
12+
@JsonProperty("Path")
13+
private String path;
14+
15+
@JsonProperty("Kind")
16+
private int kind;
17+
18+
public String getPath() {
19+
return path;
20+
}
21+
22+
public int getKind() {
23+
return kind;
24+
}
25+
26+
@Override
27+
public String toString() {
28+
return "ChangeLog{" +
29+
"path='" + path + '\'' +
30+
", kind=" + kind +
31+
'}';
32+
}
33+
}
Lines changed: 136 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,136 @@
1-
package com.kpelykh.docker.client.model;
2-
3-
import org.codehaus.jackson.annotate.JsonProperty;
4-
5-
/**
6-
*
7-
* @author Konstantin Pelykh (kpelykh@gmail.com)
8-
*
9-
*/
10-
public class CommitConfig {
11-
12-
@JsonProperty("container") public String container;
13-
@JsonProperty("repo") public String repo;
14-
@JsonProperty("tag") public String tag;
15-
@JsonProperty("m") public String message;
16-
17-
//author (eg. “John Hannibal Smith <hannibal@a-team.com>”)
18-
@JsonProperty("author") public String author;
19-
20-
//config automatically applied when the image is run. (ex: {“Cmd”: [“cat”, “/world”], “PortSpecs”:[“22”]})
21-
@JsonProperty("run") public String run;
22-
23-
24-
public CommitConfig() {}
25-
26-
public CommitConfig(Builder builder) {
27-
this.container = builder.container;
28-
this.repo = builder.repo;
29-
this.tag = builder.tag;
30-
this.message = builder.message;
31-
this.author = builder.author;
32-
this.run = builder.run;
33-
}
34-
35-
public static class Builder {
36-
private String container;
37-
private String repo;
38-
private String tag;
39-
private String message;
40-
private String author;
41-
private String run;
42-
43-
public Builder(String containerId) {
44-
this.container = containerId;
45-
}
46-
47-
public Builder repo(String repo) {
48-
this.repo = repo;
49-
return this;
50-
}
51-
52-
public Builder tag(String tag) {
53-
this.tag = tag;
54-
return this;
55-
}
56-
57-
public Builder message(String message) {
58-
this.message = message;
59-
return this;
60-
}
61-
62-
public Builder author(String author) {
63-
this.author = author;
64-
return this;
65-
}
66-
67-
public Builder run(String run) {
68-
this.run = run;
69-
return this;
70-
}
71-
72-
public CommitConfig build() {
73-
return new CommitConfig(this);
74-
}
75-
}
76-
77-
}
1+
package com.kpelykh.docker.client.model;
2+
3+
import org.codehaus.jackson.annotate.JsonProperty;
4+
5+
/**
6+
*
7+
* @author Konstantin Pelykh (kpelykh@gmail.com)
8+
*
9+
*/
10+
public class CommitConfig {
11+
12+
@JsonProperty("container")
13+
private String container;
14+
15+
@JsonProperty("repo")
16+
private String repo;
17+
18+
@JsonProperty("tag")
19+
private String tag;
20+
21+
@JsonProperty("m")
22+
private String message;
23+
24+
//author (eg. “John Hannibal Smith <hannibal@a-team.com>”)
25+
@JsonProperty("author")
26+
private String author;
27+
28+
//config automatically applied when the image is run. (ex: {“Cmd”: [“cat”, “/world”], “PortSpecs”:[“22”]})
29+
@JsonProperty("run")
30+
private String run;
31+
32+
public String getContainer() {
33+
return container;
34+
}
35+
36+
public String getRepo() {
37+
return repo;
38+
}
39+
40+
public String getTag() {
41+
return tag;
42+
}
43+
44+
public String getMessage() {
45+
return message;
46+
}
47+
48+
public String getAuthor() {
49+
return author;
50+
}
51+
52+
public String getRun() {
53+
return run;
54+
}
55+
56+
public CommitConfig setRepo(String repo) {
57+
this.repo = repo;
58+
return this;
59+
}
60+
61+
public CommitConfig setTag(String tag) {
62+
this.tag = tag;
63+
return this;
64+
}
65+
66+
public CommitConfig setMessage(String message) {
67+
this.message = message;
68+
return this;
69+
}
70+
71+
public CommitConfig setAuthor(String author) {
72+
this.author = author;
73+
return this;
74+
}
75+
76+
public CommitConfig setRun(String run) {
77+
this.run = run;
78+
return this;
79+
}
80+
81+
public CommitConfig(String container) {
82+
this.container = container;
83+
}
84+
85+
private CommitConfig(Builder b) {
86+
this.container = b.container;
87+
this.repo = b.repo;
88+
this.tag = b.tag;
89+
this.message = b.message;
90+
this.author = b.author;
91+
this.run = b.run;
92+
}
93+
94+
public static class Builder implements IBuilder<CommitConfig> {
95+
private String container;
96+
private String repo;
97+
private String tag;
98+
private String message;
99+
private String author;
100+
private String run;
101+
102+
public Builder(String containerId) {
103+
this.container = containerId;
104+
}
105+
106+
public Builder repo(String repo) {
107+
this.repo = repo;
108+
return this;
109+
}
110+
111+
public Builder tag(String tag) {
112+
this.tag = tag;
113+
return this;
114+
}
115+
116+
public Builder message(String message) {
117+
this.message = message;
118+
return this;
119+
}
120+
121+
public Builder author(String author) {
122+
this.author = author;
123+
return this;
124+
}
125+
126+
public Builder run(String run) {
127+
this.run = run;
128+
return this;
129+
}
130+
131+
public CommitConfig build() {
132+
return new CommitConfig(this);
133+
}
134+
}
135+
136+
}

0 commit comments

Comments
 (0)