Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.proxy
Class StatusLevelManagerProxy

java.lang.Object
  extended by com.jivesoftware.forum.proxy.StatusLevelManagerProxy
All Implemented Interfaces:
StatusLevelManager

public class StatusLevelManagerProxy
extends java.lang.Object
implements StatusLevelManager


Constructor Summary
StatusLevelManagerProxy(StatusLevelManager statusLevelManager, AuthToken authToken, Permissions permissions)
           
 
Method Summary
 StatusLevel createStatusLevel(java.lang.String name, java.lang.String imagePath, Group group)
          Creates a new group based StatusLevel Level
 StatusLevel createStatusLevel(java.lang.String name, java.lang.String imagePath, int minPoints, int maxPoints)
          Creates a new points based StatusLevel.
 void deleteStatusLevel(StatusLevel statusLevel)
          Deletes a statusLevel level from the system
 java.util.Iterator getGroupStatusLevels()
          Returns an iterator of all group based status levels in the system.
 java.util.Iterator getLeaders()
          Returns an Iterator of system wide leaders.
 java.util.Iterator getLeaders(Forum forum)
          Returns an Iterator of leaders for a specific forum
 java.util.Iterator getLeaders(ForumCategory category)
          Returns an Iterator of leaders for a specific forum category
 java.util.Iterator getLeaders(ForumCategory category, int startIndex, int numResults)
          Returns an Iterator of leaders for a specific forum category
 java.util.Iterator getLeaders(Forum forum, int startIndex, int numResults)
          Returns an Iterator of leaders for a specific forum
 java.util.Iterator getLeaders(int startIndex, int numResults)
          Returns an Iterator of system wide leaders.
 int getPointLevel(User user)
          Returns the point level for a user system wide.
 int getPointLevel(User user, Forum forum)
          Returns the status level points for a user in regards to a specific forum
 int getPointLevel(User user, ForumCategory category)
          Returns the status level points for a user in regards to a specific category
 java.util.Iterator getPointStatusLevels()
          Returns an iterator of point based status levels in the system sorted by point range.
 StatusLevel getStatusLevel(Group group)
          If there is a status level associated with the group passed in then the status level will be returned, Otherwise null will be returned.
 StatusLevel getStatusLevel(long statusLevelID)
          Used to acquire a specific status level object from the system
 StatusLevel getStatusLevel(java.lang.String name)
          Used to acquire a specific status level by its name
 StatusLevel getStatusLevel(User user)
          Returns the system wide status level for specific user, will return null if there is no status level for this user.
 StatusLevel getStatusLevel(User user, Forum forum)
          Returns the status level for a user in a specific forum. if a status level cannot be determined for this user in this forum null will be returned.
 StatusLevel getStatusLevel(User user, ForumCategory category)
          Returns the status level for a user in a specific category. if a status level cannot be determined for this user in this category null will be returned.
 StatusLevel getStatusLevelByPoints(int points)
          Used to get a status level by a point value.
 boolean isStatusLevelsEnabled()
          Returns true if status levels are enabled in the system
 void setStatusLevelsEnabled(boolean statusLevelEnabled)
          Sets whether status levels should be enabled in the system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatusLevelManagerProxy

public StatusLevelManagerProxy(StatusLevelManager statusLevelManager,
                               AuthToken authToken,
                               Permissions permissions)
Method Detail

createStatusLevel

public StatusLevel createStatusLevel(java.lang.String name,
                                     java.lang.String imagePath,
                                     int minPoints,
                                     int maxPoints)
                              throws UnauthorizedException,
                                     StatusLevelException,
                                     StatusLevelAlreadyExistsException
Description copied from interface: StatusLevelManager
Creates a new points based StatusLevel. The minPoints and maxPoints range must not intersect, and maxPoints cannot be zero. Specify -1 in either to denote a boundless range (ie minPoints=50, maxPoints=-1 would mean everything over 50 has this status level)

The minPoints and maxPoints values must not go into the range over another StatusLevel levels point range.

