public final class ETag extends Object
| Modifier and Type | Method and Description |
|---|---|
HttpHeaders |
addTo(HttpHeaders headers)
Adds the current
ETag to the given headers. |
boolean |
equals(Object obj) |
static ETag |
from(PersistentEntityResource resource)
Creates a new
ETag for the given PersistentEntityResource. |
static ETag |
from(String value)
|
int |
hashCode() |
String |
toString() |
void |
verify(PersistentEntity<?,?> entity,
Object target)
Verifies the ETag to be created for the given target bean with the current one and raises a
ETagDoesntMatchException in case they don't match. |
public static final ETag NO_ETAG
public static ETag from(String value)
value - the source ETag value, can be null.public static ETag from(PersistentEntityResource resource)
ETag for the given PersistentEntityResource.resource - can be null.public void verify(PersistentEntity<?,?> entity, Object target)
ETagDoesntMatchException in case they don't match.entity - must not be null.target - can be null.ETagDoesntMatchException - in case the calculated ETag for the given bean does not match the current
one.public HttpHeaders addTo(HttpHeaders headers)
ETag to the given headers.headers - must not be null.HttpHeaders with the ETag header been set if the current ETag instance is not
NO_ETAG.Copyright © 2011-2015–2015 Pivotal Software, Inc.. All rights reserved.