Class ServiceMedia

java.lang.Object
org.silverpeas.mobile.shared.services.rest.AbstractService
org.silverpeas.mobile.shared.services.rest.ServiceMedia

public class ServiceMedia extends AbstractService
Service to manage requests related to media library.
Author:
svu
  • 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

      public void getMedia(String appId, String id, RestCallback<MediaDTO> callback)
      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

      public void getSound(String appId, String soundId, RestCallback<SoundDTO> callback)
      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

      public void getVideo(String appId, String videoId, RestCallback<VideoDTO> callback)
      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

      public void getPreviewPicture(String appId, String pictureId, RestCallback<PhotoDTO> callback)
      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).