Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.metahistory
Interface MetaHistoryService

All Known Implementing Classes:
MetaHistoryServiceImpl

public interface MetaHistoryService

The Meta History Service is wrapper around the other known history services. Query them all at once, sort the result and return all merged records in one collection.

Author:
Damian Minkov

Method Summary
 void addSearchProgressListener(HistorySearchProgressListener listener)
          Adding progress listener for monitoring progress of search process
 Collection<Object> findByEndDate(String[] services, Object descriptor, Date endDate)
          Returns all the records before the given date
 Collection<Object> findByKeyword(String[] services, Object descriptor, String keyword)
          Returns all the records having the given keyword
 Collection<Object> findByKeyword(String[] services, Object descriptor, String keyword, boolean caseSensitive)
          Returns all the records having the given keyword
 Collection<Object> findByKeywords(String[] services, Object descriptor, String[] keywords)
          Returns all the records having the given keywords
 Collection<Object> findByKeywords(String[] services, Object descriptor, String[] keywords, boolean caseSensitive)
          Returns all the records having the given keywords
 Collection<Object> findByPeriod(String[] services, Object descriptor, Date startDate, Date endDate)
          Returns all the records between the given dates
 Collection<Object> findByPeriod(String[] services, Object descriptor, Date startDate, Date endDate, String[] keywords)
          Returns all the records between the given dates and having the given keywords
 Collection<Object> findByPeriod(String[] services, Object descriptor, Date startDate, Date endDate, String[] keywords, boolean caseSensitive)
          Returns all the records between the given dates and having the given keywords
 Collection<Object> findByStartDate(String[] services, Object descriptor, Date startDate)
          Returns all the records for the descriptor after the given date.
 Collection<Object> findFirstMessagesAfter(String[] services, Object descriptor, Date date, int count)
          Returns the supplied number of recent records after the given date
 Collection<Object> findLast(String[] services, Object descriptor, int count)
          Returns the supplied number of recent records.
 Collection<Object> findLastMessagesBefore(String[] services, Object descriptor, Date date, int count)
          Returns the supplied number of recent records before the given date
 void removeSearchProgressListener(HistorySearchProgressListener listener)
          Removing progress listener
 

Method Detail

findByStartDate

Collection<Object> findByStartDate(String[] services,
                                   Object descriptor,
                                   Date startDate)
                                   throws RuntimeException
Returns all the records for the descriptor after the given date.

Parameters:
services - the services classnames we will query
descriptor - CallPeer address(String), MetaContact or ChatRoom.
startDate - Date the date of the first record to return
Returns:
Collection sorted result that conists of records returned from the services we wrap
Throws:
RuntimeException

findByEndDate

Collection<Object> findByEndDate(String[] services,
                                 Object descriptor,
                                 Date endDate)
                                 throws RuntimeException
Returns all the records before the given date

Parameters:
services - the services classnames we will query
descriptor - CallPeer address(String), MetaContact or ChatRoom.
endDate - Date the date of the last record to return
Returns:
Collection sorted result that conists of records returned from the services we wrap
Throws:
RuntimeException

findByPeriod

Collection<Object> findByPeriod(String[] services,
                                Object descriptor,
                                Date startDate,
                                Date endDate)
                                throws RuntimeException
Returns all the records between the given dates

Parameters:
services - the services classnames we will query
descriptor - CallPeer address(String), MetaContact or ChatRoom.
startDate - Date the date of the first record to return
endDate - Date the date of the last record to return
Returns:
Collection sorted result that conists of records returned from the services we wrap
Throws:
RuntimeException

findByPeriod

Collection<Object> findByPeriod(String[] services,
                                Object descriptor,
                                Date startDate,
                                Date endDate,
                                String[] keywords)
                                throws RuntimeException
Returns all the records between the given dates and having the given keywords

Parameters:
services - the services classnames we will query
descriptor - CallPeer address(String), MetaContact or ChatRoom.
startDate - Date the date of the first record to return
endDate - Date the date of the last record to return
keywords - array of keywords
Returns:
Collection sorted result that conists of records returned from the services we wrap
Throws:
RuntimeException

