com.raritantechnologies.federated.eRoom
Class ERoomBuildProcess

java.lang.Object
  extended bycom.raritantechnologies.federated.eRoom.ERoomBuildProcess
All Implemented Interfaces:
IConfigurable, IJobProcess, IJobProcessListener

public class ERoomBuildProcess
extends java.lang.Object
implements IJobProcess, IJobProcessListener

Manages a recurring eRoom Collection build process. Uses a repository (IGatewayOutputProcessor) to store eRoom / collection mapping and update logs.

When the ERoomBuildProcess is run by the scheduler or initiated by a command-line process execution, the ERoom facility is queried for all available eRooms XML Configuration Template:

   <JobProcess class="com.raritantechnologies.federated.eRoom.ERoomBuildProcess"
                  loggingSourceName="[ name of search source to read eRoom build status ]"
                  outputSourceName = "[ name of search source that can query the output collections - needed for delete ]"
                  eRoomURI="[ Connection URI for eRoom Facility server ]"
                  findFacilities="[ true|false(default) - find all facilities on the eRoom Server ]"
                  userName="[ user name to access eRoom ]"
                  password="[ user password ]"
                  passwordEnc="[ encrypted user password ]"
                  useScheduler="[true(default)|false] - allows jobs to be run in parallel"
                  eRoomsPerCollection="[ number of eRooms per collection (default = 1 )]"
                  collectionNames="[ comma separated list of collections ]"
                  startMode="[ START | RESTART | UPDATE ]" >

     <!-- By default - the ERoomBuildProcess will query the eRoom server to discover the eRooms dynamically -->
     <!-- Option: Specify explicit eRoom targets (eRoomURI) -->
     <SelectedERooms>
       <ERoom facility=[" eRoom Facility ]" name="[ eRoom name ]" >
       <ERoom facility=[" eRoom Facility ]" name="[ eRoom name ]" >
     </SelectedERooms>

     <!-- Alternatively, can dynamically query the Facilities but exclude certain eRooms -->
     <ExcludedERooms>
       <ERoom facility=[" eRoom Facility ]" name="[ eRoom name ]" >
     </ExcludedERooms>

     <!-- Custom ERoom SOAP request: use this to add any global properties to eRoom records. -->
     <CustomERoomRequest>

       <SOAPRequest>
          <![CDATA[

          ]]>
       </SOAPRequest>

       <XSLTransform>
            <![CDATA[
       
            ]]>
         </XSLTransform>

         <!-- parameters that are extracted from the ERoom request and added as global parameters  -->
         <!-- to eRoomGateway. These should be included in the Custom XSL transform.     -->
         <ERoomParams>
            <Param fieldPath="result path to value " name="[ name of parameter extracted in XSLT ]" />
            <Param etc... />
         </ERoomParams>

     </CustomERoomRequest>

     <!-- ERoomGateway template -->
     <ERoomGateway >
        <!-- See configuration details for ERoomGateway -->
     </ERoomGateway>

     <!-- Optional ERoomUpdateProcess - if present, ERoomBuildProcess will use this -->
     <ERoomUpdateProcess>

     </ERoomUpdateProcess>

     <!-- ===================================================================== -->
     <!-- Logging Output Processor to store eRoom / collection mappings         -->
     <!-- Columns: eRoom Name | eRoom URL | collection Name | last indexed Time -->
     <!-- ===================================================================== -->
     <LoggingOutputProcessor class="[ class of com.raritantechnologies.searchApp.dataCollection.IGatwayOutputProcessor ]" >

     </LoggingOutputProcessor>

     <!-- Log Index mapping object: maps standard log fields to specific fields/columns in log source -->
     <LogIndexMap
           eRoomNameField     ="[ name of eRoomName field in logging database ]" 
           eRoomURLField      ="[ name of eRoomURL field in logging database ]"
           collectionNameField="[ name of collection name field in logging database ]"
           lastIndexTimeField ="[ name of last index time field in logging database ]"
           lastIndexTimeFormat="[ format of last index time data ]"
     />

     <!-- ===================================================================== -->
     <!-- Indexing OutputProcessor: ERoom data is directed to this              -->
     <!-- OutputProcessor for Search collection indexing operations             -->
     <!-- ===================================================================== -->
     <IndexOutputProcessor class="[ class of com.raritantechnologies.searchApp.dataCollection.IGatewayOutputProcessor ]" >

     </IndexOutputProcessor>

     <!-- Describes how indexing type and other parameters are to be mapped to OutputProcessor init map -->
     <IndexInitMap
          indexTypeField="[ name of field in IndexOutputProcessor that takes Index Type (CREATE|UPDATE|DELETE) param ]"
          createValue="[ value of Index type field for CREATE ]"
          updateValue="[ value of Index type field for UPDATE ]"
          deleteValue="[ value of Index type field for DELETE ]" >

          

     </IndexInitMap>

   </JobProcess>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Field Summary
 
Fields inherited from interface com.raritantechnologies.searchApp.scheduler.IJobProcessListener
COMPLETED, COMPLETED_NORMALLY, SCHEDULED, STARTED, UNSCHEDULED
 
Constructor Summary
ERoomBuildProcess()
           
 
Method Summary
 void executeJob(RaritanPageContext rpc)
           
 void executeJob(java.lang.String[] args)
          Starts the collection Build process.
 int getCompletedStatus()
           
 java.lang.String getConfigurationXML()
           
protected  java.lang.String getERoomsRequest()
           
 java.util.Date getJobCompletedTime()
          Returns time at which the Job process executeJob( ) method completed.
 java.util.Date getJobScheduledTime()
          Returns time at which the Scheduler added the Job to the queue.
 java.util.Date getJobStartTime()
          Returns time at which the JobDispatcher initiated the job process.
 int getJobStatus()
           
protected  java.lang.String getXSLTransform()
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void jobCompleted(java.lang.Object process, java.util.Date at, int status)
          Callback from completed ERoom processing job.
 void jobScheduled(java.util.Date at)
           
 void jobStarting(java.util.Date at)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERoomBuildProcess

public ERoomBuildProcess()
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

getConfigurationXML

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

executeJob

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

executeJob

public void executeJob(java.lang.String[] args)
Starts the collection Build process.

Specified by:
executeJob in interface IJobProcess

jobScheduled

public void jobScheduled(java.util.Date at)
Specified by:
jobScheduled in interface IJobProcessListener

jobStarting

public void jobStarting(java.util.Date at)
Specified by:
jobStarting in interface IJobProcessListener

jobCompleted

public void jobCompleted(java.lang.Object process,
                         java.util.Date at,
                         int status)
Callback from completed ERoom processing job.

Specified by:
jobCompleted in interface IJobProcessListener

getJobStatus

public int getJobStatus()
Specified by:
getJobStatus in interface IJobProcessListener

getCompletedStatus

public int getCompletedStatus()
Specified by:
getCompletedStatus in interface IJobProcessListener

getJobScheduledTime

public java.util.Date getJobScheduledTime()
Returns time at which the Scheduler added the Job to the queue.

Specified by:
getJobScheduledTime in interface IJobProcessListener

getJobStartTime

public java.util.Date getJobStartTime()
Returns time at which the JobDispatcher initiated the job process.

Specified by:
getJobStartTime in interface IJobProcessListener

getJobCompletedTime

public java.util.Date getJobCompletedTime()
Returns time at which the Job process executeJob( ) method completed.

Specified by:
getJobCompletedTime in interface IJobProcessListener

getERoomsRequest

protected java.lang.String getERoomsRequest()

getXSLTransform

protected java.lang.String getXSLTransform()

main

public static void main(java.lang.String[] args)