@Path(value="/photographs") public class PhotographBean extends AbstractBean<Photograph>
| Constructor and Description |
|---|
PhotographBean() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
countREST() |
void |
create(Photograph entity)
Creates an Photograph.
|
void |
edit(Photograph entity)
Updates a Photograph.
|
Photograph |
find(java.lang.Long id)
Retrieves a Photograph.
|
java.util.List<Photograph> |
findAll()
Retrieve all instances of the entity.
|
java.util.List<Photograph> |
findDoubleUsedPhotographs()
Provides a list of Photographs that are assigned more than once.
|
java.util.List<Photograph> |
findRange(java.lang.Integer from,
java.lang.Integer to) |
ImageAngle |
getAngle(java.lang.Long id) |
protected javax.persistence.EntityManager |
getEntityManager()
Returns the Entity manager.
|
java.io.File |
getFile(java.lang.Long id) |
java.util.List<PhotoMetadata> |
getMetadata(java.lang.Long id) |
java.util.Collection<Tag> |
getTags(java.lang.Long id)
Retrieves an array of Tags belonging to a photograph.
|
void |
remove(java.lang.Long id)
Removes a Photograph.
|
java.util.List<Photograph> |
unusedPhotographs()
Provides a list of Photographs that are not assigned to any GalleryPhotographs
yet.
|
count, findRange, removeprotected javax.persistence.EntityManager getEntityManager()
AbstractBeangetEntityManager in class AbstractBean<Photograph>@POST
@Consumes(value={"application/xml","application/json"})
public void create(Photograph entity)
create in class AbstractBean<Photograph>entity - Photograph@PUT
@Consumes(value={"application/xml","application/json"})
public void edit(Photograph entity)
edit in class AbstractBean<Photograph>entity - Photograph@DELETE
@Path(value="{id}")
public void remove(@PathParam(value="id")
java.lang.Long id)
id - unique identifier for the Photograph, present in the url.@GET
@Path(value="{id}")
@Produces(value={"application/xml","application/json"})
public Photograph find(@PathParam(value="id")
java.lang.Long id)
find in class AbstractBean<Photograph>id - unique identifier for the comment, present in the url.javax.ws.rs.WebApplicationException - with status Response.Status.NOT_FOUND if Photograph with that id does not exist (any more).@GET
@Path(value="{id}/tags")
@Produces(value={"application/xml","application/json"})
public java.util.Collection<Tag> getTags(@PathParam(value="id")
java.lang.Long id)
id - unique identifier for the photograph, present in the url.javax.ws.rs.WebApplicationException - with status Response.Status.NOT_FOUND if Photograph with that id does not exist (any more).@GET
@Produces(value={"application/xml","application/json"})
public java.util.List<Photograph> findAll()
AbstractBeanfindAll in class AbstractBean<Photograph>@GET
@Path(value="{from}/{to}")
@Produces(value={"application/xml","application/json"})
public java.util.List<Photograph> 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 java.io.File getFile(java.lang.Long id)
@GET
@Path(value="{id}/metadata")
@Produces(value={"application/xml","application/json"})
public java.util.List<PhotoMetadata> getMetadata(@PathParam(value="id")
java.lang.Long id)
public ImageAngle getAngle(java.lang.Long id) throws com.drew.imaging.ImageProcessingException, java.io.IOException, com.drew.metadata.MetadataException
com.drew.imaging.ImageProcessingExceptionjava.io.IOExceptioncom.drew.metadata.MetadataExceptionpublic java.util.List<Photograph> unusedPhotographs()
public java.util.List<Photograph> findDoubleUsedPhotographs()