com.raritantechnologies.searchApp.reporting
Class EMailReporter

java.lang.Object
  extended bycom.raritantechnologies.searchApp.reporting.EMailReporter
All Implemented Interfaces:
IConfigurable, IReporter

public class EMailReporter
extends java.lang.Object
implements IReporter

Base class for reporting job processes that write output to eMail.

XML Configuration Template:
   <Reporter class="com.raritantechnologies.searchApp.reporting.EMailReporter"
                mailType="[ mail mime type ]"
                mailServer="[ mail server URL ]"
                senderAddress="[ from address for email ]"
                emailHeader="[ header text for email ]"
                emailText="[ text of email ]"
                threads="[ number of threads for spooling ]" />
 

Developed by Raritan Technologies .

Author:
Chris Peterson

Constructor Summary
EMailReporter()
           
 
Method Summary
 java.lang.String getConfigurationXML()
           
 java.lang.String getEmailHeader()
           
 java.lang.String getEmailText()
           
 java.lang.String getMailServer()
           
 java.lang.String getMailType()
           
 java.lang.String getSenderAddress()
           
 int getThreads()
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void saveData(java.lang.String data, ILoginInfo userInfo)
          Saves the data.
 void saveData(java.lang.String data, java.lang.String userEmail)
          This is needed for situations (such as Alert processing), where an email address may not be the one that is in the login process, this method allows the email message to be directed to a specific email address.
 void saveFile(java.lang.String emailData)
           
 void setEmailHeader(java.lang.String emailHeader)
           
 void setEmailText(java.lang.String emailText)
           
 void setMailServer(java.lang.String mailServer)
           
 void setMailType(java.lang.String mailType)
           
 void setSenderAddress(java.lang.String senderAddress)
           
 void setThreads(int threads)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EMailReporter

public EMailReporter()
Method Detail

saveFile

public void saveFile(java.lang.String emailData)

saveData

public void saveData(java.lang.String data,
                     ILoginInfo userInfo)
Description copied from interface: IReporter
Saves the data.

Specified by:
saveData in interface IReporter
Parameters:
data - The data to be saved/sent by the reporter.
userInfo - User for whom the data is to be saved.

saveData

public void saveData(java.lang.String data,
                     java.lang.String userEmail)
Description copied from interface: IReporter
This is needed for situations (such as Alert processing), where an email address may not be the one that is in the login process, this method allows the email message to be directed to a specific email address.

Specified by:
saveData in interface IReporter
Parameters:
data - The data to be saved/sent by the reporter.

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IConfigurable

setThreads

public void setThreads(int threads)

getThreads

public int getThreads()

setMailType

public void setMailType(java.lang.String mailType)

getMailType

public java.lang.String getMailType()

setMailServer

public void setMailServer(java.lang.String mailServer)

getMailServer

public java.lang.String getMailServer()

setSenderAddress

public void setSenderAddress(java.lang.String senderAddress)

getSenderAddress

public java.lang.String getSenderAddress()

setEmailHeader

public void setEmailHeader(java.lang.String emailHeader)

getEmailHeader

public java.lang.String getEmailHeader()

setEmailText

public void setEmailText(java.lang.String emailText)

getEmailText

public java.lang.String getEmailText()

getConfigurationXML

public java.lang.String getConfigurationXML()