Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
57 additions
and
34 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
view/src/main/java/org/xcolab/view/theme/ServerVariables.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.xcolab.view.theme; | ||
|
||
import org.xcolab.client.admin.attributes.platform.PlatformAttributeKey; | ||
import org.xcolab.client.admin.enums.ServerEnvironment; | ||
import org.xcolab.commons.servlet.ManifestUtil; | ||
|
||
import javax.servlet.ServletContext; | ||
|
||
public class ServerVariables { | ||
|
||
private final ServerEnvironment environment; | ||
private final String buildCommit; | ||
|
||
public ServerVariables(ServletContext servletContext) { | ||
environment = PlatformAttributeKey.SERVER_ENVIRONMENT.get(); | ||
buildCommit = ManifestUtil.getBuildCommit(servletContext).orElse("unknown"); | ||
} | ||
|
||
public ServerEnvironment getEnvironment() { | ||
return environment; | ||
} | ||
|
||
public String getBuildCommit() { | ||
return buildCommit; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters