REST POJOs are a Java 5 way of writing POJOs that implement RESTful services. They are an extension of AnDI to add some RESTful annotations.

See JRA

The core features are

Example


@UriBinding(uri="/cheese/{id}")
public class MyPOJO {

  @Resource ActionBeanContext context; // providers access to request/response et al via Stripes helper class

  @Get
  public Cheese load(Long id) {
    return cheese; // load by id
  }

  @Post
  public void insert(Cheese cheese) {
    ...
  }


  @Put
  public void update(Cheese cheese) {
    ...
  }


  @Delete
  public void delete(Long id) {
    ...
  }

}