Skip to content

Commit 2dc7626

Browse files
committed
Combined stackify-api and stackify-api-common into stackify-api-java
1 parent 6e3c120 commit 2dc7626

17 files changed

Lines changed: 3191 additions & 14 deletions

pom.xml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<modelVersion>4.0.0</modelVersion>
33

44
<groupId>com.stackify</groupId>
5-
<artifactId>stackify-api-common</artifactId>
6-
<version>1.0.16-SNAPSHOT</version>
5+
<artifactId>stackify-api-java</artifactId>
6+
<version>2.0.0-SNAPSHOT</version>
77

8-
<name>Stackify API Common</name>
9-
<description>Stackify API Common</description>
10-
<url>https://github.com/stackify/stackify-api-common</url>
8+
<name>Stackify API for Java</name>
9+
<description>Stackify API for Java</description>
10+
<url>https://github.com/stackify/stackify-api-java</url>
1111

1212
<parent>
1313
<groupId>org.sonatype.oss</groupId>
@@ -23,9 +23,9 @@
2323
</licenses>
2424

2525
<scm>
26-
<connection>scm:git:git://github.com/stackify/stackify-api-common.git</connection>
27-
<developerConnection>scm:git:git@github.com:stackify/stackify-api-common.git</developerConnection>
28-
<url>https://github.com/stackify/stackify-api-common</url>
26+
<connection>scm:git:git://github.com/stackify/stackify-api-java.git</connection>
27+
<developerConnection>scm:git:git@github.com:stackify/stackify-api-java.git</developerConnection>
28+
<url>https://github.com/stackify/stackify-api-java</url>
2929
</scm>
3030

3131
<organization>
@@ -48,12 +48,6 @@
4848

4949
<!-- Compile time dependencies -->
5050

51-
<dependency>
52-
<groupId>com.stackify</groupId>
53-
<artifactId>stackify-api</artifactId>
54-
<version>1.0.6</version>
55-
</dependency>
56-
5751
<dependency>
5852
<groupId>com.google.guava</groupId>
5953
<artifactId>guava</artifactId>
@@ -66,6 +60,18 @@
6660
<version>1.7.5</version>
6761
</dependency>
6862

63+
<dependency>
64+
<groupId>com.fasterxml.jackson.core</groupId>
65+
<artifactId>jackson-annotations</artifactId>
66+
<version>2.1.2</version>
67+
</dependency>
68+
69+
<dependency>
70+
<groupId>com.fasterxml.jackson.core</groupId>
71+
<artifactId>jackson-databind</artifactId>
72+
<version>2.1.3</version>
73+
</dependency>
74+
6975
<!-- Runtime dependencies -->
7076

