|
Jive API (3.0.13) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.community.Ban
public class Ban
Represents a ban object. Both user accounts and IP addresses can be banned at a specific BanLevel.
Bans can be permanent or have a specific expiration date. The administrator who created the ban will be stored
as well as an optional comment explaining the reason for the ban.
BanLevel,
Serialized Form| Constructor Summary | |
|---|---|
Ban(long ID,
int banType)
Creates a new Ban object with the specified ban ID and ban type |
|
Ban(long bannedUserID,
long adminID,
int banLevel,
Date expirationDate,
String comment)
Creates a new Ban object for a user. |
|
Ban(String ipAddress,
long adminID,
int banLevel,
Date expirationDate,
String comment)
Creates a new Ban object for an IP address. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
long |
getAdminID()
Gets the admin user that created this ban object. |
int |
getBanLevel()
Gets the BanLevel for this ban. |
long |
getBannedUserID()
Gets the banned user id. |
int |
getBanType()
Returns BanManager.TYPE_BAN_USER for a user ban or BanManager.TYPE_BAN_IP for an IP address ban. |
int |
getCachedSize()
|
String |
getComment()
Gets a comment for this ban object. |
Date |
getCreationDate()
Gets the date this ban object was created. |
Date |
getExpirationDate()
Gets the date this ban object will expire, or null if it is a permanent ban object. |
long |
getID()
Returns the unique ID that represents this ban object. |
String |
getIpAddress()
Gets the IP address that is banned. |
int |
getObjectType()
Return the BAN object type. |
int |
hashCode()
|
void |
readExternal(DataInput in)
|
void |
setAdminID(long adminID)
Sets the admin user id that created this ban object. |
void |
setBanLevel(int banLevel)
Sets the BanLevel for this ban. |
void |
setBannedUserID(long bannedUserID)
Sets the banned user. |
void |
setComment(String comment)
Sets a comment on this ban object. |
void |
setCreationDate(Date creationDate)
Sets the date this ban object was created. |
void |
setExpirationDate(Date expirationDate)
Sets the date this ban object will expire, or null if it is a permanent ban object. |
void |
setID(long ID)
Set the ID for this ban object. |
void |
setIpAddress(String ipAddress)
Sets the IP address to ban. |
String |
toString()
|
void |
writeExternal(DataOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Ban(long ID,
int banType)
ID - the unique ID that represents this ban objectbanType - the type of the ban, either BanManager.TYPE_BAN_USER or BanManager.TYPE_BAN_IP
public Ban(long bannedUserID,
long adminID,
int banLevel,
Date expirationDate,
String comment)
bannedUserID - the user id to banadminID - the user id that created the banbanLevel - the BanLevelexpirationDate - the date the ban expires, or null for a permanent bancomment - the comment explaining why the ban was created
public Ban(String ipAddress,
long adminID,
int banLevel,
Date expirationDate,
String comment)
ipAddress - the ip address to ban. A '*' can be used to denote all addresses, ex. 127.0.0.*adminID - the user id that created the banbanLevel - the BanLevelexpirationDate - the date the ban expires, or null for a permanent bancomment - the comment explaining why the ban was created| Method Detail |
|---|
public long getID()
getID in interface JiveObjectpublic void setID(long ID)
ID - the ID for this ban object.public int getObjectType()
getObjectType in interface JiveObjectpublic int getBanType()
BanManager.TYPE_BAN_USER for a user ban or BanManager.TYPE_BAN_IP for an IP address ban.
BanManager.TYPE_BAN_USER for a user ban or BanManager.TYPE_BAN_IP for an IP address ban.public void setBannedUserID(long bannedUserID)
bannedUserID - the banned userpublic long getBannedUserID()
public void setIpAddress(String ipAddress)
ipAddress - the IP address that is banned.public String getIpAddress()
public void setAdminID(long adminID)
adminID - the admin user that created this banpublic long getAdminID()
public void setBanLevel(int banLevel)
BanLevel for this ban.
banLevel - the BanLevel for this ban.public int getBanLevel()
BanLevel for this ban.
BanLevel for this ban.public void setCreationDate(Date creationDate)
creationDate - the date this ban object was created.public Date getCreationDate()
public void setExpirationDate(Date expirationDate)
expirationDate - the date this ban object will expire, or null if it is permanentpublic Date getExpirationDate()
public void setComment(String comment)
comment - the comment for this ban.public String getComment()
public int getCachedSize()
public void readExternal(DataInput in)
throws IOException
IOException
public void writeExternal(DataOutput out)
throws IOException
IOExceptionpublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
Jive Product Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||