|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jickr.PhotoSet
public class PhotoSet
A Flickr PhotoSet. Created by calls that get a List<PhotoSet>
,
such as User.getPhotoSets()
and PhotoSet.findByID(id)
User.getPhotoSets()
,
findByID(String)
Method Summary | |
---|---|
void |
add(Photo photo)
Adds a photo to a PhotoSet. |
java.lang.String |
addComment(java.lang.String commentText)
Adds a comment to this Photo, returns the new comment ID. |
static PhotoSet |
create(java.lang.String title,
java.lang.String description,
Photo primaryPhoto)
Create a new PhotoSet. |
void |
delete()
Delete the current PhotoSet. |
boolean |
equals(java.lang.Object o)
Check equality. |
static PhotoSet |
findByID(java.lang.String id)
Get a new PhotoSet identified by the supplied ID. |
java.util.List<Comment> |
getComments()
Get a list of comments for this PhotoSet. |
java.lang.String |
getDescription()
Get the Description of the PhotoSet. |
java.lang.String |
getID()
Get the ID of the PhotoSet. |
int |
getNumPhotos()
Get the number of Photos in the PhotoSet. |
org.jickr.PhotoList |
getPhotos()
Retrieve the list of photos associated with this PhotoSet. |
Photo |
getPrimaryPhoto()
Get the primary Photo associated with this PhotoSet. |
java.lang.String |
getTitle()
Get the Title of the PhotoSet. |
int |
hashCode()
Return the HashCode of this PhotoSet, based on ID. |
static void |
orderSets(java.util.List<PhotoSet> setlist)
Order the PhotoSets for display on Flickr. |
void |
remove(Photo photo)
Removes a photo to a PhotoSet. |
void |
setPhotos(Photo primaryPhoto,
java.util.List<Photo> photolist)
Sets up all the photos in a PhotoSet. |
java.lang.String |
toString()
Convert this PhotoSet to a String. |
void |
updateTitleDesc(java.lang.String titleText,
java.lang.String descText)
Update the Title and Description of the PhotoSet. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static PhotoSet findByID(java.lang.String id) throws FlickrException
id
- - The unique ID of the PhotoSet in Flickr.
FlickrException
public static PhotoSet create(java.lang.String title, java.lang.String description, Photo primaryPhoto) throws FlickrException
NOTE: Flickr may take a few moments to register the new PhotoSet, and it may not immediately be found, though it will eventually be there.
title
- Title of the PhotoSet. May not be null.description
- Description of the PhotoSet. If left null, this will be left blank.primaryPhoto
- The primary photo associated with this PhotoSet. May not be null.
FlickrException
- on any error.public static void orderSets(java.util.List<PhotoSet> setlist) throws FlickrException
setlist
- List of PhotoSets, in the order that you wish them to appear on Flickr. Must not be null.
FlickrException
- on any error.public void setPhotos(Photo primaryPhoto, java.util.List<Photo> photolist) throws FlickrException
primaryPhoto
- The main photo to associate with this PhotoSet.photolist
- The list of Photos that the PhotoSet should contain.
FlickrException
- on any error.public void delete() throws FlickrException
NOTE: Flickr may take a few moments to register the deletion, and it may still be found momentarily in a search, though it will eventually be gone.
No other calls may be made on this object after deletion.
FlickrException
public java.lang.String getTitle() throws FlickrException
FlickrException
public java.lang.String getDescription() throws FlickrException
FlickrException
public int getNumPhotos() throws FlickrException
FlickrException
public java.lang.String getID()
public Photo getPrimaryPhoto() throws FlickrException
FlickrException
public org.jickr.PhotoList getPhotos() throws FlickrException
FlickrException
- for almost any error.public java.util.List<Comment> getComments() throws FlickrException
FlickrException
- in the event of any error.public java.lang.String addComment(java.lang.String commentText) throws FlickrException
Adds a comment to this Photo, returns the new comment ID. Since Flickr
doesn't offer a way to search for a comment via ID, the user will
have to do a getComments()
and search for the comment with
Comment.getID()
if they want a Comment object representing this
added comment.
This call requires that the user be authenticated at the WRITE level.
FlickrException
- in the event of a failure. Note that if an exception is thrown, it's possible (thought unlikely) that a comment was added anyway.Photo.getComments()
,
Comment.getID()
public void updateTitleDesc(java.lang.String titleText, java.lang.String descText) throws FlickrException
titleText
- New title of the PhotoSet. May not be null.descText
- New description of the PhotoSet. If null, description is not updated.
FlickrException
- on any error.public void add(Photo photo) throws FlickrException
photo
- Photo to add to the PhotoSet.
FlickrException
public void remove(Photo photo) throws FlickrException
photo
- Photo to remove from the PhotoSet.
FlickrException
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- - Object to compare.
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |