de.smartics.resteasy.hypermedia.renderer
Class ResourceContext

Package class diagram package ResourceContext
java.lang.Object
  extended by de.smartics.resteasy.hypermedia.renderer.ResourceContext

public final class ResourceContext
     
     
extends Object

Provides the context information for representation renderers.


Nested Class Summary
static class ResourceContext.Builder
          Builds instances of ResourceContext.
 
Method Summary
 Annotation[] getAnnotations()
          Returns the array of the annotations attached to the message entity instance.
 Resources getDiscovery()
          Returns the repository of resource link exits.
 Type getGenericType()
          Returns the type of instance to be written.
 javax.ws.rs.core.MultivaluedMap<String,Object> getHttpHeaders()
          Returns the mutable map of the HTTP message headers.
 LocalizationProvider getL7nProvider()
          Returns the helper to access localized information.
 javax.ws.rs.core.MediaType getMediaType()
          Returns the media type of the HTTP entity.
 javax.servlet.http.HttpServletRequest getRequest()
          Returns the access to the HTTP request.
 javax.servlet.http.HttpServletResponse getResponse()
          Returns the access to the HTTP response.
 Class<?> getType()
          Returns the class of instance that is to be written.
 javax.ws.rs.core.UriInfo getUriInfo()
          Returns the helper to construct URIs.
 boolean isUserInRole(String role)
          Checks if the current user has the given role.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Returns the access to the HTTP request.

Returns:
the access to the HTTP request.

getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Returns the access to the HTTP response.

Returns:
the access to the HTTP response.

getUriInfo

public javax.ws.rs.core.UriInfo getUriInfo()
Returns the helper to construct URIs.

Returns:
the helper to construct URIs.

getL7nProvider

public LocalizationProvider getL7nProvider()
Returns the helper to access localized information.

Returns:
the helper to access localized information.

getDiscovery

public Resources getDiscovery()
Returns the repository of resource link exits.

Returns:
the repository of resource link exits.

getType

public Class<?> getType()
Returns the class of instance that is to be written.

Returns:
the class of instance that is to be written.

getGenericType

public Type getGenericType()
Returns the type of instance to be written. GenericEntityprovides a way to specify this information at runtime.

Returns:
the type of instance to be written.

getAnnotations

public Annotation[] getAnnotations()
Returns the array of the annotations attached to the message entity instance.

Returns:
the array of the annotations attached to the message entity instance.

getMediaType

public javax.ws.rs.core.MediaType getMediaType()
Returns the media type of the HTTP entity.

Returns:
the media type of the HTTP entity.

getHttpHeaders

public javax.ws.rs.core.MultivaluedMap<String,Object> getHttpHeaders()
Returns the mutable map of the HTTP message headers.

Returns:
the mutable map of the HTTP message headers.

isUserInRole

public boolean isUserInRole(String role)
Checks if the current user has the given role.

Parameters:
role - the role to check.
Returns:
true if the current user is in the given role, false if not.


Copyright © 2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.