|
Clearspace API (1.10.14) Web Services Client Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface StatusLevelService
Manages status level feature. StatusLevel levels allow the system to rank users by points or associate users with a specific group.
| Method Summary | |
|---|---|
void |
addPoints(long userID,
long communityID,
long objectID,
int objectType,
long points,
java.lang.String code)
Rewards points to a user. |
StatusLevel |
createStatusLevel(java.lang.String name,
java.lang.String imagePath,
int minPoints,
int maxPoints)
Creates a new points based StatusLevel. |
StatusLevel |
createStatusLevel(java.lang.String name,
java.lang.String imagePath,
long groupID)
Creates a new group based StatusLevel Level |
void |
deleteStatusLevel(long statusLevelID)
Deletes a statusLevel level from the system |
StatusLevelScenario[] |
getAllStatusLevelScenarios()
Returns all of the StatusLevelScenario objects. |
StatusLevel |
getGroupStatusLevel(long groupID)
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[] |
getGroupStatusLevels()
Returns an array of all group based status levels in the system. |
User[] |
getLeaders()
Returns an array of system wide leaders. |
User[] |
getLeaders(int startIndex,
int numResults)
Returns an array of system wide leaders. |
User[] |
getLeaders(long communityID)
Returns an Iterable of leaders for a specific community |
User[] |
getLeaders(long communityID,
int startIndex,
int numResults)
Returns an Iterable of leaders for a specific community |
long |
getPointLevel(long userID)
Returns the point level for a user system wide. |
long |
getPointLevel(long userID,
long communityID)
Returns the status level points for a user in regards to a specific community |
StatusLevel[] |
getPointStatusLevels()
Returns an array of point based status levels in the system sorted by point range. |
StatusLevel |
getStatusLevel(long statusLevelID)
Used to acquire a specific status level object from the system |
StatusLevel |
getStatusLevelByPoints(long points)
Used to get a status level by a point value. |
StatusLevelScenario |
getStatusLevelScenarioByCode(java.lang.String code)
Returns a StatusLevelScenario by its code. |
StatusLevel |
getUserStatusLevel(long userID)
Returns the system wide status level for specific user, will return null if there is no status level for this user. |
boolean |
isStatusLevelsEnabled()
Returns true if status levels are enabled in the system |
void |
setStatusLevelsEnabled(boolean enabled)
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(java.lang.String name,
java.lang.String imagePath,
int minPoints,
int maxPoints)
throws com.jivesoftware.community.StatusLevelAlreadyExistsException,
com.jivesoftware.community.StatusLevelException
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
com.jivesoftware.community.StatusLevelException - if an illegal range is specified.
com.jivesoftware.community.StatusLevelAlreadyExistsException - Thrown if there is a
status level already matching these criteria.
StatusLevel createStatusLevel(java.lang.String name,
java.lang.String imagePath,
long groupID)
throws com.jivesoftware.community.StatusLevelAlreadyExistsException,
com.jivesoftware.community.StatusLevelException,
GroupNotFoundException
name - name of the status levelimagePath - The path the image used when displaying this status level.groupID - ID of the group to associate this status level with
UnauthorizedException - if not system admin
com.jivesoftware.community.StatusLevelException - If this status level cannot be
created.
com.jivesoftware.community.StatusLevelAlreadyExistsException - Thrown if there is a
status level already matching these criteria.
GroupNotFoundException - If the specified group is not found.
void deleteStatusLevel(long statusLevelID)
throws com.jivesoftware.community.StatusLevelNotFoundException
statusLevelID - ID of the statusLevel level to delete
UnauthorizedException - if not system admin
com.jivesoftware.community.StatusLevelNotFoundException - If the id of the specified
status level does not exist.StatusLevel[] getGroupStatusLevels()
StatusLevel[] getPointStatusLevels()
User[] getLeaders()
User objects for system wide leaders
User[] getLeaders(int startIndex,
int numResults)
startIndex - The starting point of the results.numResults - The number of results to return in the array.
User objects for system wide leaders
User[] getLeaders(long communityID)
throws CommunityNotFoundException
communityID - ID of the community to find leaders for.
User objects for a specific forum
CommunityNotFoundException - Thrown if the community with
the specified id does not exist.
User[] getLeaders(long communityID,
int startIndex,
int numResults)
throws CommunityNotFoundException
communityID - ID of the community to find leaders forstartIndex - The starting point of the leader results.numResults - The number of results in the array.
User objects for a specific forum
CommunityNotFoundException - Thrown if the community with
the specified id does not exist.
StatusLevel getStatusLevel(long statusLevelID)
throws com.jivesoftware.community.StatusLevelNotFoundException
statusLevelID - the id of the object to acquire
com.jivesoftware.community.StatusLevelNotFoundException - thrown if the object does not exist in the system
StatusLevel getUserStatusLevel(long userID)
throws UserNotFoundException
userID - IDof the user to find the status level for
UserNotFoundException - Thrown if the user with the specified
id does not exist.void setStatusLevelsEnabled(boolean enabled)
enabled - 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(long userID)
throws UserNotFoundException
userID - ID of the user to get status level points for
UserNotFoundException - Thrown if the user with the specified
id does not exist.
long getPointLevel(long userID,
long communityID)
throws UserNotFoundException,
CommunityNotFoundException
userID - ID of the user to get status level points forcommunityID - ID of the community to filter by
CommunityNotFoundException - Thrown if the Community
with the specified id does not exist.
UserNotFoundException - Thrown if the user with the specified
id does not exist.
StatusLevel getGroupStatusLevel(long groupID)
throws GroupNotFoundException
groupID - ID of the group to find a status level for
GroupNotFoundException - Thrown if the group with the specified
id does not exist.
void addPoints(long userID,
long communityID,
long objectID,
int objectType,
long points,
java.lang.String code)
throws com.jivesoftware.community.NotFoundException
userID - The ID of the user who is receiving points.communityID - The ID of the community the points are added to.objectID - The ID of 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.objectType - The objectType of the object to add points for.
com.jivesoftware.community.NotFoundException - Thrown if one of the ids for the
specified object does not exist.StatusLevelScenario[] getAllStatusLevelScenarios()
StatusLevelScenario objects.
StatusLevelScenario objects.void updateStatusLevelScenario(StatusLevelScenario scenario)
scenario - the points and whether or not this scenario is included in status level results.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 | |||||||||