com.raritantechnologies.searchApp.alert
Class AlertPageGenerator

java.lang.Object
  extended bycom.raritantechnologies.searchApp.alert.AlertPageGenerator
All Implemented Interfaces:
IAlertProcessor, IConfigurable, IJobProcess

public class AlertPageGenerator
extends java.lang.Object
implements IJobProcess, IAlertProcessor

Job Process that generates an Alert page.

XML Configuration Template:
  <JobProcess class="com.raritantechnologies.searchApp.alert.AlertPageGenerator"
                 queryReaderName="[ name of QueryResultSetReader ]"
                 alertResultSize="[ max number of records in alert ]"
                 alertPeriod="[ alert interval ]" >

    <AlertFormatter formatterClass="[ class of com.raritantechnologies.searchApp.alert.IAlertFormatter ]" >

    </AlertFormatter>

    <!-- Reporter - outputs the alert in some fashion (e.g. send email, cache) etc. -->
    <Reporter reporterClass="[ class of com.raritantechnologies.searchApp.reporting.IReporter ]" >

    </Reporter>

  </JobProcess>
 

Developed by Raritan Technologies .

Author:
Chris Peterson

Constructor Summary
AlertPageGenerator()
           
 
Method Summary
 void executeJob(RaritanPageContext rpc)
           
 void executeJob(java.lang.String[] args)
          Use IUserInfoReader to get a set of Users.
 java.lang.String getAlertPage(ILoginInfo userInfo)
           
 java.lang.String getConfigurationXML()
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 java.lang.String processAlerts(ILoginInfo userInfo, QueryResultBeanSet queries, DateSearchField fromDate, DateSearchField toDate)
          process the alerts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlertPageGenerator

public AlertPageGenerator()
Method Detail

executeJob

public void executeJob(RaritanPageContext rpc)
Specified by:
executeJob in interface IJobProcess

executeJob

public void executeJob(java.lang.String[] args)
Use IUserInfoReader to get a set of Users. For each user, get a set of alerts.

Specified by:
executeJob in interface IJobProcess

getAlertPage

public java.lang.String getAlertPage(ILoginInfo userInfo)

processAlerts

public java.lang.String processAlerts(ILoginInfo userInfo,
                                      QueryResultBeanSet queries,
                                      DateSearchField fromDate,
                                      DateSearchField toDate)
Description copied from interface: IAlertProcessor
process the alerts.

Specified by:
processAlerts in interface IAlertProcessor
Parameters:
userInfo - User that owns the alert.
queries - Set of user queries.
fromDate - date for earliest result
toDate - latest date for alert result
Returns:
formatted page of alert results.

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 IJobProcess

getConfigurationXML

public java.lang.String getConfigurationXML()
Specified by:
getConfigurationXML in interface IJobProcess