@Api(value="Version Api")
public class RestMusicVersionAPI {
- private EELFLoggerDelegate logger =EELFLoggerDelegate.getLogger(RestMusicVersionAPI.class);
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RestMusicVersionAPI.class);
/**
- * Get the version of MUSIC
+ * Get the version of MUSIC.
* @return
*/
@GET
public Map<String,Object> version(@Context HttpServletResponse response) {
logger.info("Replying to request for MUSIC version with MUSIC:" + MusicUtil.getVersion());
response.addHeader("X-latestVersion",MusicUtil.getVersion());
- return new JsonResponse(ResultType.SUCCESS).setMusicVersion("MUSIC:" + MusicUtil.getVersion()).toMap();
+ return new JsonResponse(ResultType.SUCCESS).
+ setMusicVersion("MUSIC:" + MusicUtil.getVersion()).toMap();
}
+
+ /**
+ * Get the version of MUSIC.
+ * @return
+ */
+ @GET
+ @Path("/build")
+ @ApiOperation(value = "Get Version", response = Map.class)
+ @Produces(MediaType.APPLICATION_JSON)
+ public Map<String,Object> build(@Context HttpServletResponse response) {
+ logger.info("Replying to request for MUSIC build with MUSIC:" + MusicUtil.getBuild());
+ response.addHeader("X-latestVersion",MusicUtil.getVersion());
+ return new JsonResponse(ResultType.SUCCESS)
+ .setMusicBuild("MUSIC:" + MusicUtil.getBuild())
+ .setMusicVersion("MUSIC:" + MusicUtil.getVersion()).toMap();
+ }
+
+
}
\ No newline at end of file