|
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.virusscan.VirusScanManager
public class VirusScanManager
Scans message attachments for viruses. This class communicates with an external virus scanning server using the ICAP protocol. The general logic flow is as follows:
VIRUS_CHECK_MODERATION_VALUE
, which is
below the visible threshold and will prevent the message from being viewed by other users.
VirusScanInterceptor
,
JiveGlobals
Field Summary | |
---|---|
static int |
VIRUS_CHECK_MODERATION_VALUE
The moderation value that messages will be set to (-156) while waiting to be scanned for viruses. |
Method Summary | |
---|---|
void |
addMessageToQueue(ForumMessage message)
Adds message to the virus scan queue. |
void |
destroy()
Notifies the manager to release any resources that may be holding on too. |
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 |
getEmailNotifyList()
Gets the comma-delimited list of email addresses to notify when an attachment is blocked |
java.lang.String |
getEmailSubject(java.util.Locale locale)
Gets the text for the subject of notification emails |
static VirusScanManager |
getInstance()
Provides access to the single VirusScanManager instance |
int |
getQueueSize()
Gets the number of messages in the queue waiting to br virus scanned. |
java.lang.String |
getVirusScannerUri()
The URI of the ICAP server used for virus scanning. |
void |
initialize()
Initialize the manager. |
boolean |
isDebugMode()
Checks if the virus scanner is running in debug mode. |
boolean |
isNotifyUserEnabled()
Checks if notify user has been enabled |
boolean |
isRunning()
Returns true if the server is currently running. |
boolean |
isVirusScanEnabled()
Checks if the virus scanner is enabled |
int |
numberOfMessagesInDB()
Gets the number of messages in the database waiting to be virus scanned. |
void |
setDebugMode(boolean debugMode)
Sets the virus scanner into debug mode. |
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 |
setEmailNotifyList(java.lang.String emailNotifyList)
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 |
setNotifyUserEnabled(boolean notifyUserEnabled)
Sets wheter or not notify user is enabled. |
void |
setVirusScanEnabled(boolean virusScanEnabled)
Sets wheter or not the virus scanner is enabled |
void |
setVirusScannerUri(java.lang.String uri)
Sets the URI of the ICAP server uses for virus scanning. |
void |
start()
Starts the virus scanner. |
void |
stop()
Stops the virus scanner. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int VIRUS_CHECK_MODERATION_VALUE
Method Detail |
---|
public static VirusScanManager getInstance()
public void initialize()
JiveManager
This method is used internally by Jive during application startup and should not be called during normal usage of the class.
initialize
in interface JiveManager
public void destroy()
JiveManager
destroy
in interface JiveManager
public boolean isVirusScanEnabled()
public void setVirusScanEnabled(boolean virusScanEnabled)
virusScanEnabled
- true to enable the virus scanner; false to disablepublic java.lang.String getVirusScannerUri()
public void setVirusScannerUri(java.lang.String uri) throws org.jivesoftware.antivirus.VirusScanException, java.net.URISyntaxException
uri
- the URI of the ICAP server.
org.jivesoftware.antivirus.VirusScanException
- if setting the the URI fails.
java.net.URISyntaxException
- if a malformed ICAP URI.public boolean isNotifyUserEnabled()
public void setNotifyUserEnabled(boolean notifyUserEnabled)
notifyUserEnabled
- true to enable notify user; false otherwisepublic java.lang.String getEmailNotifyList()
public void setEmailNotifyList(java.lang.String emailNotifyList)
emailNotifyList
- the comma-delimited list of email addressespublic java.lang.String getEmailName()
public void setEmailName(java.lang.String emailName)
emailName
- the name that notification emails will appear to be frompublic java.lang.String getEmailAddress()
public void setEmailAddress(java.lang.String emailAddress)
emailAddress
- the email address that notification emails will appear to be frompublic java.lang.String getEmailSubject(java.util.Locale locale)
public void setEmailSubject(java.lang.String emailSubject, java.util.Locale locale)
emailSubject
- the text for the subject of notification emailspublic java.lang.String getEmailBody(java.util.Locale locale)
public void setEmailBody(java.lang.String emailBody, java.util.Locale locale)
emailBody
- the text for the body of the notification emailspublic boolean isDebugMode()
public void setDebugMode(boolean debugMode)
debugMode
- true to put the virus scanner in debug mode; false otherwisepublic int numberOfMessagesInDB()
public int getQueueSize()
public void addMessageToQueue(ForumMessage message) throws java.lang.Exception
message
- the message to add to the virus scan queue
java.lang.Exception
public void start()
public void stop()
public boolean isRunning()
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |