com.raritantechnologies.searchApp.reporting
Class TopResultReporter

java.lang.Object
  extended bycom.raritantechnologies.searchApp.reporting.TopResultReporter
All Implemented Interfaces:
IConfigurable, IJobProcess, IReportingProcess

public class TopResultReporter
extends java.lang.Object
implements IReportingProcess

Builds a sorted list of the "top" results by executing pre-configured query against some SearchSource.

XML Configuration Template:
    <JobProcess processClass="com.raritantechnologies.searchApp.reporting.TopResultReporter"
                   numberOfRows="10" 
                   sortBy="QUERIES"
                   outputFileLocation="[ some path to put file]"
                   outputFileFormat="HTML_PAGE/HTML_TABLE/TEXT/XML"
                   sourceName="[search source name]"
                   userName="[search source valid username]"
                   password="[password valid for search source]"
                   tableAttributes="border='0' cellspacing='0' cellpadding='0'" >

        <Query>
          <Field ID="[a search field]" value="[value to search]" />
          <Field ID="[another field]" value="[value to search]" />
        </Query>

       <ResultRenderer rendererClass="[ an RTI IResultRenderer class . . .]" >
         <!-- information needed by Result Renderer class . . . -->
       </ResultRenderer>

       <!-- Alternatively, can use an IDisplayFormRenderer to generate the report -->
       <DisplayFormRenderer class="[ class of com.raritantechnologies.searchApp.taglibrary.IDisplayFormRenderer ]" >
         <!-- information needed by DisplayFormRenderer class . . . -->
       </DisplayFormRenderer>

   </JobProcess>
  

Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
TopResultReporter()
           
TopResultReporter(java.lang.String outputFormat, java.lang.String tableAttributes, IReporter reporter)
           
 
Method Summary
 void executeJob(RaritanPageContext rpc)
           
 void executeJob(java.lang.String[] args)
           
 void executeJob(java.lang.String sessionID, IReporter reporter, SourceLoginInfo[] sources, OrderedMap searchParams, java.lang.String[] args)
           
 java.lang.String getConfigurationXML()
           
 IReporter getReporter()
          returns the IReporter used by this reporting process.
 SourceLoginInfo[] getSearchSources()
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void setReporter(IReporter reporter)
          sets the Reporter to use for data output handling.
 void setSearchParams(OrderedMap searchParams)
           
 void setSearchSources(SourceLoginInfo[] sources)
           
 void setSessionID(java.lang.String sessionID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TopResultReporter

public TopResultReporter()

TopResultReporter

public TopResultReporter(java.lang.String outputFormat,
                         java.lang.String tableAttributes,
                         IReporter reporter)
Method Detail

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

executeJob

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

executeJob

public void executeJob(java.lang.String[] args)
Specified by:
executeJob in interface IJobProcess

executeJob

public void executeJob(java.lang.String sessionID,
                       IReporter reporter,
                       SourceLoginInfo[] sources,
                       OrderedMap searchParams,
                       java.lang.String[] args)
Specified by:
executeJob in interface IReportingProcess

setReporter

public void setReporter(IReporter reporter)
Description copied from interface: IReportingProcess
sets the Reporter to use for data output handling.

Specified by:
setReporter in interface IReportingProcess
Parameters:
reporter - The IReporter object that will handle data saving etc.

getReporter

public IReporter getReporter()
Description copied from interface: IReportingProcess
returns the IReporter used by this reporting process.

Specified by:
getReporter in interface IReportingProcess

setSearchSources

public void setSearchSources(SourceLoginInfo[] sources)
Specified by:
setSearchSources in interface IReportingProcess

getSearchSources

public SourceLoginInfo[] getSearchSources()
Specified by:
getSearchSources in interface IReportingProcess

setSearchParams

public void setSearchParams(OrderedMap searchParams)
Specified by:
setSearchParams in interface IReportingProcess

setSessionID

public void setSessionID(java.lang.String sessionID)
Specified by:
setSessionID in interface IReportingProcess

getConfigurationXML

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