Skip to content

Commit

Permalink
Added application/environment id to the LogMsgGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-martin committed Aug 20, 2014
1 parent b518752 commit 0cc8008
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/main/java/com/stackify/api/LogMsgGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ public class LogMsgGroup {
@JsonProperty("AppNameID")
private final String appNameId;

/**
* Application/environment id
*/
@JsonProperty("AppEnvID")
private final String appEnvId;

/**
* Environment id
*/
Expand Down Expand Up @@ -116,6 +122,13 @@ public String getAppNameId() {
return appNameId;
}

/**
* @return the appEnvId
*/
public String getAppEnvId() {
return appEnvId;
}

/**
* @return the envId
*/
Expand Down Expand Up @@ -179,6 +192,7 @@ private LogMsgGroup(final Builder builder) {
this.cdId = builder.cdId;
this.cdAppId = builder.cdAppId;
this.appNameId = builder.appNameId;
this.appEnvId = builder.appEnvId;
this.envId = builder.envId;
this.env = builder.env;
this.serverName = builder.serverName;
Expand Down Expand Up @@ -219,6 +233,12 @@ public static class Builder {
@JsonProperty("AppNameID")
private String appNameId;

/**
* The builder's appEnvId
*/
@JsonProperty("AppEnvID")
private String appEnvId;

/**
* The builder's envId
*/
Expand Down Expand Up @@ -297,6 +317,16 @@ public Builder appNameId(final String appNameId) {
return this;
}

/**
* Sets the builder's appEnvId
* @param appEnvId The appEnvId to be set
* @return Reference to the current object
*/
public Builder appEnvId(final String appEnvId) {
this.appEnvId = appEnvId;
return this;
}

/**
* Sets the builder's envId
* @param envId The envId to be set
Expand Down
3 changes: 3 additions & 0 deletions src/test/java/com/stackify/api/LogMsgGroupTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public void testBuilder() {
Integer cdId = Integer.valueOf(14);
Integer cdAppId = Integer.valueOf(15);
String appNameId = "appNameId";
String appEnvId = "appEnvId";
Integer envId = Integer.valueOf(16);
String env = "env";
String serverName = "serverName";
Expand All @@ -48,6 +49,7 @@ public void testBuilder() {
builder.cdId(cdId);
builder.cdAppId(cdAppId);
builder.appNameId(appNameId);
builder.appEnvId(appEnvId);
builder.envId(envId);
builder.env(env);
builder.serverName(serverName);
Expand All @@ -64,6 +66,7 @@ public void testBuilder() {
Assert.assertEquals(cdId, logMsgGroup.getCdId());
Assert.assertEquals(cdAppId, logMsgGroup.getCdAppId());
Assert.assertEquals(appNameId, logMsgGroup.getAppNameId());
Assert.assertEquals(appEnvId, logMsgGroup.getAppEnvId());
Assert.assertEquals(envId, logMsgGroup.getEnvId());
Assert.assertEquals(env, logMsgGroup.getEnv());
Assert.assertEquals(serverName, logMsgGroup.getServerName());
Expand Down

0 comments on commit 0cc8008

Please sign in to comment.