Class ServiceDocuments
java.lang.Object
org.silverpeas.mobile.shared.services.rest.AbstractService
org.silverpeas.mobile.shared.services.rest.ServiceDocuments
Service to manage requests related to documents.
- Author:
- svu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteTickets(String appId, List<TicketDTO> tickets, RestCallback<List<TicketDTO>> callback) Deletes a list of tickets.voidgetAttachment(String appId, String attachmentId, RestCallback<AttachmentDTO> callback) Retrieves an attachment by its ID.voidgetNextPublication(String appId, String id, String direction, RestCallback<PublicationDTO> callback) Retrieves the next or previous publication relative to a given publication.voidgetPublication(String appId, String id, String contributionId, String type, RestCallback<PublicationDTO> callback) Retrieves a specific publication by its ID.voidgetPublications(String appId, String topicId, RestCallback<List<PublicationDTO>> callback) Retrieves publications for a given topic.voidgetTickets(String appId, List<TicketDTO> tickets, RestCallback<List<TicketDTO>> callback) Retrieves tickets for a list of ticket IDs.voidRetrieves topics for a given root topic.voidgetTopicsAndPublications(String appId, String rootTopicId, RestCallback<List<BaseDTO>> callback) Retrieves topics and publications for a given root topic.voidpublish(String appId, String pubId, RestCallback<PublicationDTO> callback) Publishes a publication.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
-
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
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
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
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).
-