|
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 StatusLevelManager
Manages status level feature. StatusLevel levels allow the system to rank users by points or associate users with a specific group.
StatusLevel| Method Summary | |
|---|---|
void |
addPoints(User user,
Community community,
JiveObject object,
long points,
java.lang.String code)
Rewards points to a user. |
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.Map<Community,java.lang.Long> |
getAllPointLevels(User user)
Returns a map of community -> status level points for all the communities the user has points in. |
java.util.List<com.jivesoftware.community.StatusLevelScenario> |
getAllStatusLevelScenarios()
Returns all of the StatusLevelScenario objects. |
java.lang.Iterable<StatusLevel> |
getGroupStatusLevels()
Returns an iterable of all group based status levels in the system. |
java.lang.Iterable<User> |
getLeaders()
Returns an Iterable of system wide leaders. |
java.lang.Iterable<User> |
getLeaders(Community community)
Returns an Iterable of leaders for a specific community |
java.lang.Iterable<User> |
getLeaders(Community community,
int startIndex,
int numResults)
Returns an Iterable of leaders for a specific community |
java.lang.Iterable<User> |
getLeaders(int startIndex,
int numResults)
Returns an Iterable of system wide leaders. |
long |
getPointLevel(User user)
Returns the point level for a user system wide. |
long |
getPointLevel(User user,
Community community)
Returns the status level points for a user in regards to a specific community |
java.lang.Iterable<StatusLevel> |
getPointStatusLevels()
Returns an iterable 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,
Community community)
Returns the status level for a user in a specific community. if a status level cannot be determined for this user in this community null will be returned. |
StatusLevel |
getStatusLevelByPoints(long points)
Used to get a status level by a point value. |
com.jivesoftware.community.StatusLevelScenario |
getStatusLevelScenarioByCode(java.lang.String code)
Returns a StatusLevelScenario by its code. |
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. |
void |
updateStatusLevelScenario(com.jivesoftware.community.StatusLevelScenario scenario)
Update the points and whether or not this scenario is included in status level results. |
| Methods inherited from interface com.jivesoftware.community.JiveManager |
|---|
destroy, initialize |
| Method Detail |
|---|
StatusLevel createStatusLevel(java.lang.String name,
java.lang.String imagePath,
int minPoints,
int maxPoints)
throws UnauthorizedException,
StatusLevelException,
StatusLevelAlreadyExistsException
name - name of the status levelimagePath - The path the image used when displaying this status level.minPoints - minimum amount in the point rangemaxPoints - maximum amount in the point range
UnauthorizedException - if not system admin
StatusLevelException - if an illegal range is specified.
StatusLevelAlreadyExistsException - Thrown if there is a status level already matching these criteria.
StatusLevel createStatusLevel(java.lang.String name,
java.lang.String imagePath,
Group group)
throws UnauthorizedException,
StatusLevelException,
StatusLevelAlreadyExistsException
name - name of the status levelimagePath - The path the image used when displaying this status level.group - group to associate this status level with
UnauthorizedException - if not system admin
StatusLevelException - If this status level cannot be created.
StatusLevelAlreadyExistsException - Thrown if there is a status level already matching these criteria.
void deleteStatusLevel(StatusLevel statusLevel)
throws UnauthorizedException
statusLevel - statusLevel level to delete
UnauthorizedException - if not system adminjava.lang.Iterable<StatusLevel> getGroupStatusLevels()
java.lang.Iterable<StatusLevel> getPointStatusLevels()
java.lang.Iterable<User> getLeaders()
User objects for system wide leaders
java.lang.Iterable<User> getLeaders(int startIndex,
int numResults)
startIndex - The starting point of the results.numResults - The number of results to return in the iterable.
User objects for system wide leadersjava.lang.Iterable<User> getLeaders(Community community)
community - community to find leaders for.
User objects for a specific forum
java.lang.Iterable<User> getLeaders(Community community,
int startIndex,
int numResults)
community - community to find leaders forstartIndex - The starting point of the leader results.numResults - The number of results in the iterable.
User objects for a specific forum
StatusLevel getStatusLevel(long statusLevelID)
throws StatusLevelNotFoundException
statusLevelID - the id of the object to acquire
StatusLevelNotFoundException - thrown if the object does not exist in the system
StatusLevel getStatusLevel(java.lang.String name)
throws StatusLevelNotFoundException
name - name of the status level
StatusLevelNotFoundException - thrown if the object does not exist in the systemStatusLevel getStatusLevel(User user)
user - user to find the status level for
StatusLevel getStatusLevel(User user,
Community community)
user - user to find the status level forcommunity - community to check the status level for
void setStatusLevelsEnabled(boolean statusLevelEnabled)
throws UnauthorizedException
statusLevelEnabled - true if status levels are enabled, else false
UnauthorizedException - if not system adminboolean isStatusLevelsEnabled()
StatusLevel getStatusLevelByPoints(long points)
points - point value find a status level for
long getPointLevel(User user)
user - user to get status level points for
long getPointLevel(User user,
Community community)
user - user user to get status level points forcommunity - community to filter by
java.util.Map<Community,java.lang.Long> getAllPointLevels(User user)
user - user user to get status level points for
StatusLevel getStatusLevel(Group group)
group - group to find a status level for
void addPoints(User user,
Community community,
JiveObject object,
long points,
java.lang.String code)
user - The user who is receiving points.community - The community the points are added to.object - The object the user should receive points on.points - Amount of points to award the user.code - A code explaining why the user is receiving points.java.util.List<com.jivesoftware.community.StatusLevelScenario> getAllStatusLevelScenarios()
StatusLevelScenario objects.
StatusLevelScenario objects.void updateStatusLevelScenario(com.jivesoftware.community.StatusLevelScenario scenario)
scenario - the points and whether or not this scenario is included in status level results.com.jivesoftware.community.StatusLevelScenario getStatusLevelScenarioByCode(java.lang.String code)
StatusLevelScenario by its code.
code - The code of the StatusLevelScenario.
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||