@Path(value="/galleries") public class GalleryBean extends AbstractBean<Gallery>
| Constructor and Description |
|---|
GalleryBean() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
countREST() |
void |
create(Gallery entity)
Creates an empty Gallery.
|
void |
edit(Gallery entity)
Updates a Gallery.
|
Gallery |
find(java.lang.Long id)
Retrieves a Gallery.
|
java.util.List<Gallery> |
findAll()
Retrieves all galleries ordered by id (with a parent, if they have one).
|
java.util.List<Gallery> |
findRange(java.lang.Integer from,
java.lang.Integer to) |
protected javax.persistence.EntityManager |
getEntityManager()
Returns the Entity manager.
|
java.util.Collection<Gallery> |
getGalleries(java.lang.Long id) |
java.util.Collection<GalleryPhotograph> |
getPhotographs(java.lang.Long id) |
java.lang.String |
importPhotographs(java.lang.Long id,
java.lang.String location)
Imports photographs into a gallery.
|
void |
remove(java.lang.Long id)
Removes a Gallery.
|
void |
reorderGalleries(java.lang.Long id) |
void |
reorderPhotographs(java.lang.Long id) |
count, findRange, removeprotected javax.persistence.EntityManager getEntityManager()
AbstractBeangetEntityManager in class AbstractBean<Gallery>@POST
@Consumes(value={"application/xml","application/json"})
public void create(Gallery entity)
create in class AbstractBean<Gallery>entity - Gallery@PUT
@Consumes(value={"application/xml","application/json"})
public void edit(Gallery entity)
edit in class AbstractBean<Gallery>entity - Gallery@DELETE
@Path(value="{id}")
public void remove(@PathParam(value="id")
java.lang.Long id)
id - unique identifier for the gallery, present in the url.@GET
@Path(value="{id}")
@Produces(value={"application/xml","application/json"})
public Gallery find(@PathParam(value="id")
java.lang.Long id)
find in class AbstractBean<Gallery>id - unique identifier for the Gallery, present in the url.javax.ws.rs.WebApplicationException - with status Response.Status.NOT_FOUND if Gallery with that id does not exist (any more).public java.lang.String importPhotographs(java.lang.Long id,
java.lang.String location)
id - id of the gallerylocation - location (in full) to check for photographs.@GET
@Path(value="{id}/photographs")
@Produces(value={"application/xml","application/json"})
public java.util.Collection<GalleryPhotograph> getPhotographs(@PathParam(value="id")
java.lang.Long id)
@GET
@Path(value="{id}/galleries")
@Produces(value={"application/xml","application/json"})
public java.util.Collection<Gallery> getGalleries(@PathParam(value="id")
java.lang.Long id)
@GET
@Produces(value={"application/xml","application/json"})
public java.util.List<Gallery> findAll()
findAll in class AbstractBean<Gallery>@GET
@Path(value="{from}/{to}")
@Produces(value={"application/xml","application/json"})
public java.util.List<Gallery> findRange(@PathParam(value="from")
java.lang.Integer from,
@PathParam(value="to")
java.lang.Integer to)
@GET @Path(value="count") @Produces(value="text/plain") public java.lang.String countREST()
public void reorderGalleries(java.lang.Long id)
public void reorderPhotographs(java.lang.Long id)