org.qi4j.library.rest.server.api
Class ContextResource

java.lang.Object
  extended by org.qi4j.library.rest.server.api.ContextResource
All Implemented Interfaces:
org.restlet.Uniform

public class ContextResource
extends java.lang.Object
implements org.restlet.Uniform

JAVADOC


Field Summary
protected  Module module
           
static java.lang.String RESOURCE_VALIDITY
           
 
Constructor Summary
ContextResource()
           
 
Method Summary
protected
<T> T
context(java.lang.Class<T> contextClass)
           
protected  java.util.Locale getLocale()
           
 void handle(org.restlet.Request request, org.restlet.Response response)
           
protected
<T> T
select(java.lang.Class<T> entityClass, java.lang.String id)
           
protected  void selectFromList(java.util.List<?> list, java.lang.String indexString)
           
protected
<T> T
selectFromManyAssociation(ManyAssociation<T> manyAssociation, java.lang.String id)
           
protected  void setResourceValidity(EntityComposite entity)
           
protected  void subResource(java.lang.Class<? extends ContextResource> subResourceClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_VALIDITY

public static final java.lang.String RESOURCE_VALIDITY
See Also:
Constant Field Values

module

@Structure
protected Module module
Constructor Detail

ContextResource

public ContextResource()
Method Detail

handle

public final void handle(org.restlet.Request request,
                         org.restlet.Response response)
Specified by:
handle in interface org.restlet.Uniform

setResourceValidity

protected void setResourceValidity(EntityComposite entity)

subResource

protected void subResource(java.lang.Class<? extends ContextResource> subResourceClass)

select

protected <T> T select(java.lang.Class<T> entityClass,
                       java.lang.String id)
            throws org.restlet.resource.ResourceException
Throws:
org.restlet.resource.ResourceException

selectFromManyAssociation

protected <T> T selectFromManyAssociation(ManyAssociation<T> manyAssociation,
                                          java.lang.String id)
                               throws org.restlet.resource.ResourceException
Throws:
org.restlet.resource.ResourceException

selectFromList

protected void selectFromList(java.util.List<?> list,
                              java.lang.String indexString)

getLocale

protected java.util.Locale getLocale()

context

protected <T> T context(java.lang.Class<T> contextClass)