public interface SystemMessageService
Modifier and Type | Method and Description |
---|---|
void |
clearSystemMessages()
Delete all system messages
|
void |
clearSystemMessagesByType(java.util.List<SystemMessageType> types)
Delete system messages of a specified type
|
void |
deleteSystemMessage(long messageId)
Delete a system message
|
InvocationFuture<java.util.List<SystemMessage>> |
querySystemMessageByType(java.util.List<SystemMessageType> types,
int offset,
int limit)
Query system messages by type (async)
|
java.util.List<SystemMessage> |
querySystemMessageByTypeBlock(java.util.List<SystemMessageType> types,
int offset,
int limit)
Query system messages by type (sync)
|
InvocationFuture<java.util.List<SystemMessage>> |
querySystemMessages(int offset,
int limit)
Query system messages (async)
|
java.util.List<SystemMessage> |
querySystemMessagesBlock(int offset,
int limit)
Query system messages (sync)
|
InvocationFuture<java.util.List<SystemMessage>> |
querySystemMessageUnread()
Get all unread system messages
|
InvocationFuture<java.lang.Integer> |
querySystemMessageUnreadCount()
Deprecated.
Use the sync version
querySystemMessageUnreadCountBlock() for less overhead and UI will not blocked. |
int |
querySystemMessageUnreadCountBlock()
Query the number of unread system messages (sync)
|
int |
querySystemMessageUnreadCountByType(java.util.List<SystemMessageType> types)
Query the number of unread system messages of a specified type (sync)
|
void |
resetSystemMessageUnreadCount()
Set all system messages to read and reset the number of the unread system messages to 0.
|
void |
resetSystemMessageUnreadCountByType(java.util.List<SystemMessageType> types)
Set system messages of a specified type to read
|
void |
setSystemMessageRead(long messageId)
Set a system message to read
|
void |
setSystemMessageStatus(long messageId,
SystemMessageStatus status)
Set the state of system messages After system messages are handled, the method can be called to update the state of system messages.
|
InvocationFuture<java.util.List<SystemMessage>> querySystemMessages(int offset, int limit)
offset
- The offset for query in databaselimit
- The limit for query in databasejava.util.List<SystemMessage> querySystemMessagesBlock(int offset, int limit)
offset
- The offset for query in databaselimit
- The limit for query in databaseInvocationFuture<java.util.List<SystemMessage>> querySystemMessageByType(java.util.List<SystemMessageType> types, int offset, int limit)
types
- Message types to be queriedoffset
- The offset for query in databaselimit
- The limit for query in databasejava.util.List<SystemMessage> querySystemMessageByTypeBlock(java.util.List<SystemMessageType> types, int offset, int limit)
types
- Message types to be queriedoffset
- The offset for query in databaselimit
- The limit for query in databaseInvocationFuture<java.util.List<SystemMessage>> querySystemMessageUnread()
void setSystemMessageStatus(long messageId, SystemMessageStatus status)
messageId
- Message IDstatus
- Status to be updatedvoid deleteSystemMessage(long messageId)
messageId
- Specified system message IDvoid clearSystemMessages()
void clearSystemMessagesByType(java.util.List<SystemMessageType> types)
types
- Types of system messagesInvocationFuture<java.lang.Integer> querySystemMessageUnreadCount()
querySystemMessageUnreadCountBlock()
for less overhead and UI will not blocked.int querySystemMessageUnreadCountBlock()
int querySystemMessageUnreadCountByType(java.util.List<SystemMessageType> types)
types
- Types of system messagesvoid resetSystemMessageUnreadCount()
void resetSystemMessageUnreadCountByType(java.util.List<SystemMessageType> types)
types
- Types of system messagesvoid setSystemMessageRead(long messageId)
messageId
- Message ID