com.silverpeas.sharing.services
Class JpaSharingTicketService

java.lang.Object
  extended by com.silverpeas.sharing.services.JpaSharingTicketService
All Implemented Interfaces:
SharingTicketService

@Named(value="sharingTicketService")
@Service
@Transactional
public class JpaSharingTicketService
extends Object
implements SharingTicketService

Author:
ehugonnet

Constructor Summary
JpaSharingTicketService()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JpaSharingTicketService

public JpaSharingTicketService()
Method Detail

getTicketsByUser

public List<Ticket> getTicketsByUser(String userId)
Description copied from interface: SharingTicketService
Gets all the tickets emitted by the specified users.

Specified by:
getTicketsByUser in interface SharingTicketService
Parameters:
userId - the identifier of the user that has emitted the tickets.
Returns:
the tickets of this user.

deleteTicketsForSharedObject

public void deleteTicketsForSharedObject(Long sharedObjectId,
                                         String type)
Description copied from interface: SharingTicketService
Deletes all the tickets about the specified file.

Specified by:
deleteTicketsForSharedObject in interface SharingTicketService
Parameters:
sharedObjectId - the identifier of the shared object.
type - is this shared object type.

getTicket

public Ticket getTicket(String key)
Description copied from interface: SharingTicketService
Gets the ticket identified by the specified key.

Specified by:
getTicket in interface SharingTicketService
Parameters:
key - the key identifying the ticket.
Returns:
the ticket.

createTicket

public String createTicket(Ticket ticket)
Description copied from interface: SharingTicketService
Creates a new ticket in the system.

Specified by:
createTicket in interface SharingTicketService
Parameters:
ticket - the ticket to save.
Returns:
the key identifying the saved ticket.

addDownload

public void addDownload(DownloadDetail download)
Description copied from interface: SharingTicketService
Updates the list of downloads that were done for a specified ticket.

Specified by:
addDownload in interface SharingTicketService
Parameters:
download - the new download to add in the list.

updateTicket

public void updateTicket(Ticket ticket)
Description copied from interface: SharingTicketService
Updates the information of the specified ticket.

Specified by:
updateTicket in interface SharingTicketService
Parameters:
ticket - the ticket with updated information.

deleteTicket

public void deleteTicket(String key)
Description copied from interface: SharingTicketService
Deletes the ticket identified by the specified key.

Specified by:
deleteTicket in interface SharingTicketService
Parameters:
key - the key identifying the ticket.


Copyright © 2016 Silverpeas. All Rights Reserved.