Specified by:
createStatusLevel in interface StatusLevelManager
Parameters:
name - name of the status level
minPoints - minimum amount in the point range
maxPoints - maximum amount in the point range
Returns:
The newly created status level object
Throws:
UnauthorizedException - if not system admin
StatusLevelException - if an illegal range is specified.
StatusLevelAlreadyExistsException

createStatusLevel

public StatusLevel createStatusLevel(java.lang.String name,
                                     java.lang.String imagePath,
                                     Group group)
                              throws UnauthorizedException,
                                     StatusLevelException,
                                     StatusLevelAlreadyExistsException
Description copied from interface: StatusLevelManager
Creates a new group based StatusLevel Level

Specified by:
createStatusLevel in interface StatusLevelManager
Parameters:
name - name of the status level
group - group to associate this status level with
Returns:
newly created status level object
Throws:
UnauthorizedException - if not system admin
StatusLevelException
StatusLevelAlreadyExistsException

deleteStatusLevel

public void deleteStatusLevel(StatusLevel statusLevel)
                       throws UnauthorizedException
Description copied from interface: StatusLevelManager
Deletes a statusLevel level from the system

Specified by:
deleteStatusLevel in interface StatusLevelManager
Parameters:
statusLevel - statusLevel level to delete
Throws:
UnauthorizedException - if not system admin

getGroupStatusLevels

public java.util.Iterator getGroupStatusLevels()
Description copied from interface: StatusLevelManager
Returns an iterator of all group based status levels in the system.

Specified by:
getGroupStatusLevels in interface StatusLevelManager
Returns:
an iterator of all group based status levels in the system.

getPointStatusLevels

public java.util.Iterator getPointStatusLevels()
Description copied from interface: StatusLevelManager
Returns an iterator of point based status levels in the system sorted by point range.

Specified by:
getPointStatusLevels in interface StatusLevelManager
Returns:
point range sorted iterator of StatusLevel objects

getLeaders

public java.util.Iterator getLeaders()
Description copied from interface: StatusLevelManager
Returns an Iterator of system wide leaders.

Specified by:
getLeaders in interface StatusLevelManager
Returns:
Iterator of User objects for system wide leaders

getLeaders

public java.util.Iterator getLeaders(int startIndex,
                                     int numResults)
Description copied from interface: StatusLevelManager
Returns an Iterator of system wide leaders.

Specified by:
getLeaders in interface StatusLevelManager
Returns:
Iterator of User objects for system wide leaders

getLeaders

public java.util.Iterator getLeaders(Forum forum)
Description copied from interface: StatusLevelManager
Returns an Iterator of leaders for a specific forum

Specified by:
getLeaders in interface StatusLevelManager
Parameters:
forum - forum to find leaders for
Returns:
Iterator of User objects for a specific forum

getLeaders

public java.util.Iterator getLeaders(Forum forum,
                                     int startIndex,
                                     int numResults)
Description copied from interface: StatusLevelManager
Returns an Iterator of leaders for a specific forum

Specified by:
getLeaders in interface StatusLevelManager
Parameters:
forum - forum to find leaders for
Returns:
Iterator of User objects for a specific forum

getLeaders

public java.util.Iterator getLeaders(ForumCategory category)
Description copied from interface: StatusLevelManager
Returns an Iterator of leaders for a specific forum category

Specified by:
getLeaders in interface StatusLevelManager
Parameters:
category - forum category to find leaders for
Returns:
Iterator of User objects for a specific forum

getLeaders

public java.util.Iterator getLeaders(ForumCategory category,
                                     int startIndex,
                                     int numResults)
Description copied from interface: StatusLevelManager
Returns an Iterator of leaders for a specific forum category

Specified by:
getLeaders in interface StatusLevelManager
Parameters:
category - forum category to find leaders for
Returns:
Iterator of User objects for a specific forum

getStatusLevel

public StatusLevel getStatusLevel(long statusLevelID)
                           throws StatusLevelNotFoundException
Description copied from interface: StatusLevelManager
Used to acquire a specific status level object from the system

Specified by:
getStatusLevel in interface StatusLevelManager
Parameters:
statusLevelID - the id of the object to acquire
Returns:
the object found in the system
Throws:
StatusLevelNotFoundException - thrown if the object does not exist in the system

getStatusLevel

