|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.database.DbStatusLevel
public class DbStatusLevel
Database implementation of status level.
Constructor Summary | |
---|---|
|
DbStatusLevel()
|
protected |
DbStatusLevel(long id)
|
protected |
DbStatusLevel(java.lang.String name)
|
protected |
DbStatusLevel(java.lang.String name,
java.lang.String imagePath,
Group group)
Creates a new group based status level |
protected |
DbStatusLevel(java.lang.String name,
java.lang.String imagePath,
int minPoints,
int maxPoints)
Creates a point based new status level. |
Method Summary | |
---|---|
protected void |
addToCache()
|
protected void |
checkGroup(Group group)
Checks to see if any other group is taken by a status level. |
void |
deleteProperty(java.lang.String name)
Deletes an extended property. |
boolean |
equals(java.lang.Object o)
|
int |
getCachedSize()
Returns the approximate size of the Object in bytes. |
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. |
int |
hashCode()
|
boolean |
isInRange(int value)
Used to check to see if a point value is in the range for this status level |
protected boolean |
isInRange(int value,
StatusLevel statusLevel)
|
void |
readExternal(java.io.DataInput in)
|
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. |
void |
writeExternal(java.io.DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DbStatusLevel()
protected DbStatusLevel(java.lang.String name, java.lang.String imagePath, int minPoints, int maxPoints) throws StatusLevelException
name
- the name of this status level.imagePath
- minPoints
- minimum point range.maxPoints
- maximum point range.
StatusLevelException
- if an invalid point range is passed, or an null name is passed.protected DbStatusLevel(java.lang.String name, java.lang.String imagePath, Group group) throws StatusLevelException
name
- name of the status level.imagePath
- group
- group to associate this status level with.
StatusLevelException
- if the group is already used by another status level,
group is null, or a null name is passed in.protected DbStatusLevel(long id) throws StatusLevelNotFoundException
StatusLevelNotFoundException
protected DbStatusLevel(java.lang.String name) throws StatusLevelNotFoundException
StatusLevelNotFoundException
Method Detail |
---|
public long getID()
StatusLevel
getID
in interface StatusLevel
public void setName(java.lang.String name) throws UnauthorizedException, StatusLevelException
StatusLevel
setName
in interface StatusLevel
name
- the name of this status level
UnauthorizedException
- if not system admin
StatusLevelException
- if you try to set a null namepublic java.lang.String getName()
StatusLevel
getName
in interface StatusLevel
public void setDescription(java.lang.String description) throws UnauthorizedException
StatusLevel
setDescription
in interface StatusLevel
description
- description of this status level
UnauthorizedException
- if not system adminpublic java.lang.String getDescription()
StatusLevel
getDescription
in interface StatusLevel
public void setImagePath(java.lang.String imagePath) throws UnauthorizedException, StatusLevelException
StatusLevel
setImagePath
in interface StatusLevel
imagePath
- the path of the image used for this status level
UnauthorizedException
- if not system admin
StatusLevelException
- if you try to set a null image pathpublic java.lang.String getImagePath()
StatusLevel
getImagePath
in interface StatusLevel
public java.lang.String getLargeImagePath()
getLargeImagePath
in interface StatusLevel
public void setLargeImagePath(java.lang.String largeImagePath) throws UnauthorizedException
setLargeImagePath
in interface StatusLevel
UnauthorizedException
public int getMinPoints()
StatusLevel
getMinPoints
in interface StatusLevel
public int getMaxPoints()
StatusLevel
getMaxPoints
in interface StatusLevel
public void setPointRange(int minPoints, int maxPoints) throws UnauthorizedException, StatusLevelException
StatusLevel
setPointRange
in interface StatusLevel
minPoints
- minimum value for the point rangemaxPoints
- maximmum value for the point range
UnauthorizedException
- UnauthorizedException if not system admin
StatusLevelException
- if an illegal point range is specifiedpublic void setGroup(Group group) throws UnauthorizedException, StatusLevelException
StatusLevel
setGroup
in interface StatusLevel
UnauthorizedException
StatusLevelException
- if there are minPoints or maxPoints values greater
than -1.public Group getGroup()
StatusLevel
getGroup
in interface StatusLevel
public java.lang.String getProperty(java.lang.String name)
StatusLevel
getProperty
in interface StatusLevel
name
- the name of the property to get.
public void setProperty(java.lang.String name, java.lang.String value) throws UnauthorizedException
StatusLevel
If the property referenced by
name
already exists, its
value will be updated.
setProperty
in interface StatusLevel
name
- the name of the property to set.value
- the new value for the property.
UnauthorizedException
- if not system adminpublic void deleteProperty(java.lang.String name) throws UnauthorizedException
StatusLevel
name
does not exist, this method will do nothing.
deleteProperty
in interface StatusLevel
name
- the name of the property to delete.
UnauthorizedException
- if not system adminpublic java.util.Iterator getPropertyNames()
StatusLevel
getPropertyNames
in interface StatusLevel
public int getCachedSize()
Cacheable
getCachedSize
in interface Cacheable
public void readExternal(java.io.DataInput in) throws java.io.IOException
readExternal
in interface com.tangosol.io.ExternalizableLite
java.io.IOException
public void writeExternal(java.io.DataOutput out) throws java.io.IOException
writeExternal
in interface com.tangosol.io.ExternalizableLite
java.io.IOException
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean isInRange(int value)
StatusLevel
isInRange
in interface StatusLevel
value
- point value to check
protected boolean isInRange(int value, StatusLevel statusLevel)
protected void checkGroup(Group group) throws StatusLevelException
StatusLevelException
protected void addToCache()
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |