Clearspace API (1.7.0) Core Javadocs

com.jivesoftware.community
Interface StatusLevel

All Superinterfaces:
JiveObject

public interface StatusLevel
extends JiveObject

Represents a status Level in the system.

If there is a group specified for this instance, then it is a group based status level, else there should be valid minPoints and maxPoints values.


Method Summary
 java.lang.String getDescription()
          Returns the description of this status level
 Group getGroup()
          The group this status level is associated with.
 java.lang.String getImagePath()
          Returns the relative path to the image.
 java.lang.String getLargeImagePath()
           
 int getMaxPoints()
          Returns the maximum value for a status level point range. -1 means unbounded (unless there is a group specified)
 int getMinPoints()
          Returns the minimum value for a status level point range. -1 means unbounded (unless there is a group specified)
 java.lang.String getName()
          Returns the name of this status level
 boolean isInRange(long pointValue)
          Used to check to see if a point value is in the range for this status level
 void setDescription(java.lang.String description)
          Sets the description of this status level
 void setGroup(Group group)
          The group this status level is associated with.
 void setImagePath(java.lang.String imagePath)
          Sets the path of the image used for this status level.
 void setLargeImagePath(java.lang.String largeImagePath)
           
 void setName(java.lang.String name)
          Sets the name of this status level
 void setPointRange(int minPoints, int maxPoints)
          Sets a point range for this status level, if this status level was group based before it will now be point based.
 
Methods inherited from interface com.jivesoftware.community.JiveObject
getID, getObjectType
 

Method Detail

setName

void setName(java.lang.String name)
             throws UnauthorizedException,
                    StatusLevelException
Sets the name of this status level

Parameters:
name - the name of this status level
Throws:
UnauthorizedException - if not system admin
StatusLevelException - if you try to set a null name

getName

java.lang.String getName()
Returns the name of this status level

Returns:
the name of this status level

setDescription

void setDescription(java.lang.String description)
                    throws UnauthorizedException
Sets the description of this status level

Parameters:
description - description of this status level
Throws:
UnauthorizedException - if not system admin

getDescription

java.lang.String getDescription()
Returns the description of this status level

Returns:
the description of this status level

setImagePath

void setImagePath(java.lang.String imagePath)
                  throws UnauthorizedException,
                         StatusLevelException
Sets the path of the image used for this status level. This should be a relative path.

Parameters:
imagePath - the path of the image used for this status level
Throws:
UnauthorizedException - if not system admin
StatusLevelException - if you try to set a null image path

getImagePath

java.lang.String getImagePath()
Returns the relative path to the image.

Returns:
the relative path to the image.

getLargeImagePath

java.lang.String getLargeImagePath()

setLargeImagePath

void setLargeImagePath(java.lang.String largeImagePath)
                       throws UnauthorizedException
Throws:
UnauthorizedException

getMinPoints

int getMinPoints()
Returns the minimum value for a status level point range. -1 means unbounded (unless there is a group specified)

Returns:
the minimum value for a status level point range.

getMaxPoints

int getMaxPoints()
Returns the maximum value for a status level point range. -1 means unbounded (unless there is a group specified)

Returns:
the maximum value for a status level point range.

setGroup

void setGroup(Group group)
              throws UnauthorizedException,
                     StatusLevelException
The group this status level is associated with. If a group is set this means that this status level is group based.

Calling this method will set minPoints and maxPoints = -1 (disabling the point based system)

If you decide to set this status level to be point based, first set this method to null then set the min and max values.

Parameters:
group -
Throws:
UnauthorizedException
StatusLevelException - if there are minPoints or maxPoints values greater than -1.

getGroup

Group getGroup()
The group this status level is associated with. This will return null if the status level is point based.

Returns:
group this status level is associated with, null if point based

isInRange

boolean isInRange(long pointValue)
Used to check to see if a point value is in the range for this status level

Parameters:
pointValue - point value to check
Returns:
true if pointValue is in the status level's range

setPointRange

void setPointRange(int minPoints,
                   int maxPoints)
                   throws UnauthorizedException,
                          StatusLevelException
Sets a point range for this status level, if this status level was group based before it will now be point based.

Setting maxPoints to a negative number means unbounded, minPoints must be 0 or greater.

minPoints value cannot be greater than the maxPoints value, though they can be the same.

Parameters:
minPoints - minimum value for the point range
maxPoints - maximmum value for the point range
Throws:
UnauthorizedException - UnauthorizedException if not system admin
StatusLevelException - if an illegal point range is specified

Clearspace Project Page

Copyright © 1999-2007 Jive Software.