org.jboss.seam.rest.example.tasks.resource
Class TaskCollectionResource

java.lang.Object
  extended by org.jboss.seam.rest.example.tasks.resource.TaskCollectionResource

@RequestScoped
@Named
public class TaskCollectionResource
extends Object

Collection resource for tasks

Author:
Jozef Hartinger

Field Summary
protected  int limit
           
protected  int start
           
protected  UriInfo uriInfo
           
 
Constructor Summary
TaskCollectionResource()
           
 
Method Summary
 int getLimit()
           
 int getStart()
           
 List<Task> getTasks()
           
 TaskResource getTaskSubresource()
           
 UriInfo getUriInfo()
           
 void setStatus(String status)
          Ugly workaround for https://jira.jboss.org/browse/CDI-6 (We must use setter injection instead of field injection which makes things less clear)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uriInfo

@Context
protected UriInfo uriInfo

start

@Min(value=0L,
     message="start must be a non-negative number")
protected int start

limit

@Min(value=0L,
     message="limit must be a non-negative number")
@Max(value=100L,
     message="Cannot return more than 100 items")
protected int limit
Constructor Detail

TaskCollectionResource

public TaskCollectionResource()
Method Detail

getTasks

@ValidateRequest
@ResponseTemplate(value="/freemarker/tasks.ftl",
                  produces="application/tasks+xml")
public List<Task> getTasks()

getTaskSubresource

public TaskResource getTaskSubresource()

setStatus

public void setStatus(String status)
Ugly workaround for https://jira.jboss.org/browse/CDI-6 (We must use setter injection instead of field injection which makes things less clear)


getUriInfo

public UriInfo getUriInfo()

getStart

public int getStart()

getLimit

public int getLimit()


Copyright © 2011 Seam Framework. All Rights Reserved.