public interface MessageHistoryService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PNAME_IS_MESSAGE_HISTORY_ENABLED
Name of the property that indicates whether the logging of messages is
enabled.
|
static java.lang.String |
PNAME_IS_MESSAGE_HISTORY_PER_CONTACT_ENABLED_PREFIX
Name of the property that indicates whether the logging of messages is
enabled.
|
static java.lang.String |
PNAME_IS_RECENT_MESSAGES_DISABLED
Name of the property that indicates whether the recent messages is
enabled.
|
Modifier and Type | Method and Description |
---|---|
void |
addSearchProgressListener(MessageHistorySearchProgressListener listener)
Adding progress listener for monitoring progress of search process
|
void |
eraseLocallyStoredHistory()
Permanently removes all locally stored message history.
|
void |
eraseLocallyStoredHistory(ChatRoom room)
Permanently removes locally stored message history for the chatroom.
|
void |
eraseLocallyStoredHistory(MetaContact contact)
Permanently removes locally stored message history for the metacontact.
|
java.util.Collection<java.util.EventObject> |
findByEndDate(ChatRoom room,
java.util.Date endDate)
Returns all the messages exchanged
in the supplied chat room before the given date
|
java.util.Collection<java.util.EventObject> |
findByEndDate(MetaContact contact,
java.util.Date endDate)
Returns all the messages exchanged by all the contacts
in the supplied metacontact before the given date
|
java.util.Collection<java.util.EventObject> |
findByKeyword(ChatRoom room,
java.lang.String keyword)
Returns all the messages exchanged
in the supplied room having the given keyword
|
java.util.Collection<java.util.EventObject> |
findByKeyword(ChatRoom room,
java.lang.String keyword,
boolean caseSensitive)
Returns all the messages exchanged
in the supplied chat room having the given keyword
|
java.util.Collection<java.util.EventObject> |
findByKeyword(MetaContact contact,
java.lang.String keyword)
Returns all the messages exchanged by all the contacts
in the supplied metacontact having the given keyword
|
java.util.Collection<java.util.EventObject> |
findByKeyword(MetaContact contact,
java.lang.String keyword,
boolean caseSensitive)
Returns all the messages exchanged by all the contacts
in the supplied metacontact having the given keyword
|
java.util.Collection<java.util.EventObject> |
findByKeywords(ChatRoom room,
java.lang.String[] keywords)
Returns all the messages exchanged
in the supplied chat room having the given keywords
|
java.util.Collection<java.util.EventObject> |
findByKeywords(ChatRoom room,
java.lang.String[] keywords,
boolean caseSensitive)
Returns all the messages exchanged
in the supplied chat room having the given keywords
|
java.util.Collection<java.util.EventObject> |
findByKeywords(MetaContact contact,
java.lang.String[] keywords)
Returns all the messages exchanged by all the contacts
in the supplied metacontact having the given keywords
|
java.util.Collection<java.util.EventObject> |
findByKeywords(MetaContact contact,
java.lang.String[] keywords,
boolean caseSensitive)
Returns all the messages exchanged by all the contacts
in the supplied metacontact having the given keywords
|
java.util.Collection<java.util.EventObject> |
findByPeriod(ChatRoom room,
java.util.Date startDate,
java.util.Date endDate)
Returns all the messages exchanged
in the supplied chat room between the given dates
|
java.util.Collection<java.util.EventObject> |
findByPeriod(ChatRoom room,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String[] keywords)
Returns all the messages exchanged
in the supplied chat room between the given dates and having the given
keywords
|
java.util.Collection<java.util.EventObject> |
findByPeriod(ChatRoom room,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String[] keywords,
boolean caseSensitive)
Returns all the messages exchanged
in the supplied chat room between the given dates and having the given
keywords
|
java.util.Collection<java.util.EventObject> |
findByPeriod(MetaContact contact,
java.util.Date startDate,
java.util.Date endDate)
Returns all the messages exchanged by all the contacts
in the supplied metacontact between the given dates
|
java.util.Collection<java.util.EventObject> |
findByPeriod(MetaContact contact,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String[] keywords)
Returns all the messages exchanged by all the contacts
in the supplied metacontact between the given dates and having the given
keywords
|
java.util.Collection<java.util.EventObject> |
findByPeriod(MetaContact contact,
java.util.Date startDate,
java.util.Date endDate,
java.lang.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
|
java.util.Collection<java.util.EventObject> |
findByStartDate(ChatRoom room,
java.util.Date startDate)
Returns all the messages exchanged in the supplied
chat room after the given date
|
java.util.Collection<java.util.EventObject> |
findByStartDate(MetaContact contact,
java.util.Date startDate)
Returns all the messages exchanged by all the contacts
in the supplied metacontact after the given date
|
java.util.Collection<java.util.EventObject> |
findFirstMessagesAfter(ChatRoom room,
java.util.Date date,
int count)
Returns the supplied number of recent messages after the given date
exchanged in the supplied chat room
|
java.util.Collection<java.util.EventObject> |
findFirstMessagesAfter(MetaContact contact,
java.util.Date date,
int count)
Returns the supplied number of recent messages after the given date
exchanged by all the contacts in the supplied metacontact
|
java.util.Collection<java.util.EventObject> |
findLast(ChatRoom room,
int count)
Returns the supplied number of recent messages exchanged
in the supplied chat room
|
java.util.Collection<java.util.EventObject> |
findLast(MetaContact contact,
int count)
Returns the supplied number of recent messages exchanged by all the contacts
in the supplied metacontact
|
java.util.Collection<java.util.EventObject> |
findLastMessagesBefore(ChatRoom room,
java.util.Date date,
int count)
Returns the supplied number of recent messages before the given date
exchanged in the supplied chat room
|
java.util.Collection<java.util.EventObject> |
findLastMessagesBefore(MetaContact contact,
java.util.Date date,
int count)
Returns the supplied number of recent messages before the given date
exchanged by all the contacts in the supplied metacontact
|
boolean |
isHistoryLoggingEnabled()
Returns
true if the "IS_MESSAGE_HISTORY_ENABLED"
property is true, otherwise - returns false . |
boolean |
isHistoryLoggingEnabled(java.lang.String id)
Returns
true if the "IS_MESSAGE_HISTORY_ENABLED"
property is true for the id, otherwise - returns
false . |
void |
removeSearchProgressListener(MessageHistorySearchProgressListener listener)
Removing progress listener
|
void |
setHistoryLoggingEnabled(boolean isEnabled)
Updates the "isHistoryLoggingEnabled" property through the
ConfigurationService.
|
void |
setHistoryLoggingEnabled(boolean isEnabled,
java.lang.String id)
Updates the "isHistoryLoggingEnabled" property through the
ConfigurationService for the contact.
|
static final java.lang.String PNAME_IS_MESSAGE_HISTORY_ENABLED
static final java.lang.String PNAME_IS_RECENT_MESSAGES_DISABLED
static final java.lang.String PNAME_IS_MESSAGE_HISTORY_PER_CONTACT_ENABLED_PREFIX
java.util.Collection<java.util.EventObject> findByStartDate(MetaContact contact, java.util.Date startDate) throws java.lang.RuntimeException
contact
- MetaContactstartDate
- Date the start date of the conversationsjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByEndDate(MetaContact contact, java.util.Date endDate) throws java.lang.RuntimeException
contact
- MetaContactendDate
- Date the end date of the conversationsjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByPeriod(MetaContact contact, java.util.Date startDate, java.util.Date endDate) throws java.lang.RuntimeException
contact
- MetaContactstartDate
- Date the start date of the conversationsendDate
- Date the end date of the conversationsjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByPeriod(MetaContact contact, java.util.Date startDate, java.util.Date endDate, java.lang.String[] keywords) throws java.lang.RuntimeException
contact
- MetaContactstartDate
- Date the start date of the conversationsendDate
- Date the end date of the conversationskeywords
- array of keywordsjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByPeriod(MetaContact contact, java.util.Date startDate, java.util.Date endDate, java.lang.String[] keywords, boolean caseSensitive) throws java.lang.RuntimeException
contact
- MetaContactstartDate
- Date the start date of the conversationsendDate
- Date the end date of the conversationskeywords
- array of keywordscaseSensitive
- is keywords search case sensitivejava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByKeyword(MetaContact contact, java.lang.String keyword) throws java.lang.RuntimeException
contact
- MetaContactkeyword
- keywordjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByKeyword(MetaContact contact, java.lang.String keyword, boolean caseSensitive) throws java.lang.RuntimeException
contact
- MetaContactkeyword
- keywordcaseSensitive
- is keywords search case sensitivejava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByKeywords(MetaContact contact, java.lang.String[] keywords) throws java.lang.RuntimeException
contact
- MetaContactkeywords
- keywordjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByKeywords(MetaContact contact, java.lang.String[] keywords, boolean caseSensitive) throws java.lang.RuntimeException
contact
- MetaContactkeywords
- keywordcaseSensitive
- is keywords search case sensitivejava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findLast(MetaContact contact, int count) throws java.lang.RuntimeException
contact
- MetaContactcount
- messages countjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findFirstMessagesAfter(MetaContact contact, java.util.Date date, int count) throws java.lang.RuntimeException
contact
- MetaContactdate
- messages after datecount
- messages countjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findLastMessagesBefore(MetaContact contact, java.util.Date date, int count) throws java.lang.RuntimeException
contact
- MetaContactdate
- messages before datecount
- messages countjava.lang.RuntimeException
void addSearchProgressListener(MessageHistorySearchProgressListener listener)
listener
- HistorySearchProgressListenervoid removeSearchProgressListener(MessageHistorySearchProgressListener listener)
listener
- HistorySearchProgressListenerjava.util.Collection<java.util.EventObject> findByStartDate(ChatRoom room, java.util.Date startDate) throws java.lang.RuntimeException
room
- The chat roomstartDate
- Date the start date of the conversationsjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByEndDate(ChatRoom room, java.util.Date endDate) throws java.lang.RuntimeException
room
- The chat roomendDate
- Date the end date of the conversationsjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByPeriod(ChatRoom room, java.util.Date startDate, java.util.Date endDate) throws java.lang.RuntimeException
room
- The chat roomstartDate
- Date the start date of the conversationsendDate
- Date the end date of the conversationsjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByPeriod(ChatRoom room, java.util.Date startDate, java.util.Date endDate, java.lang.String[] keywords) throws java.lang.RuntimeException
room
- The chat roomstartDate
- Date the start date of the conversationsendDate
- Date the end date of the conversationskeywords
- array of keywordsjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByPeriod(ChatRoom room, java.util.Date startDate, java.util.Date endDate, java.lang.String[] keywords, boolean caseSensitive) throws java.lang.RuntimeException
room
- The chat roomstartDate
- Date the start date of the conversationsendDate
- Date the end date of the conversationskeywords
- array of keywordscaseSensitive
- is keywords search case sensitivejava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByKeyword(ChatRoom room, java.lang.String keyword) throws java.lang.RuntimeException
room
- The Chat roomkeyword
- keywordjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByKeyword(ChatRoom room, java.lang.String keyword, boolean caseSensitive) throws java.lang.RuntimeException
room
- The chat roomkeyword
- keywordcaseSensitive
- is keywords search case sensitivejava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByKeywords(ChatRoom room, java.lang.String[] keywords) throws java.lang.RuntimeException
room
- The chat roomkeywords
- keywordjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findByKeywords(ChatRoom room, java.lang.String[] keywords, boolean caseSensitive) throws java.lang.RuntimeException
room
- The chat roomkeywords
- keywordcaseSensitive
- is keywords search case sensitivejava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findLast(ChatRoom room, int count) throws java.lang.RuntimeException
room
- The chat roomcount
- messages countjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findFirstMessagesAfter(ChatRoom room, java.util.Date date, int count) throws java.lang.RuntimeException
room
- The chat roomdate
- messages after datecount
- messages countjava.lang.RuntimeException
java.util.Collection<java.util.EventObject> findLastMessagesBefore(ChatRoom room, java.util.Date date, int count) throws java.lang.RuntimeException
room
- The chat roomdate
- messages before datecount
- messages countjava.lang.RuntimeException
void eraseLocallyStoredHistory() throws java.io.IOException
java.io.IOException
- Thrown if the history could not be removed due to a IO error.void eraseLocallyStoredHistory(MetaContact contact) throws java.io.IOException
java.io.IOException
- Thrown if the history could not be removed due to a IO error.void eraseLocallyStoredHistory(ChatRoom room) throws java.io.IOException
java.io.IOException
- Thrown if the history could not be removed due to a IO error.boolean isHistoryLoggingEnabled()
true
if the "IS_MESSAGE_HISTORY_ENABLED"
property is true, otherwise - returns false
.
Indicates to the user interface whether the history logging is enabled.true
if the "IS_MESSAGE_HISTORY_ENABLED"
property is true, otherwise - returns false
.void setHistoryLoggingEnabled(boolean isEnabled)
isEnabled
- indicates if the history logging is
enabled.boolean isHistoryLoggingEnabled(java.lang.String id)
true
if the "IS_MESSAGE_HISTORY_ENABLED"
property is true for the id, otherwise - returns
false
.
Indicates to the user interface whether the history logging is enabled
for the supplied id (id for metacontact or for chat room).true
if the "IS_MESSAGE_HISTORY_ENABLED"
property is true for the id, otherwise - returns
false
.void setHistoryLoggingEnabled(boolean isEnabled, java.lang.String id)
isEnabled
- indicates if the history logging is
enabled for the contact.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.