com.raritantechnologies.searchApp.resultComparators
Class LookupMatcher

java.lang.Object
  extended bycom.raritantechnologies.searchApp.resultComparators.LookupMatcher
All Implemented Interfaces:
IConfigurable, IResultMatcher

public class LookupMatcher
extends java.lang.Object
implements IResultMatcher

Performs a lookup on some SearchSource to determine if an IResult matches some criterion.

Uses parameters in the initial IResult to build a query against a search source. One or more results returned from the search are then matched by a nested IResultMatcher depending on the match "mode" which can be one of "FIRST", "ALL", or "ANY".

XML Configuration Template:
   <ResultMatcher class="com.raritantechnologies.searchApp.resultComparators.LookupMatcher"
                  searchSource="[name of lookup source]"
                  matchMode="FIRST|ALL|ANY" 
                  matchIfNone="true|false" >

     <LookupParams>
       <Param resultID="field in target result" searchID="field name in lookup source" />
       <Param resultID="another field in result" searchID="another field in lookup source" />
     </LookupParams>

     <!-- Nested comparator that checks each result from lookup search -->
     <Comparator class="[ class of com.raritantechnologies.searchApp.IResultMatcher]" >
        <!-- configuration parameters of nested result matcher -->
     </Comparator>

   </ResultMatcher>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Field Summary
 
Fields inherited from interface com.raritantechnologies.searchApp.IResultMatcher
TEMPLATE
 
Constructor Summary
LookupMatcher()
           
 
Method Summary
 boolean equals(ILoginInfo user, IResult result)
           
 java.lang.String getConfigurationXML()
           
 java.lang.String getConfigurationXML(java.lang.String configurationTemplate)
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookupMatcher

public LookupMatcher()
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 IConfigurable

equals

public boolean equals(ILoginInfo user,
                      IResult result)
Specified by:
equals in interface IResultMatcher

getConfigurationXML

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

getConfigurationXML

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