|
Clearspace API (1.10.16) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ReadTracker
A way to track the read status of forum threads and messages. Note, this does not cover blogs, blog posts or wiki documents.
This feature is optional in that other Jive classes do not call this API. Instead, the UI layer must explicitly check and mark messages as read or unread. Because there is potentially a high overhead associated with this feature:To implement this feature, a skin author must manually mark each message as read as appropriate. For example, in a threaded view, this would be on the page that displays the message. In a flat view where many messages are show on each page, the markRead method should be called for each message on the page. There is no need to mark threads as read since that information can be automatically determined from which messages are read.
There are three states that each thread or message can be in:
UNREAD -- the object has never been read. In a
skin, a "new" icon should be used for objects in this state.
UPDATED -- the object has been read previously, but
there have since been updates. In a skin, an "updated" icon should
be used for objects in this state.
READ -- the object has been read and there have
been no updates to it since.
JiveContext.getReadTracker()| Field Summary | |
|---|---|
static int |
DEFAULT_TRACKING_THRESHOLD_DAYS
Default value used to determine number of days old a thread can be before being marked as read. |
static int |
READ
Status to indicate that the object has been read. |
static int |
UNREAD
Status to indicate that the object has never been read. |
static int |
UPDATED
Status to indicate the object has been updated since the last time a read was done. |
| Method Summary | |
|---|---|
int |
getReadStatus(User user,
ForumMessage message)
Returns the read status on the specified message. |
int |
getReadStatus(User user,
ForumThread thread)
Returns the read status on the specified thread. |
int |
getUnreadMessageCount(User user,
Community community)
Returns the count of unread messages that the user has in the community. |
JiveIterator<ForumMessage> |
getUnreadMessages(User user,
Community community)
Returns an iterable for the unread messages in the community. |
int |
getUnreadThreadCount(User user,
Community community)
Returns the count of unread threads that the user has in the community. |
JiveIterator<ForumThread> |
getUnreadThreads(User user,
Community community)
Returns an iterable for the unread threads in the community. |
boolean |
isReadTrackingEnabled()
Returns true if read tracking is enabled, false otherwise. |
void |
markRead(User user,
Community community)
Marks an entire community as read up until the current instant in time. |
void |
markRead(User user,
ForumMessage message)
Marks an individual message as read. |
void |
setReadTrackingEnabled(boolean enabled)
Enables or disables the read tracking feature. |
| Methods inherited from interface com.jivesoftware.community.JiveManager |
|---|
destroy, initialize |
| Field Detail |
|---|
static final int DEFAULT_TRACKING_THRESHOLD_DAYS
static final int UNREAD
static final int UPDATED
static final int READ
| Method Detail |
|---|
boolean isReadTrackingEnabled()
void setReadTrackingEnabled(boolean enabled)
throws UnauthorizedException
enabled - true to enable read tracking, false otherwise.
UnauthorizedException - if the user is not a system admin.
int getReadStatus(User user,
ForumThread thread)
user - the user reading the thread.thread - the thread to check read status on.
int getReadStatus(User user,
ForumMessage message)
user - the user reading the message.message - the message to check read status on.
void markRead(User user,
ForumMessage message)
user - the user that read the message.message - the message that should be marked as read.
void markRead(User user,
Community community)
user - the user marking the community as read.community - the community to mark as read.
int getUnreadThreadCount(User user,
Community community)
user - the user to check unread threads for.community - the community to check unread threads in.
JiveIterator<ForumThread> getUnreadThreads(User user,
Community community)
user - the user to check unread threads for.community - the community to check unread threads in.
int getUnreadMessageCount(User user,
Community community)
user - user the user to check unread messages for.community - community the community to check unread messages in.
JiveIterator<ForumMessage> getUnreadMessages(User user,
Community community)
user - user the user to check unread messages for.community - the community to check unread messages in.
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||