|
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.base.ban.AbstractBanManager
public abstract class AbstractBanManager
An abstract instance to manage the banning of User Accounts and IP Addresses. This class should be extended by projects that wish to provide project specific functionality to the ban model.
Field Summary | |
---|---|
protected BanDAO |
banDAO
|
Fields inherited from interface com.jivesoftware.base.ban.BanManager |
---|
PROPERTY_BANNED_USER_ENABLE, PROPERTY_EMAIL_ADDRESS, PROPERTY_EMAIL_BODY, PROPERTY_EMAIL_NAME, PROPERTY_EMAIL_NOTIFY_ENABLED, PROPERTY_EMAIL_SUBJECT, TYPE_BAN_IP, TYPE_BAN_USER |
Constructor Summary | |
---|---|
AbstractBanManager()
|
Method Summary | |
---|---|
void |
createBan(Ban ban)
Creates a ban entry in the database |
Ban |
getBan(long userID,
BanLevel banLevel)
Gets a Ban Object from the database. |
Ban |
getBan(java.lang.String ipAddress,
BanLevel banLevel)
Gets a Ban Object from the database. |
java.util.List |
getBans()
Gets an unfiltered list of Ban objects from database |
java.util.List |
getBans(BanFilter filter)
Gets a filtered list of Ban objects from the database |
java.lang.String |
getEmailAddress()
Gets the email address that notification emails will appear to be from |
java.lang.String |
getEmailBody(java.util.Locale locale)
Gets the text for the body of the notification emails. |
java.lang.String |
getEmailName()
Gets the name that notification emails will appear to be from |
java.lang.String |
getEmailSubject(java.util.Locale locale)
Gets the text for the subject of notification emails |
boolean |
isBanningEnabled()
Checks if the ban feature is enabled |
boolean |
isEmailNotifyEnabled()
Gets the comma-delimited list of email addresses to notify when a user with with ban level notify posts a message. |
boolean |
isValidIpAddress(java.lang.String ip)
Check that an IP Address is valid. |
protected static void |
populateContext(Ban ban,
java.util.Map context)
|
void |
removeBan(long banID)
Removes a ban entry from the database |
void |
setBanningEnabled(boolean enabled)
Enabled/Disabled Ban feature. |
void |
setEmailAddress(java.lang.String emailAddress)
Sets the email address that notification emails will appear to be from |
void |
setEmailBody(java.lang.String emailBody,
java.util.Locale locale)
Text for the body of of notification emails. |
void |
setEmailName(java.lang.String emailName)
Sets The name that notification emails will appear to be from |
void |
setEmailNotifyEnabled(boolean emailNotifyEnabled)
Sets the list of email addresses to notify when an attachment is blocked |
void |
setEmailSubject(java.lang.String emailSubject,
java.util.Locale locale)
Sets the text for the subject of notification emails |
void |
updateBan(Ban ban)
Updates a ban entry in the database |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.jivesoftware.base.event.UserListener |
---|
userCreated, userDeleted, userModified |
Field Detail |
---|
protected BanDAO banDAO
Constructor Detail |
---|
public AbstractBanManager()
Method Detail |
---|
public void createBan(Ban ban)
BanManager
createBan
in interface BanManager
ban
- the ticket to createpublic void updateBan(Ban ban)
BanManager
updateBan
in interface BanManager
ban
- the ticket to updatepublic void removeBan(long banID)
BanManager
removeBan
in interface BanManager
banID
- the id of the ban to removepublic Ban getBan(long userID, BanLevel banLevel)
BanManager
getBan
in interface BanManager
userID
- userID the ID of the userbanLevel
- the level of the ban
public Ban getBan(java.lang.String ipAddress, BanLevel banLevel)
BanManager
getBan
in interface BanManager
ipAddress
- the IP Address of the banbanLevel
- the level of the ban
public java.util.List getBans()
BanManager
getBans
in interface BanManager
public java.util.List getBans(BanFilter filter)
BanManager
getBans
in interface BanManager
filter
- the BannedUserFilter object
Ban
public boolean isValidIpAddress(java.lang.String ip)
BanManager
isValidIpAddress
in interface BanManager
ip
- the ip address to check
public boolean isBanningEnabled()
BanManager
isBanningEnabled
in interface BanManager
public void setBanningEnabled(boolean enabled)
BanManager
setBanningEnabled
in interface BanManager
enabled
- the boolean value to enable/disable ban users feature.public boolean isEmailNotifyEnabled()
BanManager
isEmailNotifyEnabled
in interface BanManager
public void setEmailNotifyEnabled(boolean emailNotifyEnabled)
BanManager
setEmailNotifyEnabled
in interface BanManager
emailNotifyEnabled
- the comma-delimited list of email addressespublic java.lang.String getEmailName()
BanManager
getEmailName
in interface BanManager
public void setEmailName(java.lang.String emailName)
BanManager
setEmailName
in interface BanManager
emailName
- the name that notification emails will appear to be frompublic java.lang.String getEmailAddress()
BanManager
getEmailAddress
in interface BanManager
public void setEmailAddress(java.lang.String emailAddress)
BanManager
setEmailAddress
in interface BanManager
emailAddress
- the email address that notification emails will appear to be frompublic java.lang.String getEmailSubject(java.util.Locale locale)
BanManager
getEmailSubject
in interface BanManager
locale
- the locale for the subject of notification emails
public void setEmailSubject(java.lang.String emailSubject, java.util.Locale locale)
BanManager
setEmailSubject
in interface BanManager
emailSubject
- the text for the subject of notification emailslocale
- the locale for the subject of notification emailspublic java.lang.String getEmailBody(java.util.Locale locale)
BanManager
getEmailBody
in interface BanManager
locale
- the locale for the body of the notification emails
public void setEmailBody(java.lang.String emailBody, java.util.Locale locale)
BanManager
setEmailBody
in interface BanManager
emailBody
- the text for the body of the notification emailslocale
- the locale for the body of the notification emailsprotected static void populateContext(Ban ban, java.util.Map context)
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |