Class HttpHeadersPreparer
java.lang.Object
org.springframework.data.rest.webmvc.HttpHeadersPreparer
- Author:
- Oliver Gierke, Dario Seidl
-
Constructor Summary
ConstructorDescriptionHttpHeadersPreparer
(AuditableBeanWrapperFactory auditableBeanWrapperFactory) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isObjectStillValid
(Object source, HttpHeaders headers) Returns whether the given object is still valid in the context of the givenHttpHeaders
' requirements.prepareHeaders
(Optional<PersistentEntityResource> resource) Returns the default headers to be returned for the givenPersistentEntityResource
.prepareHeaders
(PersistentEntity<?, ?> entity, Object value) Returns the default headers to be returned for the givenPersistentEntity
and value.
-
Constructor Details
-
HttpHeadersPreparer
-
-
Method Details
-
prepareHeaders
Returns the default headers to be returned for the givenPersistentEntityResource
. Will setETag
andLast-Modified
headers if applicable.- Parameters:
resource
- can be null.- Returns:
-
prepareHeaders
Returns the default headers to be returned for the givenPersistentEntity
and value. Will setETag
andLast-Modified
headers if applicable.- Parameters:
entity
- must not be null.value
- must not be null.- Returns:
-
isObjectStillValid
Returns whether the given object is still valid in the context of the givenHttpHeaders
' requirements.- Parameters:
source
- must not be null.headers
- must not be null.- Returns:
-