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

java.lang.Object
  extended by org.qi4j.library.rest.server.api.ObjectSelection

public class ObjectSelection
extends java.lang.Object

Manage the current object selection. An instance of ObjectSelection is created for each request, and stored as an attribute. Whenever an object is identified in the chain, add it to the selection.


Constructor Summary
ObjectSelection()
          Create new root roleMap
 
Method Summary
static ObjectSelection current()
           
<T> T
get(java.lang.Class<T> type)
           
static void newSelection()
           
 void select(java.lang.Object object)
           
 java.lang.Iterable<java.lang.Object> selection()
           
 java.lang.Object[] toArray()
           
static
<T> T
type(java.lang.Class<T> type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectSelection

public ObjectSelection()
Create new root roleMap

Method Detail

current

public static ObjectSelection current()

type

public static <T> T type(java.lang.Class<T> type)

newSelection

public static void newSelection()

select

public void select(java.lang.Object object)

get

public <T> T get(java.lang.Class<T> type)
      throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

selection

public java.lang.Iterable<java.lang.Object> selection()

toArray

public java.lang.Object[] toArray()