public StatusLevel getStatusLevel(java.lang.String name)
                           throws StatusLevelNotFoundException
Description copied from interface: StatusLevelManager
Used to acquire a specific status level by its name

Specified by:
getStatusLevel in interface StatusLevelManager
Parameters:
name - name of the status level
Returns:
the object found in the system
Throws:
StatusLevelNotFoundException - thrown if the object does not exist in the system

getStatusLevel

public StatusLevel getStatusLevel(User user)
Description copied from interface: StatusLevelManager
Returns the system wide status level for specific user, will return null if there is no status level for this user.

If the user belongs to a group status level the group status level will always be returned.

Specified by:
getStatusLevel in interface StatusLevelManager
Parameters:
user - user to find the status level for
Returns:
system wide status level for the user or null if no status level

getStatusLevel

public StatusLevel getStatusLevel(User user,
                                  Forum forum)
Description copied from interface: StatusLevelManager
Returns the status level for a user in a specific forum. if a status level cannot be determined for this user in this forum null will be returned.

If the user belongs to a group status level the group status level will always be returned.

Specified by:
getStatusLevel in interface StatusLevelManager
Parameters:
user - user to find the status level for
forum - forum to check the status level for
Returns:
forum specific status level or null if no status level can be determined

getStatusLevel

public StatusLevel getStatusLevel(User user,
                                  ForumCategory category)
Description copied from interface: StatusLevelManager
Returns the status level for a user in a specific category. if a status level cannot be determined for this user in this category null will be returned.

If the user belongs to a group status level the group status level will always be returned.

Specified by:
getStatusLevel in interface StatusLevelManager
Parameters:
user - user to find the status level for
category - category to check the status level for
Returns:
category specific status level or null if no status level can be determined

setStatusLevelsEnabled

public void setStatusLevelsEnabled(boolean statusLevelEnabled)
                            throws UnauthorizedException
Description copied from interface: StatusLevelManager
Sets whether status levels should be enabled in the system.

Specified by:
setStatusLevelsEnabled in interface StatusLevelManager
Parameters:
statusLevelEnabled - true if status levels are enabled, else false
Throws:
UnauthorizedException - if not system admin

isStatusLevelsEnabled

public boolean isStatusLevelsEnabled()
Description copied from interface: StatusLevelManager
Returns true if status levels are enabled in the system

Specified by:
isStatusLevelsEnabled in interface StatusLevelManager
Returns:
true if status levels are enabled

getStatusLevelByPoints

public StatusLevel getStatusLevelByPoints(int points)
Description copied from interface: StatusLevelManager
Used to get a status level by a point value. If the points exceeds that of the maximum status level, the maximum status level will be returned.

Specified by:
getStatusLevelByPoints in interface StatusLevelManager
Parameters:
points - point value find a status level for
Returns:
the StatusLevel matching a point level, or null if non is found

getPointLevel

public int getPointLevel(User user)
Description copied from interface: StatusLevelManager
Returns the point level for a user system wide.

Specified by:
getPointLevel in interface StatusLevelManager
Parameters:
user - user to get status level points for
Returns:
how many status points the user has

getPointLevel

public int getPointLevel(User user,
                         Forum forum)
Description copied from interface: StatusLevelManager
Returns the status level points for a user in regards to a specific forum

Specified by:
getPointLevel in interface StatusLevelManager
Parameters:
user - user user to get status level points for
forum - forum to filter by
Returns:
how many status level points a user has for the particular forum

getPointLevel

public int getPointLevel(User user,
                         ForumCategory category)
Description copied from interface: StatusLevelManager
Returns the status level points for a user in regards to a specific category

Specified by:
getPointLevel in interface StatusLevelManager
Parameters:
user - user user to get status level points for
category - category to filter by
Returns:
how many status level points a user has for the particular category

getStatusLevel

public StatusLevel getStatusLevel(Group group)
Description copied from interface: StatusLevelManager
If there is a status level associated with the group passed in then the status level will be returned, Otherwise null will be returned.

Specified by:
getStatusLevel in interface StatusLevelManager
Parameters:
group - group to find a status level for
Returns:
status level that is associated with group, else null

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.