|
Jive API (3.0.13) 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,
JiveContainer container,
JiveObject object,
long points,
String code)
Rewards points to a user. |
void |
addPoints(User user,
JiveContainer container,
JiveObject jiveObject,
String scenarioCode)
Give points to a user using the specified scenerio code. |
int |
countTimesAwarded(User user,
JiveObject target)
Counts the number of times a user has been awarded against a particular object. |
StatusLevel |
createStatusLevel(String name,
String imagePath,
Group group)
Creates a new group based StatusLevel Level |
StatusLevel |
createStatusLevel(String name,
String imagePath,
int minPoints,
int maxPoints)
Creates a new points based StatusLevel. |
void |
deleteStatusLevel(StatusLevel statusLevel)
Deletes a statusLevel level from the system |
void |
deleteUserStatusLevels(User user)
Deletes all statusLevel levels for a given user from the system. |
Map<JiveContainer,Long> |
getAllPointLevels(User user)
Returns a map of community -> status level points for all the communities the user has points in. |
List<StatusLevelScenario> |
getAllStatusLevelScenarios()
Returns all of the com.jivesoftware.community.StatusLevelScenario objects. |
Iterable<StatusLevel> |
getGroupStatusLevels()
Returns an iterable of all group based status levels in the system. |
Iterable<User> |
getLeaders()
Returns an Iterable of system wide leaders. |
Iterable<User> |
getLeaders(int startIndex,
int numResults)
Returns an Iterable of system wide leaders. |
Iterable<User> |
getLeaders(JiveContainer container)
Returns an Iterable of leaders for a specific container |
Iterable<User> |
getLeaders(JiveContainer container,
int startIndex,
int numResults)
Returns an Iterable of leaders for a specific container |
long |
getPointLevel(User user)
Returns the point level for a user system wide. |
long |
getPointLevel(User user,
JiveContainer container)
Returns the status level points for a user in regards to a specific container |
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(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,
JiveContainer container)
Returns the status level for a user in a specific container. if a status level cannot be determined for this user in this container null will be returned. |
StatusLevel |
getStatusLevelByPoints(long points)
Used to get a status level by a point value. |
StatusLevelScenario |
getStatusLevelScenarioByCode(String code)
Returns a com.jivesoftware.community.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(StatusLevelScenario scenario)
Update the points and whether or not this scenario is included in status level results. |
| Method Detail |
|---|
StatusLevel createStatusLevel(String name,
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(String name,
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 admin
void deleteUserStatusLevels(User user)
throws UnauthorizedException
user - the owner of the statusLevels being deleted.
UnauthorizedException - if not system-admin or user-adminIterable<StatusLevel> getGroupStatusLevels()
Iterable<StatusLevel> getPointStatusLevels()
Iterable<User> getLeaders()
User objects for system wide leaders
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 leadersIterable<User> getLeaders(JiveContainer container)
container -
User objects for a specific forum
Iterable<User> getLeaders(JiveContainer container,
int startIndex,
int numResults)
startIndex - The starting point of the leader results.numResults - The number of results in the iterable.
User objects for a specific forum @param container
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(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,
JiveContainer container)
user - user to find the status level forcontainer - container 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,
JiveContainer container)
user - user user to get status level points forcontainer - container to filter by
Map<JiveContainer,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,
JiveContainer container,
JiveObject object,
long points,
String code)
user - The user who is receiving points.container - The container 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.List<StatusLevelScenario> getAllStatusLevelScenarios()
com.jivesoftware.community.StatusLevelScenario objects.
com.jivesoftware.community.StatusLevelScenario objects.void updateStatusLevelScenario(StatusLevelScenario scenario)
scenario - the points and whether or not this scenario is included in status level results.StatusLevelScenario getStatusLevelScenarioByCode(String code)
com.jivesoftware.community.StatusLevelScenario by its code.
code - The code of the StatusLevelScenario.
void addPoints(User user,
JiveContainer container,
JiveObject jiveObject,
String scenarioCode)
user - The user to award points too.container - The container that the points were awarded in.jiveObject - object points were awarded on.scenarioCode - The scenario code.
int countTimesAwarded(User user,
JiveObject target)
user - target - The object awarded against.
|
Jive Product Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||