public class WonEtagHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static WonEtagHelper |
forVersion(java.lang.String version) |
static WonEtagHelper |
fromEtagHeader(org.springframework.http.HttpHeaders headers) |
static WonEtagHelper |
fromEtagValue(java.lang.String etagValue)
Returns a WonEtagHelper if the specified string is a valid ETAG, combining
[VERSION] {[DELIMITER] [MEDIA-TYPE]} (curly brackets inticate 'optional')
Returns null if the specified etagValue is null or not valid.
|
static WonEtagHelper |
fromHeaderIfCompatibleWithAcceptHeader(org.springframework.http.HttpHeaders headers)
Returns a new WonEtagHelper object created from the specified headers if
there is an ETAG header and the value parsed for the mediatype is actually
compatible with the mediatypes listed in the accept header.
|
static WonEtagHelper |
fromIfNoneMatchHeader(org.springframework.http.HttpHeaders headers) |
java.lang.String |
getEtagString() |
org.springframework.http.MediaType |
getMediaType() |
java.lang.String |
getVersion() |
static java.lang.String |
getVersionIdentifier(WonEtagHelper wonEtagHelper) |
boolean |
isValid() |
static void |
setEtagHeader(WonEtagHelper wonEtagHelper,
org.springframework.http.HttpHeaders headers) |
void |
setMediaType(org.springframework.http.MediaType mediaType) |
static void |
setMediaTypeForEtagHeaderIfPresent(org.springframework.http.MediaType mediaType,
org.springframework.http.HttpHeaders headers) |
void |
setVersion(java.lang.String version) |
public static WonEtagHelper forVersion(java.lang.String version)
public static WonEtagHelper fromEtagValue(java.lang.String etagValue)
etagValue - public static WonEtagHelper fromHeaderIfCompatibleWithAcceptHeader(org.springframework.http.HttpHeaders headers)
headers - public static WonEtagHelper fromIfNoneMatchHeader(org.springframework.http.HttpHeaders headers)
public static WonEtagHelper fromEtagHeader(org.springframework.http.HttpHeaders headers)
public static void setMediaTypeForEtagHeaderIfPresent(org.springframework.http.MediaType mediaType,
org.springframework.http.HttpHeaders headers)
public static void setEtagHeader(WonEtagHelper wonEtagHelper, org.springframework.http.HttpHeaders headers)
public static java.lang.String getVersionIdentifier(WonEtagHelper wonEtagHelper)
public void setVersion(java.lang.String version)
public void setMediaType(org.springframework.http.MediaType mediaType)
public java.lang.String getVersion()
public org.springframework.http.MediaType getMediaType()
public boolean isValid()
public java.lang.String getEtagString()
Copyright © 2019. All Rights Reserved.