Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.msghistory
Interface MessageHistoryService

All Known Implementing Classes:
MessageHistoryServiceImpl

public interface MessageHistoryService

The Message History Service stores messages exchanged through the various protocols

Author:
Alexander Pelov, Damian Minkov

Method Summary
 void addSearchProgressListener(MessageHistorySearchProgressListener listener)
          Adding progress listener for monitoring progress of search process
 Collection<EventObject> findByEndDate(ChatRoom room, Date endDate)
          Returns all the messages exchanged in the supplied chat room before the given date
 Collection<EventObject> findByEndDate(MetaContact contact, Date endDate)
          Returns all the messages exchanged by all the contacts in the supplied metacontact before the given date
 Collection<EventObject> findByKeyword(ChatRoom room, String keyword)
          Returns all the messages exchanged in the supplied room having the given keyword
 Collection<EventObject> findByKeyword(ChatRoom room, String keyword, boolean caseSensitive)
          Returns all the messages exchanged in the supplied chat room having the given keyword
 Collection<EventObject> findByKeyword(MetaContact contact, String keyword)
          Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keyword
 Collection<EventObject> findByKeyword(MetaContact contact, String keyword, boolean caseSensitive)
          Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keyword
 Collection<EventObject> findByKeywords(ChatRoom room, String[] keywords)
          Returns all the messages exchanged in the supplied chat room having the given keywords
 Collection<EventObject> findByKeywords(ChatRoom room, String[] keywords, boolean caseSensitive)
          Returns all the messages exchanged in the supplied chat room having the given keywords
 Collection<EventObject> findByKeywords(MetaContact contact, String[] keywords)
          Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keywords
 Collection<EventObject> findByKeywords(MetaContact contact, String[] keywords, boolean caseSensitive)
          Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keywords
 Collection<EventObject> findByPeriod(ChatRoom room, Date startDate, Date endDate)
          Returns all the messages exchanged in the supplied chat room between the given dates
 Collection<EventObject> findByPeriod(ChatRoom room, Date startDate, Date endDate, String[] keywords)
          Returns all the messages exchanged in the supplied chat room between the given dates and having the given keywords
 Collection<EventObject> findByPeriod(ChatRoom room, Date startDate, Date endDate, String[] keywords, boolean caseSensitive)
          Returns all the messages exchanged in the supplied chat room between the given dates and having the given keywords
 Collection<EventObject> findByPeriod(MetaContact contact, Date startDate, Date endDate)
          Returns all the messages exchanged by all the contacts in the supplied metacontact between the given dates
 Collection<EventObject> findByPeriod(MetaContact contact, Date startDate, Date endDate, String[] keywords)
          Returns all the messages exchanged by all the contacts in the supplied metacontact between the given dates and having the given keywords
 Collection<EventObject> findByPeriod(MetaContact contact, Date startDate, Date endDate, String[] keywords, boolean caseSensitive)
          Returns all the messages exchanged by all the contacts in the supplied metacontact between the given dates and having the given keywords
 Collection<EventObject> findByStartDate(ChatRoom room, Date startDate)
          Returns all the messages exchanged in the supplied chat room after the given date
 Collection<EventObject> findByStartDate(MetaContact contact, Date startDate)
          Returns all the messages exchanged by all the contacts in the supplied metacontact after the given date
 Collection<EventObject> findFirstMessagesAfter(ChatRoom room, Date date, int count)
          Returns the supplied number of recent messages after the given date exchanged in the supplied chat room
 Collection<EventObject> findFirstMessagesAfter(MetaContact contact, Date date, int count)
          Returns the supplied number of recent messages after the given date exchanged by all the contacts in the supplied metacontact
 Collection<EventObject> findLast(ChatRoom room, int count)
          Returns the supplied number of recent messages exchanged in the supplied chat room
 Collection<EventObject> findLast(MetaContact contact, int count)
          Returns the supplied number of recent messages exchanged by all the contacts in the supplied metacontact
 Collection<EventObject> findLastMessagesBefore(ChatRoom room, Date date, int count)
          Returns the supplied number of recent messages before the given date exchanged in the supplied chat room
 Collection<EventObject> findLastMessagesBefore(MetaContact contact, Date date, int count)
          Returns the supplied number of recent messages before the given date exchanged by all the contacts in the supplied metacontact
 void removeSearchProgressListener(MessageHistorySearchProgressListener listener)
          Removing progress listener
 

