Search in sources :

Example 1 with ConfigurableHypermediaResource

use of br.com.caelum.vraptor.restfulie.hypermedia.ConfigurableHypermediaResource in project restfulie-java by caelum.

the class ItemsController method list.

@Get
@Path("/items")
public void list() {
    ConfigurableHypermediaResource resource = restfulie.enhance(database.lista());
    resource.relation("basket").uses(BasketsController.class).create(null);
    result.use(representation()).from(resource, "items").serialize();
}
Also used : ConfigurableHypermediaResource(br.com.caelum.vraptor.restfulie.hypermedia.ConfigurableHypermediaResource) Path(br.com.caelum.vraptor.Path) Get(br.com.caelum.vraptor.Get)

Aggregations

Get (br.com.caelum.vraptor.Get)1 Path (br.com.caelum.vraptor.Path)1 ConfigurableHypermediaResource (br.com.caelum.vraptor.restfulie.hypermedia.ConfigurableHypermediaResource)1