com.raritantechnologies.federated.eRoom
Class ERoomGateway

java.lang.Object
  extended bycom.raritantechnologies.federated.eRoom.ERoomGateway
All Implemented Interfaces:
ICollectionGateway, java.lang.Runnable

public class ERoomGateway
extends java.lang.Object
implements ICollectionGateway

XML Configuration Template:

 <CollectionGateway name="ERoom" class="com.raritantechnologies.federated.eRoom.ERoomGateway"
                       dataDir="[ name of directory to store ERoom data files ]"
                       dataFileField="[ name of field to use as data file name]"
                       maxFileSize="[ maximum size of file to index in bytes ]"
                       maxTempFiles="[ maximum number of temporary files to store on disk ]"
                       selectCriteria="[ Global select criteria (such as CreateDate etc. ) ]"
                       refresh="[ refresh period (see DateTimePeriod ]"
                       saveFiles="[ false if no file IO ]"
                       defaultAccessList="[ list of eRoom login names that will be granted access if no AccessList is acquired from eRoom ]"
                       useCoordinatorsIfNoAccess="[ true|false(default) if true - coordinators will be used if no access list is acquired from eRoom ]" >

   <!-- One or more ERoomSource tags: -->
   <ERoomSource endPointURL="[ eRoom URL ]" startPoint="[ eRoom container path starting point ]" >
     <LoginProcess UserName="[ eRoom user name ]"
                      Password="[ password ]"
                      passwordEnc="[ DES Encrypted password ]" />
   </ERoomSource>

   <ExcludeContent>
     <!-- One or more ExcludeExtension tags: -->
     <ExcludeExtension ext="[ filename extension of content to exclude ]" />
   </ExcludeContent>

   <!-- List of Items that don't have indexable child items. Use this to eliminate inefficient -->
   <!-- test queries for specified eRooms. -->
   <SkipChildItems facilityURL="[ facilityURL ]" eRoom="[ eRoom name ]" itemType="[ itemType ]" />

   <!-- List of fields to be inherited from parent objects in eRoom -->
   <ParentFields>
     <Field parentType="[ name of Item type ]" childType="[ type of child ]" 
               parentFieldName="[ name of field in parent item ]" childFieldName="[ name of field in child item ]" />

   </ParentFields>

   <!-- Parameter name/value pairs that are to be added to each IResult extracted by the ERoomGateway -->
   <StaticFields>
     <Field name="[ name of field ]" value="[ value of field ]" />
   </StaticFields>

 </CollectionGateway>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan, Chris Peterson

Field Summary
static boolean DEBUG_MEMORY
           
static long idCounter
           
 
Constructor Summary
ERoomGateway()
           
 
Method Summary
 void addERoomSource(java.lang.String facilityURL, java.lang.String startPoint, java.lang.String userName, java.lang.String password)
          Add an eRoom Source at a given Facility URL and starting point (usually the eRoom URLName)
 void addExcludeContent(org.w3c.dom.NodeList nl)
          Add the exclude extentions from the section of the Configuration XML
 void addJobProcessListener(IJobProcessListener jobProcListener)
           
 void clearERoomSources()
           
 boolean doesSaveFiles()
           
 void enableDebugging()
           
 java.lang.String getConfigurationXML()
          Returns XML Configuration for current state of the ERoomGateway.
 java.lang.String getDataFileField()
           
 void getERoomFile(java.io.OutputStream out, java.lang.String eRoom_Path, java.lang.String eRoomUser, java.lang.String eRoomPassword, java.lang.String eRoomURL, java.lang.String itemType)
          Acquires an eRoom file and outputs to a java.io.OutputStream given an eRoom_Path and an eRoom facility URL.
 java.util.List getERoomSources()
           
 java.util.List getERoomSourceURLs()
           
 void initialize(org.w3c.dom.Element gatewayElem, ISearchFieldMap sfMap)
          Initialize the ICollectionGateway from a Configuration XML element.
 void initRefresh(java.lang.String refreshSt)
           
 boolean isDebug()
           
 boolean isPaused()
           
 void pause()
           
 void resume()
           
 void run()
           
 void run(ILoginInfo userInfo)
          Need to have loginInfo for sources which require login/pw access.
 void setContainerTypes(java.lang.String containerTypes)
           
 void setDataDir(java.lang.String dataDir)
           
 void setDataFileField(java.lang.String dataFileField)
           
 void setGatewayListener(IGatewayListener listener)
          Sets the IGatewayListener interface.
 void setInputParameters(OrderedMap inputParams)
          set input parameters...
 void setMaxFileSize(int maxFileSize)
           
 void setResultSetSize(int resultSetSize)
           
 void setSelectCriteria(java.lang.String selectCriteria)
           
 void setStaticFields(OrderedMap staticFields)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG_MEMORY

