@Path(value="/tags") public class TagBean extends AbstractBean<Tag>
Constructor and Description |
---|
TagBean() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
countREST() |
void |
create(Tag entity)
Creates a Tag.
|
void |
edit(Tag entity)
Updates a Tag.
|
java.util.List<GalleryPhotograph> |
find(java.lang.String tagname)
Retrieves a Tag.
|
java.util.List<Tag> |
findAll()
Retrieve all instances of the entity.
|
java.util.List<Tag> |
findRange(java.lang.Integer from,
java.lang.Integer to) |
protected javax.persistence.EntityManager |
getEntityManager()
Returns the Entity manager.
|
java.util.List<TagCount> |
getSummary() |
void |
remove(java.lang.Long id)
Removes a Tag.
|
count, find, findRange, remove
protected javax.persistence.EntityManager getEntityManager()
AbstractBean
getEntityManager
in class AbstractBean<Tag>
@POST @Consumes(value={"application/xml","application/json"}) public void create(Tag entity)
create
in class AbstractBean<Tag>
entity
- Tag@PUT @Consumes(value={"application/xml","application/json"}) public void edit(Tag entity)
edit
in class AbstractBean<Tag>
entity
- Tag@DELETE @Path(value="{id}") public void remove(@PathParam(value="id") java.lang.Long id)
id
- unique identifier for the Tag, present in the url.@GET @Path(value="photographs/{tagname}") @Produces(value={"application/xml","application/json"}) public java.util.List<GalleryPhotograph> find(@PathParam(value="tagname") java.lang.String tagname) throws javax.ws.rs.WebApplicationException
tagname
- javax.ws.rs.WebApplicationException
- with status Response.Status.NOT_FOUND
if Tag with that id does not exist (any more).@GET @Produces(value={"application/xml","application/json"}) public java.util.List<Tag> findAll()
AbstractBean
findAll
in class AbstractBean<Tag>
@GET @Path(value="{from}/{to}") @Produces(value={"application/xml","application/json"}) public java.util.List<Tag> 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()
@GET @Path(value="summary") @Produces(value={"application/xml","application/json"}) public java.util.List<TagCount> getSummary()