|
Clearspace API (1.7.0) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ImageContentResource
A base interface defining images methods.
| Method Summary | |
|---|---|
void |
addImage(Image image)
Adds an already existing (temporary) image to the object. |
Image |
createImage(java.lang.String name,
java.lang.String contentType,
java.io.InputStream data)
Creates a new image for the object. |
void |
deleteImage(Image image)
Deletes an image that belongs to the object. |
Image |
getImage(long imageID)
Returns the image corresponding to the imageID. |
int |
getImageCount()
Returns the number of images the object has. |
JiveIterator<Image> |
getImages()
Returns an Iterable for the object's images. |
| Method Detail |
|---|
int getImageCount()
JiveIterator<Image> getImages()
Image
Image getImage(long imageID)
throws java.lang.IllegalArgumentException,
ImageException
imageID - the id of the image to retrieve.
java.lang.IllegalArgumentException - if the image doesn't belong to the object.
ImageException - if the image doesn't exist.
Image createImage(java.lang.String name,
java.lang.String contentType,
java.io.InputStream data)
throws java.lang.IllegalStateException,
ImageException,
UnauthorizedException
name - the name of the new image, usually the file name.contentType - the content type of the image.data - an InputStream that contains the binary data of the image. The stream will
never be closed so you must close it manually after calling this method.
ImageException - if an error occurred while creating the image.
UnauthorizedException - if not allowed to create images.
java.lang.IllegalStateException - if the object hasn't yet been saved.Image,
ImageManager
void addImage(Image image)
throws java.lang.IllegalStateException,
ImageException,
UnauthorizedException
image - the image to add
ImageException - if an error occurred while adding the image.
java.lang.IllegalStateException - if the object hasn't yet been saved.
UnauthorizedException - if not allowed to add images
void deleteImage(Image image)
throws ImageException,
UnauthorizedException
image - the image to delete.
java.lang.IllegalArgumentException - if the image doesn't belong to the object.
UnauthorizedException - if not authorized to delete the image.
ImageException - if there was an error deleting the image.
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||