Overview

Project: restlet-jpa
Description: A Restlet extension for automatically exposing JPA entities.
License: CDDL
Current Release: 0.5 (source) (binary)

The objective is to enable exposing JPA entities via URLs simple.

Depends on Restlet 1.1.

Example Usage:

public class FooApp extends PersistenceApplication {

  public FooApp() {
    super(Persistence.createEntityManagerFactory("foo");
  }

  @Override
  public Restlet createRoot() {
    EntityRouter router = getEntityRouter();
    router.attach("/foo/", FooCollection.class);
    router.attach("/foo/{id}", FooResource.class);
    return router;
  }
}

@EntityResource(entity = Foo.class)
public class FooResource extends EntityInstance<Foo> { ... }

public class FooCollection extends EntityCollection<Foo> { ... }

Browsing to "/foo/" will retrieve a list of entities and "/foo/{id}" will then retrieve a representation of the entity.

Current Phase

Milestone: 0.6
Tasks:

#7
Support primitives for @Id's
#8
Better converters
#9
Use ConnectorService instead of wrapping Representation to close transactions

Future Work

Tasks:

Support

Currently raising tickets and editing the wiki is not enabled for public access until we sort out some anti-spam measures. For support e-mail restlet-jpa@sarugo.org.

Attachments