Class ServiceMedia
java.lang.Object
org.silverpeas.mobile.shared.services.rest.AbstractService
org.silverpeas.mobile.shared.services.rest.ServiceMedia
Service to manage requests related to media library.
- Author:
- svu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetAlbumsAndPictures(String appId, String rootAlbumId, int callNumber, RestCallback<StreamingList<BaseDTO>> callback) Retrieves albums and pictures for a given root album.voidgetMedia(String appId, String id, RestCallback<MediaDTO> callback) Retrieves a media by its ID.voidgetPreviewPicture(String appId, String pictureId, RestCallback<PhotoDTO> callback) Retrieves a preview picture by its ID.voidgetSound(String appId, String soundId, RestCallback<SoundDTO> callback) Retrieves a sound by its ID.voidgetVideo(String appId, String videoId, RestCallback<VideoDTO> callback) Retrieves a video by its ID.voidgetVideoStreaming(String appId, String videoId, RestCallback<VideoStreamingDTO> callback) Retrieves a streaming video by its ID.voiduploadPicture(String name, String data, String idGallery, String idAlbum, RestCallback<Void> callback) Uploads a picture.Methods inherited from class org.silverpeas.mobile.shared.services.rest.AbstractService
asBoolean, delete, encode, escapeJson, get, getText, initContext, mapArray, post, put, request, request, requestJson, requestText, toJsonArray
-
Constructor Details
-
ServiceMedia
public ServiceMedia()
-
-
Method Details
-
uploadPicture
public void uploadPicture(String name, String data, String idGallery, String idAlbum, RestCallback<Void> callback) Uploads a picture.- Parameters:
name- The name of the picture.data- The data of the picture.idGallery- The ID of the gallery.idAlbum- The ID of the album.callback- The callback to handle the response (no data returned).
-
getMedia
Retrieves a media by its ID.- Parameters:
appId- The ID of the application.id- The ID of the media.callback- The callback to handle the response (MediaDTO).
-
getAlbumsAndPictures
public void getAlbumsAndPictures(String appId, String rootAlbumId, int callNumber, RestCallback<StreamingList<BaseDTO>> callback) Retrieves albums and pictures for a given root album.- Parameters:
appId- The ID of the application.rootAlbumId- The ID of the root album.callNumber- The call number.callback- The callback to handle the response (StreamingList of BaseDTO).
-
getSound
Retrieves a sound by its ID.- Parameters:
appId- The ID of the application.soundId- The ID of the sound.callback- The callback to handle the response (SoundDTO).
-
getVideo
Retrieves a video by its ID.- Parameters:
appId- The ID of the application.videoId- The ID of the video.callback- The callback to handle the response (VideoDTO).
-
getVideoStreaming
public void getVideoStreaming(String appId, String videoId, RestCallback<VideoStreamingDTO> callback) Retrieves a streaming video by its ID.- Parameters:
appId- The ID of the application.videoId- The ID of the video.callback- The callback to handle the response (VideoStreamingDTO).
-
getPreviewPicture
Retrieves a preview picture by its ID.- Parameters:
appId- The ID of the application.pictureId- The ID of the picture.callback- The callback to handle the response (PhotoDTO).
-