Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.proxy
Class ReadTrackerProxy

java.lang.Object
  extended by com.jivesoftware.forum.proxy.ReadTrackerProxy
All Implemented Interfaces:
ReadTracker

public class ReadTrackerProxy
extends java.lang.Object
implements ReadTracker

Protection proxy for ReadTracker instances.


Field Summary
 
Fields inherited from interface com.jivesoftware.forum.ReadTracker
READ, UNREAD, UPDATED
 
Constructor Summary
ReadTrackerProxy(ReadTracker readTracker, AuthToken authToken, Permissions permissions)
          Creates a new ForumProxy object.
 
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, 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.
 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
 

Constructor Detail

ReadTrackerProxy

public ReadTrackerProxy(ReadTracker readTracker,
                        AuthToken authToken,
                        Permissions permissions)
Creates a new ForumProxy object.

Parameters:
readTracker - the read tracker to protect by proxy
authToken - the user's auth token
permissions - the permissions to use with this proxy.
Method Detail

isReadTrackingEnabled

public boolean isReadTrackingEnabled()
Description copied from interface: ReadTracker
Returns true if read tracking is enabled, false otherwise.

Specified by:
isReadTrackingEnabled in interface ReadTracker
Returns:
true if read tracking is enabled, false otherwise.

setReadTrackingEnabled

public void setReadTrackingEnabled(boolean enabled)
                            throws UnauthorizedException
Description copied from interface: ReadTracker
Enables or disables the read tracking feature.

Specified by:
setReadTrackingEnabled in interface ReadTracker
Parameters:
enabled - true to enable read tracking, false otherwise.
Throws:
UnauthorizedException - if the user is not a system admin.

getReadStatus

public int getReadStatus(User user,
                         ForumThread thread)
Description copied from interface: ReadTracker
Returns the read status on the specified thread.

Specified by:
getReadStatus in interface ReadTracker
Parameters:
user - the user reading the thread.
thread - the thread to check read status on.
Returns:
the read status of the thread.

getReadStatus

public int getReadStatus(User user,
                         ForumMessage message)
Description copied from interface: ReadTracker
Returns the read status on the specified message.

Specified by:
getReadStatus in interface ReadTracker
Parameters:
user - the user reading the message.
message - the message to check read status on.
Returns:
the read status of the message.

markRead

public void markRead(User user,
                     ForumMessage message)
Description copied from interface: ReadTracker
Marks an individual message as read. This will automatically update the read status of the message's thread.

Specified by:
markRead in interface ReadTracker
Parameters:
user - the user that read the message.
message - the message that should be marked as read.

markRead

public void markRead(User user,
                     Forum forum)
Description copied from interface: ReadTracker
Marks an entire forum as read up until the current instant in time. This method is useful if a user wants to "catch up"

Specified by:
markRead in interface ReadTracker
Parameters:
user - the user marking the forum as read.
forum - the forum to mark as read.

markRead

public void markRead(User user,
                     ForumCategory category)
Description copied from interface: ReadTracker
Marks an entire category as read up until the current instant in time. This method is useful if a user wants to "catch up"

Specified by:
markRead in interface ReadTracker
Parameters:
user - the user marking the forum as read.
category - the category to mark as read.

getUnreadThreadCount

public int getUnreadThreadCount(User user,
                                Forum forum)
Description copied from interface: ReadTracker
Returns the count of unread threads that the user has in the forum. Threads with a status of UPDATED count as unread for the purposes of this method.

Specified by:
getUnreadThreadCount in interface ReadTracker
Parameters:
user - the user to check unread threads for.
forum - the forum to check unread threads in.
Returns:
the number of unread threads in the forum.

getUnreadThreadCount

public int getUnreadThreadCount(User user,
                                ForumCategory category)
Description copied from interface: ReadTracker
Returns the count of unread threads that the user has in the category. Threads with a status of UPDATED count as unread for the purposes of this method.

Specified by:
getUnreadThreadCount in interface ReadTracker
Parameters:
user - the user to check unread threads for.
category - the category to check unread threads in.
Returns:
the number of unread threads in the category.

getUnreadThreads

public java.util.Iterator getUnreadThreads(User user,
                                           Forum forum)
Description copied from interface: ReadTracker
Returns an iterator for the unread threads in the forum. Threads with a status of UPDATED count as unread for the purposes of this method.

Specified by:
getUnreadThreads in interface ReadTracker
Parameters:
user - the user to check unread threads for.
forum - the forum to check unread threads in.
Returns:
an iterator for the unread threads in the forum.

getUnreadThreads

public java.util.Iterator getUnreadThreads(User user,
                                           ForumCategory category)
Description copied from interface: ReadTracker
Returns an iterator for the unread threads in the category. Threads with a status of UPDATED count as unread for the purposes of this method.

Specified by:
getUnreadThreads in interface ReadTracker
Parameters:
user - the user to check unread threads for.
category - the category to check unread threads in.
Returns:
an iterator for the unread threads in the category.

getUnreadMessageCount

public int getUnreadMessageCount(User user,
                                 Forum forum)
Description copied from interface: ReadTracker
Returns the count of unread messages that the user has in the forum. Messages with a status of UPDATED count as unread for the purposes of this method.

Specified by:
getUnreadMessageCount in interface ReadTracker
Parameters:
user - user the user to check unread messages for.
forum - forum the forum to check unread messages in.
Returns:
the number of unread messages in the forum.

getUnreadMessageCount

public int getUnreadMessageCount(User user,
                                 ForumCategory category)
Description copied from interface: ReadTracker
Returns the count of unread messages that the user has in the category. Messages with a status of UPDATED count as unread for the purposes of this method.

Specified by:
getUnreadMessageCount in interface ReadTracker
Parameters:
user - user the user to check unread messages for.
category - category the forum to check unread messages in.
Returns:
the number of unread messages in the category.

getUnreadMessages

public java.util.Iterator getUnreadMessages(User user,
                                            Forum forum)
Description copied from interface: ReadTracker
Returns an iterator for the unread messages in the forum. Messages with a status of UPDATED count as unread for the purposes of this method.

Specified by:
getUnreadMessages in interface ReadTracker
Parameters:
user - user the user to check unread messages for.
forum - forum the forum to check unread messages in.
Returns:
an iterator for the unread messages in the forum.

getUnreadMessages

public java.util.Iterator getUnreadMessages(User user,
                                            ForumCategory category)
Description copied from interface: ReadTracker
Returns an iterator for the unread messages in the category. Messages with a status of UPDATED count as unread for the purposes of this method.

Specified by:
getUnreadMessages in interface ReadTracker
Parameters:
user - user the user to check unread messages for.
category - forum the category to check unread messages in.
Returns:
an iterator for the unread messages in the category.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.