Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum
Interface StatusLevel

All Known Implementing Classes:
DbStatusLevel, StatusLevelProxy

public interface StatusLevel

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
 void deleteProperty(java.lang.String name)
          Deletes an extended property.
 java.lang.String getDescription()
          Returns the description of this status level
 Group getGroup()
          The group this status level is associated with.
 long getID()
          Returns the unique id of this status level
 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
 java.lang.String getProperty(java.lang.String name)
          Returns an extended property of the status level.
 java.util.Iterator getPropertyNames()
          Returns an Iterator for the names of the status level properties.
 boolean isInRange(int 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.
 void setProperty(java.lang.String name, java.lang.String value)
          Sets an extended property of the status level.
 

Method Detail

getID

long getID()
Returns the unique id of this status level

Returns:
the unique id of this status level

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

getProperty

java.lang.String getProperty(java.lang.String name)
Returns an extended property of the status level. Each status level can have an arbitrary number of extended properties. This allows for enhanced functionality that is not part of the base interface.

Parameters:
name - the name of the property to get.
Returns:
the value of the property specified by name.

setProperty

void setProperty(java.lang.String name,
                 java.lang.String value)
                 throws UnauthorizedException
Sets an extended property of the status level. Each status level can have an arbitrary number of extended properties. This allows for enhanced functionality that is not part of the base interface.

If the property referenced by name already exists, its value will be updated.

Parameters:
name - the name of the property to set.
value - the new value for the property.
Throws:
UnauthorizedException - if not system admin

deleteProperty

void deleteProperty(java.lang.String name)
                    throws UnauthorizedException
Deletes an extended property. If the property specified by name does not exist, this method will do nothing.

Parameters:
name - the name of the property to delete.
Throws:
UnauthorizedException - if not system admin

getPropertyNames

java.util.Iterator getPropertyNames()
Returns an Iterator for the names of the status level properties.

Returns:
an Iterator for the names of the status level properties.

isInRange

boolean isInRange(int 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

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.