org.qi4j.library.rest.server.api

## Class ContextResource

- java.lang.Object
- - org.qi4j.library.rest.server.api.ContextResource

- All Implemented Interfaces:
    org.restlet.Uniform

      public class ContextResource
      extends Object
      implements org.restlet.Uniform

  JAVADOC

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Module` | `module`
    `static String` | `RESOURCE_VALIDITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ContextResource()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected <T> T` | `context(Class<T> contextClass)`
    `protected Locale` | `getLocale()`
    `void` | `handle(org.restlet.Request request, org.restlet.Response response)`
    `protected <T> T` | `select(Class<T> entityClass, String id)`
    `protected void` | `selectFromList(List<?> list, String indexString)`
    `protected <T> T` | `selectFromManyAssociation(ManyAssociation<T> manyAssociation, String id)`
    `protected <T> T` | `selectFromNamedAssociation(NamedAssociation<T> namedAssociation, String id)`
    `protected void` | `setResourceValidity(EntityComposite entity)`
    `protected void` | `subResource(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 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(Class<? extends ContextResource> subResourceClass)

    - #### select

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

      Throws:
        `org.restlet.resource.ResourceException`

    - #### selectFromManyAssociation

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

      Throws:
        `org.restlet.resource.ResourceException`

    - #### selectFromNamedAssociation

          protected <T> T selectFromNamedAssociation(NamedAssociation<T> namedAssociation,
                                         String id)
                                          throws org.restlet.resource.ResourceException

      Throws:
        `org.restlet.resource.ResourceException`

    - #### selectFromList

          protected void selectFromList(List<?> list,
                            String indexString)

    - #### getLocale

          protected Locale getLocale()

    - #### context

          protected <T> T context(Class<T> contextClass)