7177
<!-- Test dependencies -->
Lines changed: 323 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,323 @@
1+
/*
2+
* Copyright 2014 Stackify
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.stackify.api;
17+
18+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
19+
import com.fasterxml.jackson.annotation.JsonInclude;
20+
import com.fasterxml.jackson.annotation.JsonProperty;
21+
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
22+
23+
/**
24+
* AppIdentity
25+
* @author Eric Martin
26+
*/
27+
@JsonInclude(JsonInclude.Include.NON_NULL)
28+
@JsonDeserialize(builder = AppIdentity.Builder.class)
29+
public class AppIdentity {
30+
31+
/**
32+
* Device id
33+
*/
34+
@JsonProperty("DeviceID")
35+
private final Integer deviceId;
36+
37+
/**
38+
* Device application id
39+
*/
40+
@JsonProperty("DeviceAppID")
41+
private final Integer deviceAppId;
42+
43+
/**
44+
* Application name id
45+
*/
46+
@JsonProperty("AppNameID")
47+
private final String appNameId;
48+
49+
/**
50+
* Environment id
51+
*/
52+
@JsonProperty("EnvID")
53+
private final Integer envId;
54+
55+
/**
56+
* Environment
57+
*/
58+
@JsonProperty("Env")
59+
private final String env;
60+
61+
/**
62+
* Application name
63+
*/
64+
@JsonProperty("AppName")
65+
private final String appName;
66+
67+
/**
68+
* Application-Environment id
69+
*/
70+
@JsonProperty("AppEnvID")
71+
private final String appEnvId;
72+
73+
/**
74+
* Device alias
75+
*/
76+
@JsonProperty("DeviceAlias")
77+
private final String deviceAlias;
78+
79+
/**
80+
* @return the deviceId
81+
*/
82+
public Integer getDeviceId() {
83+
return deviceId;
84+
}
85+
86+
/**
87+
* @return the deviceAppId
88+
*/
89+
public Integer getDeviceAppId() {
90+
return deviceAppId;
91+
}
92+
93+
/**
94+
* @return the appNameId
95+
*/
96+
public String getAppNameId() {
97+
return appNameId;
98+
}
99+
100+
/**
101+
* @return the envId
102+
*/
103+
public Integer getEnvId() {
104+
return envId;
105+
}
106+
107+
/**
108+
* @return the env
109+
*/
110+
public String getEnv() {
111+
return env;
112+
}
113+
114+
/**
115+
* @return the appName
116+
*/
117+
public String getAppName() {
118+
return appName;
119+
}
120+
121+
/**
122+
* @return the appEnvId
123+
*/
124+
public String getAppEnvId() {
125+
return appEnvId;
126+
}
127+
128+
/**
129+
* @return the deviceAlias
130+
*/
131+
public String getDeviceAlias() {
132+
return deviceAlias;
133+
}
134+
135+
/**
136+
* @return An instance of Builder, based on current state
137+
*/
138+
public Builder toBuilder() {
139+
return newBuilder()
140+
.deviceId(this.deviceId)
141+
.deviceAppId(this.deviceAppId)
142+
.appNameId(this.appNameId)
143+
.envId(this.envId)
144+
.env(this.env)
145+
.appName(this.appName)
146+
.appEnvId(this.appEnvId)
147+
.deviceAlias(this.deviceAlias);
148+
}
149+
150+
/**
151+
* @param builder The Builder object that contains all of the values for initialization
152+
*/
153+
private AppIdentity(final Builder builder) {
154+
this.deviceId = builder.deviceId;
155+
this.deviceAppId = builder.deviceAppId;
156+
this.appNameId = builder.appNameId;
157+
this.envId = builder.envId;
158+
this.env = builder.env;
159+
this.appName = builder.appName;
160+
this.appEnvId = builder.appEnvId;
161+
this.deviceAlias = builder.deviceAlias;
162+
}
163+
164+
/**
165+
* @return A new instance of the Builder
166+
*/
167+
public static Builder newBuilder() {
168+
return new Builder();
169+
}
170+
171+
/**
172+
* AppIdentity.Builder separates the construction of a AppIdentity from its representation
173+
*/
174+
@JsonIgnoreProperties(ignoreUnknown = true)
175+
public static class Builder {
176+
177+
/**
178+
* The builder's deviceId
179+
*/
180+
@JsonProperty("DeviceID")
181+
private Integer deviceId;
182+
183+
/**
184+
* The builder's deviceAppId
185+
*/
186+
@JsonProperty("DeviceAppID")
187+
private Integer deviceAppId;
188+
189+
/**
190+
* The builder's appNameId
191+
*/
192+
@JsonProperty("AppNameID")
193+
private String appNameId;
194+
195+
/**
196+
* The builder's envId
197+
*/
198+
@JsonProperty("EnvID")
199+
private Integer envId;
200+
201+
/**
202+
* The builder's env
203+
*/
204+
@JsonProperty("Env")
205+
private String env;
206+
207+
/**
208+
* The builder's appName
209+
*/
210+
@JsonProperty("AppName")
211+
private String appName;
212+
213+
/**
214+
* The builder's appEnvId
215+
*/
216+
@JsonProperty("AppEnvID")
217+
private String appEnvId;
218+
219+
/**
220+
* The builder's deviceAlias
221+
*/
222+
@JsonProperty("DeviceAlias")
223+
private String deviceAlias;
224+
225+
/**
226+
* Sets the builder's deviceId
227+
* @param deviceId The deviceId to be set
228+
* @return Reference to the current object
229+
*/
230+
public Builder deviceId(final Integer deviceId) {
231+
this.deviceId = deviceId;
232+
return this;
233+
}
234+
235+
/**
236+
* Sets the builder's deviceAppId
237+
* @param deviceAppId The deviceAppId to be set
238+
* @return Reference to the current object
239+
*/
240+
public Builder deviceAppId(final Integer deviceAppId) {
241+
this.deviceAppId = deviceAppId;
242+
return this;
243+
}
244+
245+
/**
246+
* Sets the builder's appNameId
247+
* @param appNameId The appNameId to be set
248+
* @return Reference to the current object
249+
*/
250+
public Builder appNameId(final String appNameId) {
251+
this.appNameId = appNameId;
252+
return this;
253+
}
254+
255+
/**
256+
* Sets the builder's envId
257+
* @param envId The envId to be set
258+
* @return Reference to the current object
259+
*/
260+
public Builder envId(final Integer envId) {
261+
this.envId = envId;
262+
return this;
263+
}
264+
265+
/**
266+
* Sets the builder's env
267+
* @param env The env to be set
268+
* @return Reference to the current object
269+
*/
270+
public Builder env(final String env) {
271+
this.env = env;
272+
return this;
273+
}
274+
275+
/**
276+
* Sets the builder's appName
277+
* @param appName The appName to be set
278+
* @return Reference to the current object
279+
*/
280+
public Builder appName(final String appName) {
281+
this.appName = appName;
282+
return this;
283+
}
284+
285+
/**
286+
* Sets the builder's appEnvId
287+
* @param appEnvId The appEnvId to be set
288+
* @return Reference to the current object
289+
*/
290+
public Builder appEnvId(final String appEnvId) {
291+
this.appEnvId = appEnvId;
292+
return this;
293+
}
294+
295+
/**
296+
* Sets the builder's deviceAlias
297+
* @param deviceAlias The deviceAlias to be set
298+
* @return Reference to the current object
299+
*/
300+
public Builder deviceAlias(final String deviceAlias) {
301+
this.deviceAlias = deviceAlias;
302+
return this;
303+
}
304+
305+
/**
306+
* @return A new object constructed from this builder
307+
*/
308+
public AppIdentity build() {
309+
return new AppIdentity(this);
310+
}
311+
}
312+
313+
/**
314+
* @see java.lang.Object#toString()
315+
*/
316+
@Override
317+
public String toString() {
318+
return "AppIdentity{deviceId=" + deviceId + ", deviceAppId="
319+
+ deviceAppId + ", appNameId=" + appNameId + ", envId=" + envId
320+
+ ", env=" + env + ", appName=" + appName + ", appEnvId="
321+
+ appEnvId + ", deviceAlias=" + deviceAlias + "}";
322+
}
323+
}

0 commit comments

Comments
 (0)