com.silverpeas.sharing.services
Interface SharingTicketService

All Known Implementing Classes:
JpaSharingTicketService

public interface SharingTicketService

The business service of file sharing. The file sharing service provides a way to share files from the Silverpeas portal to external users. The share of a file to external users consists of creation a ticket for downloading this file from the Silverpeas portal. This ticket can be limited in time and in download count.


Method Summary
 void addDownload(DownloadDetail download)
          Updates the list of downloads that were done for a specified ticket.
 String createTicket(Ticket ticket)
          Creates a new ticket in the system.
 void deleteTicket(String key)
          Deletes the ticket identified by the specified key.
 void deleteTicketsForSharedObject(Long sharedObjectId, String type)
          Deletes all the tickets about the specified file.
 Ticket getTicket(String key)
          Gets the ticket identified by the specified key.
 List<Ticket> getTicketsByUser(String userId)
          Gets all the tickets emitted by the specified users.
 void updateTicket(Ticket ticket)
          Updates the information of the specified ticket.
 

Method Detail

getTicketsByUser

List<Ticket> getTicketsByUser(String userId)
Gets all the tickets emitted by the specified users.

Parameters:
userId - the identifier of the user that has emitted the tickets.
Returns:
the tickets of this user.

deleteTicketsForSharedObject

void deleteTicketsForSharedObject(Long sharedObjectId,
                                  String type)
Deletes all the tickets about the specified file.

Parameters:
sharedObjectId - the identifier of the shared object.
type - is this shared object type.

getTicket

Ticket getTicket(String key)
Gets the ticket identified by the specified key.

Parameters:
key - the key identifying the ticket.
Returns:
the ticket.

createTicket

String createTicket(Ticket ticket)
Creates a new ticket in the system.

Parameters:
ticket - the ticket to save.
Returns:
the key identifying the saved ticket.

addDownload

void addDownload(DownloadDetail download)
Updates the list of downloads that were done for a specified ticket.

Parameters:
download - the new download to add in the list.

updateTicket

void updateTicket(Ticket ticket)
Updates the information of the specified ticket.

Parameters:
ticket - the ticket with updated information.

deleteTicket

void deleteTicket(String key)
Deletes the ticket identified by the specified key.

Parameters:
key - the key identifying the ticket.


Copyright © 2016 Silverpeas. All Rights Reserved.