org.exoplatform.services.rest
Class EntityMetadata

java.lang.Object
  extended by org.exoplatform.services.rest.EntityMetadata

public class EntityMetadata
extends Object

Wrapper around MultivaluedMetadata. For easer access to most used entity descriptor.

Version:
$Id: $
Author:
Andrey Parfonov

Constructor Summary
EntityMetadata(MultivaluedMetadata headers)
          Constructor for EntityMetadata.
 
Method Summary
 String getCacheControl()
          The HTTP Cache-Control response header.
 String getContentLocation()
          The Content-Location entity-header field MAY be used to supply the resource location for the entity enclosed in the message when that entity is accessible from a location separate from the requested resource's URI.
 String getEncodings()
          The Content-Encoding entity-header field is used as a modifier to the media-type.
 String getLanguages()
          The Content-Language entity-header field describes the natural language(s) of the intended audience for the enclosed entity.
 String getLastModified()
          The Last-Modified entity-header field indicates the date and time at which the origin server believes the variant was last modified.
 int getLength()
          The Content-Length entity-header field indicates the size of the entity-body, in decimal number of OCTETs, sent to the recipient or, in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET.
 String getMediaType()
          The Content-Type entity-header field indicates the media type of the entity-body sent to the recipient or, in the case of the HEAD method, the media type that would have been sent had the request been a GET.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityMetadata

public EntityMetadata(MultivaluedMetadata headers)
Constructor for EntityMetadata.

Parameters:
headers - MultivaluedMetadata object with HTTP headers.
Method Detail

getContentLocation

public String getContentLocation()
The Content-Location entity-header field MAY be used to supply the resource location for the entity enclosed in the message when that entity is accessible from a location separate from the requested resource's URI.

Returns:
Content-Location header.

getEncodings

public String getEncodings()
The Content-Encoding entity-header field is used as a modifier to the media-type. When present, its value indicates what additional content codings have been applied to the entity-body, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type header field. Content-Encoding is primarily used to allow a document to be compressed without losing the identity of its underlying media type.

Returns:
Content-Encoding header.

getLanguages

public String getLanguages()
The Content-Language entity-header field describes the natural language(s) of the intended audience for the enclosed entity. Note that this might not be equivalent to all the languages used within the entity-body.

Returns:
Content-Language header.

getLastModified

public String getLastModified()
The Last-Modified entity-header field indicates the date and time at which the origin server believes the variant was last modified.

Returns:
Last-Modified header.

getLength

public int getLength()
The Content-Length entity-header field indicates the size of the entity-body, in decimal number of OCTETs, sent to the recipient or, in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET.

Returns:
Content-Length leader.

getMediaType

public String getMediaType()
The Content-Type entity-header field indicates the media type of the entity-body sent to the recipient or, in the case of the HEAD method, the media type that would have been sent had the request been a GET.

Returns:
Content-Type header.

getCacheControl

public String getCacheControl()
The HTTP Cache-Control response header.

Returns:
Cache-Control header.


Copyright © 2009 eXo Platform SAS. All Rights Reserved.