From 2cec9982b5d63f3e7dd7b975af093bf5e31bb689 Mon Sep 17 00:00:00 2001 From: Przemek Nowak Date: Sat, 4 Apr 2015 17:57:00 +0200 Subject: [PATCH] #247 - Added HAL_JSON_VALUE in MediaTypes. Original pull request: #329. --- .../org/springframework/hateoas/MediaTypes.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/springframework/hateoas/MediaTypes.java b/src/main/java/org/springframework/hateoas/MediaTypes.java index 0b769988..6e020bda 100644 --- a/src/main/java/org/springframework/hateoas/MediaTypes.java +++ b/src/main/java/org/springframework/hateoas/MediaTypes.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,17 @@ import org.springframework.http.MediaType; * Constants for well-known hypermedia types. * * @author Oliver Gierke + * @author Przemek Nowak */ public class MediaTypes { - public static final MediaType HAL_JSON = MediaType.valueOf("application/hal+json"); + /** + * A String equivalent of {@link MediaTypes#HAL_JSON}. + */ + public static final String HAL_JSON_VALUE = "application/hal+json"; + + /** + * Public constant media type for {@code application/hal+json}. + */ + public static final MediaType HAL_JSON = MediaType.valueOf(HAL_JSON_VALUE); }