findByPeriod

Collection<Object> findByPeriod(String[] services,
                                Object descriptor,
                                Date startDate,
                                Date endDate,
                                String[] keywords,
                                boolean caseSensitive)
                                throws RuntimeException
Returns all the records between the given dates and having the given keywords

Parameters:
services - the services classnames we will query
descriptor - CallPeer address(String), MetaContact or ChatRoom.
startDate - Date the date of the first record to return
endDate - Date the date of the last record to return
keywords - array of keywords
caseSensitive - is keywords search case sensitive
Returns:
Collection sorted result that conists of records returned from the services we wrap
Throws:
RuntimeException

findByKeyword

Collection<Object> findByKeyword(String[] services,
                                 Object descriptor,
                                 String keyword)
                                 throws RuntimeException
Returns all the records having the given keyword

Parameters:
services - the services classnames we will query
descriptor - CallPeer address(String), MetaContact or ChatRoom.
keyword - keyword
Returns:
Collection sorted result that conists of records returned from the services we wrap
Throws:
RuntimeException

findByKeyword

Collection<Object> findByKeyword(String[] services,
                                 Object descriptor,
                                 String keyword,
                                 boolean caseSensitive)
                                 throws RuntimeException
Returns all the records having the given keyword

Parameters:
services - the services classnames we will query
descriptor - CallPeer address(String), MetaContact or ChatRoom.
keyword - keyword
caseSensitive - is keywords search case sensitive
Returns:
Collection sorted result that conists of records returned from the services we wrap
Throws:
RuntimeException

findByKeywords

Collection<Object> findByKeywords(String[] services,
                                  Object descriptor,
                                  String[] keywords)
                                  throws RuntimeException
Returns all the records having the given keywords

Parameters:
services - the services classnames we will query
descriptor - CallPeer address(String), MetaContact or ChatRoom.
keywords - keyword
Returns:
Collection sorted result that conists of records returned from the services we wrap
Throws:
RuntimeException

findByKeywords

Collection<Object> findByKeywords(String[] services,
                                  Object descriptor,
                                  String[] keywords,
                                  boolean caseSensitive)
                                  throws RuntimeException
Returns all the records having the given keywords

Parameters:
services - the services classnames we will query
descriptor - CallPeer address(String), MetaContact or ChatRoom.
keywords - keyword
caseSensitive - is keywords search case sensitive
Returns:
Collection sorted result that conists of records returned from the services we wrap
Throws:
RuntimeException

findLast

Collection<Object> findLast(String[] services,
                            Object descriptor,
                            int count)
                            throws RuntimeException
Returns the supplied number of recent records.

Parameters:
services - the services classnames we will query
descriptor - CallPeer address(String), MetaContact or ChatRoom.
count - messages count
Returns:
Collection sorted result that conists of records returned from the services we wrap
Throws:
RuntimeException

findFirstMessagesAfter

Collection<Object> findFirstMessagesAfter(String[] services,
                                          Object descriptor,
                                          Date date,
                                          int count)
                                          throws RuntimeException
Returns the supplied number of recent records after the given date

Parameters:
services - the services classnames we will query
descriptor - CallPeer address(String), MetaContact or ChatRoom.
date - messages after date
count - messages count
Returns:
Collection sorted result that conists of records returned from the services we wrap
Throws:
RuntimeException

findLastMessagesBefore

Collection<Object> findLastMessagesBefore(String[] services,
                                          Object descriptor,
                                          Date date,
                                          int count)
                                          throws RuntimeException
Returns the supplied number of recent records before the given date

Parameters:
services - the services classnames we will query
descriptor - CallPeer address(String), MetaContact or ChatRoom.
date - messages before date
count - messages count
Returns:
Collection sorted result that conists of records returned from the services we wrap
Throws:
RuntimeException

addSearchProgressListener

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

Parameters:
listener - HistorySearchProgressListener

removeSearchProgressListener

void removeSearchProgressListener(HistorySearchProgressListener listener)
Removing progress listener

Parameters:
listener - HistorySearchProgressListener

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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