|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.database.DbReadTracker
public class DbReadTracker
Database implementation of the ReadTracker interface.
Nested Class Summary | |
---|---|
static class |
DbReadTracker.ReadTrackerKey
|
static class |
DbReadTracker.UserReadTracker
Tracks the read status of threads and messages for a user. |
Field Summary | |
---|---|
static java.lang.String |
DELETE_OLD_ENTRIES
|
static java.lang.String |
DELETE_OLD_MESSAGES_IN_FORUM
|
static java.lang.String |
DELETE_OLD_OBJECT_IN_FORUM
|
static java.lang.String |
DELETE_OLD_THREADS_IN_FORUM
|
static java.lang.String |
GET_FORUM_OBJECTS
|
static java.lang.String |
GET_MESSAGE_OBJECTS
|
static java.lang.String |
GET_THREAD_OBJECTS
|
static java.lang.String |
INSERT_OBJECT_READ
|
static java.lang.String |
SELECT_OLD_MESSAGES_IN_FORUM
|
static java.lang.String |
SELECT_OLD_THREADS_IN_FORUM
|
static java.lang.String |
UPDATE_OBJECT_READ
|
Fields inherited from interface com.jivesoftware.forum.ReadTracker |
---|
READ, UNREAD, UPDATED |
Method Summary | |
---|---|
void |
destroy()
Notifies the manager to release any resources that may be holding on too. |
static DbReadTracker |
getInstance()
Returns a Singleton instance of DbReadTracker. |
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. |
static long |
getTimeWindow()
The time window defines which content can participate in read tracking. |
int |
getUnreadMessageCount(User user,
Forum forum)
Returns the count of unread messages that the user has in the forum. |
int |
getUnreadMessageCount(User user,
ForumCategory category)
Returns the count of unread messages that the user has in the category. |
java.util.Iterator |
getUnreadMessages(User user,
Forum forum)
Returns an iterator for the unread messages in the forum. |
java.util.Iterator |
getUnreadMessages(User user,
ForumCategory category)
Returns an iterator for the unread messages in the category. |
int |
getUnreadThreadCount(User user,
Forum forum)
Returns the count of unread threads that the user has in the forum. |
int |
getUnreadThreadCount(User user,
ForumCategory category)
Returns the count of unread threads that the user has in the category. |
java.util.Iterator |
getUnreadThreads(User user,
Forum forum)
Returns an iterator for the unread threads in the forum. |
java.util.Iterator |
getUnreadThreads(User user,
ForumCategory category)
Returns an iterator for the unread threads in the category. |
void |
initialize()
Initialize the manager. |
boolean |
isReadTrackingEnabled()
Returns true if read tracking is enabled, false otherwise. |
void |
markRead(User user,
Forum forum)
Marks an entire forum as read up until the current instant in time. |
void |
markRead(User user,
ForumCategory category)
Marks an entire category 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 class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String GET_FORUM_OBJECTS
public static final java.lang.String GET_THREAD_OBJECTS
public static final java.lang.String GET_MESSAGE_OBJECTS
public static final java.lang.String INSERT_OBJECT_READ
public static final java.lang.String UPDATE_OBJECT_READ
public static final java.lang.String DELETE_OLD_ENTRIES
public static final java.lang.String DELETE_OLD_THREADS_IN_FORUM
public static final java.lang.String DELETE_OLD_MESSAGES_IN_FORUM
public static final java.lang.String SELECT_OLD_THREADS_IN_FORUM
public static final java.lang.String SELECT_OLD_MESSAGES_IN_FORUM
public static final java.lang.String DELETE_OLD_OBJECT_IN_FORUM
Method Detail |
---|
public static DbReadTracker getInstance()
public void initialize()
JiveManager
This method is used internally by Jive during application startup and should not be called during normal usage of the class.
initialize
in interface JiveManager
public void destroy()
JiveManager
destroy
in interface JiveManager
public boolean isReadTrackingEnabled()
ReadTracker
isReadTrackingEnabled
in interface ReadTracker
public void setReadTrackingEnabled(boolean enabled)
ReadTracker
setReadTrackingEnabled
in interface ReadTracker
enabled
- true to enable read tracking, false otherwise.public static long getTimeWindow()
public int getReadStatus(User user, ForumThread thread)
ReadTracker
getReadStatus
in interface ReadTracker
user
- the user reading the thread.thread
- the thread to check read status on.
public int getReadStatus(User user, ForumMessage message)
ReadTracker
getReadStatus
in interface ReadTracker
user
- the user reading the message.message
- the message to check read status on.
public void markRead(User user, ForumMessage message)
ReadTracker
markRead
in interface ReadTracker
user
- the user that read the message.message
- the message that should be marked as read.public void markRead(User user, Forum forum)
ReadTracker
markRead
in interface ReadTracker
user
- the user marking the forum as read.forum
- the forum to mark as read.public void markRead(User user, ForumCategory category)
ReadTracker
markRead
in interface ReadTracker
user
- the user marking the forum as read.category
- the category to mark as read.public int getUnreadThreadCount(User user, Forum forum)
ReadTracker
getUnreadThreadCount
in interface ReadTracker
user
- the user to check unread threads for.forum
- the forum to check unread threads in.
public int getUnreadThreadCount(User user, ForumCategory category)
ReadTracker
getUnreadThreadCount
in interface ReadTracker
user
- the user to check unread threads for.category
- the category to check unread threads in.
public java.util.Iterator getUnreadThreads(User user, Forum forum)
ReadTracker
getUnreadThreads
in interface ReadTracker
user
- the user to check unread threads for.forum
- the forum to check unread threads in.
public java.util.Iterator getUnreadThreads(User user, ForumCategory category)
ReadTracker
getUnreadThreads
in interface ReadTracker
user
- the user to check unread threads for.category
- the category to check unread threads in.
public int getUnreadMessageCount(User user, Forum forum)
ReadTracker
getUnreadMessageCount
in interface ReadTracker
user
- user the user to check unread messages for.forum
- forum the forum to check unread messages in.
public int getUnreadMessageCount(User user, ForumCategory category)
ReadTracker
getUnreadMessageCount
in interface ReadTracker
user
- user the user to check unread messages for.category
- category the forum to check unread messages in.
public java.util.Iterator getUnreadMessages(User user, Forum forum)
ReadTracker
getUnreadMessages
in interface ReadTracker
user
- user the user to check unread messages for.forum
- forum the forum to check unread messages in.
public java.util.Iterator getUnreadMessages(User user, ForumCategory category)
ReadTracker
getUnreadMessages
in interface ReadTracker
user
- user the user to check unread messages for.category
- forum the category to check unread messages in.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |