Class ServiceDocuments

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

public class ServiceDocuments extends AbstractService
Service to manage requests related to documents.
Author:
svu
  • Constructor Details

    • ServiceDocuments

      public ServiceDocuments()
  • Method Details

    • getTopicsAndPublications

      public void getTopicsAndPublications(String appId, String rootTopicId, RestCallback<List<BaseDTO>> callback)
      Retrieves topics and publications for a given root topic.
      Parameters:
      appId - The ID of the application.
      rootTopicId - The ID of the root topic.
      callback - The callback to handle the response (list of BaseDTO).
    • getTopics

      public void getTopics(String appId, String rootTopicId, RestCallback<List<TopicDTO>> callback)
      Retrieves topics for a given root topic.
      Parameters:
      appId - The ID of the application.
      rootTopicId - The ID of the root topic.
      callback - The callback to handle the response (list of TopicDTO).
    • getPublications

      public void getPublications(String appId, String topicId, RestCallback<List<PublicationDTO>> callback)
      Retrieves publications for a given topic.
      Parameters:
      appId - The ID of the application.
      topicId - The ID of the topic.
      callback - The callback to handle the response (list of PublicationDTO).
    • getPublication

      public void getPublication(String appId, String id, String contributionId, String type, RestCallback<PublicationDTO> callback)
      Retrieves a specific publication by its ID.
      Parameters:
      appId - The ID of the application.
      id - The ID of the publication.
      contributionId - The ID of the contribution.
      type - The type of the publication.
      callback - The callback to handle the response (PublicationDTO).
    • getAttachment

      public void getAttachment(String appId, String attachmentId, RestCallback<AttachmentDTO> callback)
      Retrieves an attachment by its ID.
      Parameters:
      appId - The ID of the application.
      attachmentId - The ID of the attachment.
      callback - The callback to handle the response (AttachmentDTO).
    • getTickets

      public void getTickets(String appId, List<TicketDTO> tickets, RestCallback<List<TicketDTO>> callback)
      Retrieves tickets for a list of ticket IDs.
      Parameters:
      appId - The ID of the application.
      tickets - The list of tickets to retrieve.
      callback - The callback to handle the response (list of TicketDTO).
    • deleteTickets

      public void deleteTickets(String appId, List<TicketDTO> tickets, RestCallback<List<TicketDTO>> callback)
      Deletes a list of tickets.
      Parameters:
      appId - The ID of the application.
      tickets - The list of tickets to delete.
      callback - The callback to handle the response (list of TicketDTO).
    • getNextPublication

      public void getNextPublication(String appId, String id, String direction, RestCallback<PublicationDTO> callback)
      Retrieves the next or previous publication relative to a given publication.
      Parameters:
      appId - The ID of the application.
      id - The ID of the current publication.
      direction - The direction ("next" or "previous").
      callback - The callback to handle the response (PublicationDTO).
    • publish

      public void publish(String appId, String pubId, RestCallback<PublicationDTO> callback)
      Publishes a publication.
      Parameters:
      appId - The ID of the application.
      pubId - The ID of the publication to publish.
      callback - The callback to handle the response (PublicationDTO).