com.shephertz.app42.paas.sdk.jme.gallery
Class AlbumService

java.lang.Object
  extended by com.shephertz.app42.paas.sdk.jme.gallery.AlbumService

public class AlbumService
extends java.lang.Object

Create Photo Gallery on the cloud. This service allows to manage i.e. create, retrieve and remove albums on the cloud. Its useful for Mobile/Device App and Web App developer who want Photo Gallery functionality. It gives them a complete Photo Gallery out of the box and reduces the footprint on the device. Developers can focus on how the Photo Gallery will be rendered and this Cloud API will manage the Gallery on the cloud thereby reducing development time.

See Also:
Album, Album.Photo

Constructor Summary
AlbumService(java.lang.String apiKey, java.lang.String secretKey, java.lang.String baseURL)
          The costructor for the Service
 
Method Summary
 Album createAlbum(java.lang.String userName, java.lang.String albumName, java.lang.String albumDescription)
          Creates Album on the cloud
 Album getAlbumByName(java.lang.String userName, java.lang.String albumName)
          Fetch all Albums based on userName and albumName
 java.util.Vector getAlbums(java.lang.String userName)
          Fetches all the Albums based on the userName
 java.util.Vector getAlbums(java.lang.String userName, java.lang.Integer max, java.lang.Integer offset)
          Fetches all the Albums based on the userName by Paging.
 App42Response getAlbumsCount(java.lang.String userName)
          Fetches the count of all the Albums based on the userName
 App42Response removeAlbum(java.lang.String userName, java.lang.String albumName)
          Removes a particular album based on the userName and albumName.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlbumService

public AlbumService(java.lang.String apiKey,
                    java.lang.String secretKey,
                    java.lang.String baseURL)
The costructor for the Service

Parameters:
apiKey -
secretKey -
baseURL -
Method Detail

createAlbum

public Album createAlbum(java.lang.String userName,
                         java.lang.String albumName,
                         java.lang.String albumDescription)
                  throws App42Exception
Creates Album on the cloud

Parameters:
userName - - The user to which the album belongs
albumName - - Name of the album to be created on the cloud
albumDescription - - Description of the album to be created
Returns:
Album object containing the album which has been created
Throws:
App42Exception

getAlbumByName

public Album getAlbumByName(java.lang.String userName,
                            java.lang.String albumName)
                     throws App42Exception
Fetch all Albums based on userName and albumName

Parameters:
userName - - The user for which the album has to be fetched
albumName - - Name of the album that has to be fetched
Returns:
Album object containing album information for the given userName and albumName
Throws:
App42Exception

getAlbums

public java.util.Vector getAlbums(java.lang.String userName)
                           throws App42Exception
Fetches all the Albums based on the userName

Parameters:
userName - - The user for which the albums have to be fetched
Returns:
List of Album object containing all the album for the given userName
Throws:
App42Exception

getAlbums

public java.util.Vector getAlbums(java.lang.String userName,
                                  java.lang.Integer max,
                                  java.lang.Integer offset)
                           throws App42Exception
Fetches all the Albums based on the userName by Paging.

Parameters:
userName - - The user for which the albums have to be fetched
max - - Maximum number of records to be fetched
offset - - From where the records are to be fetched
Returns:
List of Album object containing all the album for the given userName
Throws:
App42Exception

getAlbumsCount

public App42Response getAlbumsCount(java.lang.String userName)
                             throws App42Exception
Fetches the count of all the Albums based on the userName

Parameters:
userName - - The user for which the count of albums have to be fetched
Returns:
App42Response object containing the count of all the albums for the given userName
Throws:
App42Exception

removeAlbum

public App42Response removeAlbum(java.lang.String userName,
                                 java.lang.String albumName)
                          throws App42Exception
Removes a particular album based on the userName and albumName. Note: All photos added to this Album will also be removed

Parameters:
userName - - The user for which the album has to be removed
albumName - - Name of the album that has to be removed
Returns:
App42Response if removed successfully
Throws:
App42Exception