|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UserMsgStateManager
utility class for handling UserMsgState objects
| Method Summary | |
|---|---|
UserMsgState |
create(Id messageId,
Id userId)
Set the user's read state for the message |
java.lang.String |
getSubscribedInd(Id messageId,
Id userId)
Get the indicator for whether the user is subscribed to the thread in which the message appears. |
java.util.List |
loadAllByMessageId(Id messageId)
load All UserMsgState objects for a given message |
UserMsgState |
loadByMessageIdAndUserId(Id messageId,
Id userId)
load UserMsgState of a particular message-user combination |
UserMsgState |
recordMessageReadStateAndReadCount(Id messageId,
Id userId)
Record the UserMsgState's read-state of a particular message-user combination |
void |
save(UserMsgState ums)
save a UserMsgState object. |
void |
setFlag(Id messageId,
Id userId,
boolean isAdd)
Set user's Add/Clear flag for a given message |
void |
setRating(Id messageId,
Id userId,
int rating)
set the user's rating for the message |
void |
setSubscribedInd(Id messageId,
Id userId)
Flip the indicator for whether the the user is subscribed to the thread in which the message appears from true to false or false to true. |
void |
setUserReadStateForMessage(Id messageId,
Id userId,
boolean isRead)
Set the user's read state for the message |
void |
setUserReadStateForThread(Id threadId,
Id userId,
boolean isRead)
Set the user's read state for the thread |
void |
setUserReadStateToUnreadForAllUsers(Id messageId)
Marks the specified message as unread for all users |
java.util.List<Message> |
updateUserMessageReadCount(java.util.List<Message> messageList,
Id userId)
Updates the read count for the list of messages. |
| Method Detail |
|---|
UserMsgState create(Id messageId,
Id userId)
throws PersistenceException,
ValidationException
messageId - userId -
PersistenceException
ValidationException
void save(UserMsgState ums)
throws PersistenceException,
ValidationException
ums - UserMsgState to be saved
ValidationException - if the object is not in a consistent state to be persisted.
PersistenceException - if some other exception happens while persisting the object.
java.util.List loadAllByMessageId(Id messageId)
throws KeyNotFoundException,
PersistenceException
messageId - Message ID.
KeyNotFoundException
PersistenceException - if some other exception happens while persisting the object.
UserMsgState loadByMessageIdAndUserId(Id messageId,
Id userId)
throws PersistenceException
messageId - Message ID.userId - User ID
PersistenceException - if some other exception happens while persisting the object.
java.util.List<Message> updateUserMessageReadCount(java.util.List<Message> messageList,
Id userId)
throws java.lang.Exception
messageList - userId -
java.lang.Exception
UserMsgState recordMessageReadStateAndReadCount(Id messageId,
Id userId)
throws PersistenceException,
ValidationException
messageId - Message ID.userId - User ID
ValidationException - if the object is not in a consistent state to be persisted.
PersistenceException - if some other exception happens while persisting the object.
java.lang.String getSubscribedInd(Id messageId,
Id userId)
messageId - userId -
void setFlag(Id messageId,
Id userId,
boolean isAdd)
throws PersistenceException,
ValidationException
messageId - userId - isAdd -
PersistenceException
ValidationException
void setRating(Id messageId,
Id userId,
int rating)
throws PersistenceException,
ValidationException
messageId - userId - rating -
PersistenceException
ValidationException
void setSubscribedInd(Id messageId,
Id userId)
throws PersistenceException,
ValidationException
messageId - userId -
PersistenceException
ValidationException
void setUserReadStateForThread(Id threadId,
Id userId,
boolean isRead)
throws PersistenceException,
ValidationException
messageId - userId -
PersistenceException
ValidationException
void setUserReadStateForMessage(Id messageId,
Id userId,
boolean isRead)
throws PersistenceException,
ValidationException
messageId - userId -
PersistenceException
ValidationException
void setUserReadStateToUnreadForAllUsers(Id messageId)
throws PersistenceException
messageId - Id of the message to set as unread for all users
PersistenceException - if some other exception happens while persisting the object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||