Method Detail

findByStartDate

Collection<EventObject> findByStartDate(MetaContact contact,
                                        Date startDate)
                                        throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact after the given date

Parameters:
contact - MetaContact
startDate - Date the start date of the conversations
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByEndDate

Collection<EventObject> findByEndDate(MetaContact contact,
                                      Date endDate)
                                      throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact before the given date

Parameters:
contact - MetaContact
endDate - Date the end date of the conversations
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByPeriod

Collection<EventObject> findByPeriod(MetaContact contact,
                                     Date startDate,
                                     Date endDate)
                                     throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact between the given dates

Parameters:
contact - MetaContact
startDate - Date the start date of the conversations
endDate - Date the end date of the conversations
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByPeriod

Collection<EventObject> findByPeriod(MetaContact contact,
                                     Date startDate,
                                     Date endDate,
                                     String[] keywords)
                                     throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact between the given dates and having the given keywords

Parameters:
contact - MetaContact
startDate - Date the start date of the conversations
endDate - Date the end date of the conversations
keywords - array of keywords
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByPeriod

Collection<EventObject> findByPeriod(MetaContact contact,
                                     Date startDate,
                                     Date endDate,
                                     String[] keywords,
                                     boolean caseSensitive)
                                     throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact between the given dates and having the given keywords

Parameters:
contact - MetaContact
startDate - Date the start date of the conversations
endDate - Date the end date of the conversations
keywords - array of keywords
caseSensitive - is keywords search case sensitive
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeyword

Collection<EventObject> findByKeyword(MetaContact contact,
                                      String keyword)
                                      throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keyword

Parameters:
contact - MetaContact
keyword - keyword
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeyword

Collection<EventObject> findByKeyword(MetaContact contact,
                                      String keyword,
                                      boolean caseSensitive)
                                      throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keyword

Parameters:
contact - MetaContact
keyword - keyword
caseSensitive - is keywords search case sensitive
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeywords

Collection<EventObject> findByKeywords(MetaContact contact,
                                       String[] keywords)
                                       throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keywords

Parameters:
contact - MetaContact
keywords - keyword
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeywords

Collection<EventObject> findByKeywords(MetaContact contact,
                                       String[] keywords,
                                       boolean caseSensitive)
                                       throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keywords

Parameters:
contact - MetaContact
keywords - keyword
caseSensitive - is keywords search case sensitive
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findLast

Collection<EventObject> findLast(MetaContact contact,
                                 int count)
                                 throws RuntimeException
Returns the supplied number of recent messages exchanged by all the contacts in the supplied metacontact

Parameters:
contact - MetaContact
count - messages count
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findFirstMessagesAfter

Collection<EventObject> findFirstMessagesAfter(MetaContact contact,
                                               Date date,
                                               int count)
                                               throws RuntimeException
Returns the supplied number of recent messages after the given date exchanged by all the contacts in the supplied metacontact

Parameters:
contact - MetaContact
date - messages after date
count - messages count
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findLastMessagesBefore

Collection<EventObject> findLastMessagesBefore(MetaContact contact,
                                               Date date,
                                               int count)
                                               throws RuntimeException
Returns the supplied number of recent messages before the given date exchanged by all the contacts in the supplied metacontact

Parameters:
contact - MetaContact
date - messages before date
count - messages count
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

addSearchProgressListener

void addSearchProgressListener(MessageHistorySearchProgressListener listener)
Adding progress listener for monitoring progress of search process

Parameters:
listener - HistorySearchProgressListener