public static final boolean DEBUG_MEMORY
See Also:
Constant Field Values

idCounter

public static long idCounter
Constructor Detail

ERoomGateway

public ERoomGateway()
Method Detail

setInputParameters

public void setInputParameters(OrderedMap inputParams)
Description copied from interface: ICollectionGateway
set input parameters...

Specified by:
setInputParameters in interface ICollectionGateway

setStaticFields

public void setStaticFields(OrderedMap staticFields)

initRefresh

public void initRefresh(java.lang.String refreshSt)

addERoomSource

public void addERoomSource(java.lang.String facilityURL,
                           java.lang.String startPoint,
                           java.lang.String userName,
                           java.lang.String password)
Add an eRoom Source at a given Facility URL and starting point (usually the eRoom URLName)


clearERoomSources

public void clearERoomSources()

getERoomSourceURLs

public java.util.List getERoomSourceURLs()

getERoomSources

public java.util.List getERoomSources()

setDataDir

public void setDataDir(java.lang.String dataDir)

setDataFileField

public void setDataFileField(java.lang.String dataFileField)

getDataFileField

public java.lang.String getDataFileField()

setSelectCriteria

public void setSelectCriteria(java.lang.String selectCriteria)

setMaxFileSize

public void setMaxFileSize(int maxFileSize)

setResultSetSize

public void setResultSetSize(int resultSetSize)

setContainerTypes

public void setContainerTypes(java.lang.String containerTypes)

doesSaveFiles

public boolean doesSaveFiles()

addJobProcessListener

public void addJobProcessListener(IJobProcessListener jobProcListener)

run

public void run(ILoginInfo userInfo)
Description copied from interface: ICollectionGateway
Need to have loginInfo for sources which require login/pw access.

Specified by:
run in interface ICollectionGateway

run

public void run()
Specified by:
run in interface ICollectionGateway

setGatewayListener

public void setGatewayListener(IGatewayListener listener)
Sets the IGatewayListener interface.

Specified by:
setGatewayListener in interface ICollectionGateway

initialize

public void initialize(org.w3c.dom.Element gatewayElem,
                       ISearchFieldMap sfMap)
Initialize the ICollectionGateway from a Configuration XML element.

Specified by:
initialize in interface ICollectionGateway

addExcludeContent

public void addExcludeContent(org.w3c.dom.NodeList nl)
Add the exclude extentions from the section of the Configuration XML


pause

public void pause()
Specified by:
pause in interface ICollectionGateway

resume

public void resume()
Specified by:
resume in interface ICollectionGateway

isPaused

public boolean isPaused()
Specified by:
isPaused in interface ICollectionGateway

enableDebugging

public void enableDebugging()

isDebug

public boolean isDebug()

getERoomFile

public void getERoomFile(java.io.OutputStream out,
                         java.lang.String eRoom_Path,
                         java.lang.String eRoomUser,
                         java.lang.String eRoomPassword,
                         java.lang.String eRoomURL,
                         java.lang.String itemType)
                  throws java.lang.Exception
Acquires an eRoom file and outputs to a java.io.OutputStream given an eRoom_Path and an eRoom facility URL.

Parameters:
out - OutputStream that the file data will be written to.
eRoomUser - Valid eRoom User ID.
eRoomPassword - eRoom user password
eRoomURL - eRoom Facility URL format http://[eRoom host ]/eRoomXML/[ Facility Name ]
itemType - eRoom Item type (e.g. erItemTypeFile )
Throws:
java.lang.Exception

getConfigurationXML

public java.lang.String getConfigurationXML()
Returns XML Configuration for current state of the ERoomGateway.

Specified by:
getConfigurationXML in interface ICollectionGateway