removeSearchProgressListener

void removeSearchProgressListener(MessageHistorySearchProgressListener listener)
Removing progress listener

Parameters:
listener - HistorySearchProgressListener

findByStartDate

Collection<EventObject> findByStartDate(ChatRoom room,
                                        Date startDate)
                                        throws RuntimeException
Returns all the messages exchanged in the supplied chat room after the given date

Parameters:
room - The chat room
startDate - Date the start date of the conversations
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByEndDate

Collection<EventObject> findByEndDate(ChatRoom room,
                                      Date endDate)
                                      throws RuntimeException
Returns all the messages exchanged in the supplied chat room before the given date

Parameters:
room - The chat room
endDate - Date the end date of the conversations
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByPeriod

Collection<EventObject> findByPeriod(ChatRoom room,
                                     Date startDate,
                                     Date endDate)
                                     throws RuntimeException
Returns all the messages exchanged in the supplied chat room between the given dates

Parameters:
room - The chat room
startDate - Date the start date of the conversations
endDate - Date the end date of the conversations
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByPeriod

Collection<EventObject> findByPeriod(ChatRoom room,
                                     Date startDate,
                                     Date endDate,
                                     String[] keywords)
                                     throws RuntimeException
Returns all the messages exchanged in the supplied chat room between the given dates and having the given keywords

Parameters:
room - The chat room
startDate - Date the start date of the conversations
endDate - Date the end date of the conversations
keywords - array of keywords
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByPeriod

Collection<EventObject> findByPeriod(ChatRoom room,
                                     Date startDate,
                                     Date endDate,
                                     String[] keywords,
                                     boolean caseSensitive)
                                     throws RuntimeException
Returns all the messages exchanged in the supplied chat room between the given dates and having the given keywords

Parameters:
room - The chat room
startDate - Date the start date of the conversations
endDate - Date the end date of the conversations
keywords - array of keywords
caseSensitive - is keywords search case sensitive
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeyword

Collection<EventObject> findByKeyword(ChatRoom room,
                                      String keyword)
                                      throws RuntimeException
Returns all the messages exchanged in the supplied room having the given keyword

Parameters:
room - The Chat room
keyword - keyword
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeyword

Collection<EventObject> findByKeyword(ChatRoom room,
                                      String keyword,
                                      boolean caseSensitive)
                                      throws RuntimeException
Returns all the messages exchanged in the supplied chat room having the given keyword

Parameters:
room - The chat room
keyword - keyword
caseSensitive - is keywords search case sensitive
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeywords

Collection<EventObject> findByKeywords(ChatRoom room,
                                       String[] keywords)
                                       throws RuntimeException
Returns all the messages exchanged in the supplied chat room having the given keywords

Parameters:
room - The chat room
keywords - keyword
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeywords

Collection<EventObject> findByKeywords(ChatRoom room,
                                       String[] keywords,
                                       boolean caseSensitive)
                                       throws RuntimeException
Returns all the messages exchanged in the supplied chat room having the given keywords

Parameters:
room - The chat room
keywords - keyword
caseSensitive - is keywords search case sensitive
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findLast

Collection<EventObject> findLast(ChatRoom room,
                                 int count)
                                 throws RuntimeException
Returns the supplied number of recent messages exchanged in the supplied chat room

Parameters:
room - The chat room
count - messages count
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findFirstMessagesAfter

Collection<EventObject> findFirstMessagesAfter(ChatRoom room,
                                               Date date,
                                               int count)
                                               throws RuntimeException
Returns the supplied number of recent messages after the given date exchanged in the supplied chat room

Parameters:
room - The chat room
date - messages after date
count - messages count
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findLastMessagesBefore

Collection<EventObject> findLastMessagesBefore(ChatRoom room,
                                               Date date,
                                               int count)
                                               throws RuntimeException
Returns the supplied number of recent messages before the given date exchanged in the supplied chat room

Parameters:
room - The chat room
date - messages before date
count - messages count
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.