com.raritantechnologies.searchApp.sourceMap
Class CustomizableSourceMap

java.lang.Object
  extended bycom.raritantechnologies.searchApp.sourceMap.CustomizableSourceMap
All Implemented Interfaces:
IConfigurable, ISourceMap

public class CustomizableSourceMap
extends java.lang.Object
implements ISourceMap

SourceMap that is user customizable through stored preferences.


Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
CustomizableSourceMap()
           
 
Method Summary
 void addSourceInputs(java.lang.String sourceKey, SourceInput[] sourceInputs)
           
 java.lang.String[] getAllSourceKeys(ILoginInfo userInfo, boolean checkSecurity, java.util.Map searchParams)
          returns a list of all of the source names - links to SearchSource in the ISearchFieldMap
 java.lang.String getDescription(java.lang.String sourceName)
           
 java.lang.String getDisplayName(java.lang.String sourceKey)
           
 java.lang.String getObjectType()
          Returns the type of Source that the source map supports.
 int getPageCacheStyle(java.lang.String sourceKey)
           
 SourceInput[] getSourceInputs(ILoginInfo userInfo, IResult searchResult)
           
 SourceInput[] getSourceInputs(ILoginInfo userInfo, java.util.Map searchParams)
          Looks up the set of federated sources that are appropriate for the parameter set chosen by the user.
 SourceInput[] getSourceInputs(java.lang.String sourceKey)
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void setPageCacheStyle(java.lang.String sourceKey, int pagingStyle)
          Sets/gets the paging style used by a federated source.
 void setPreferences(ILoginInfo userInfo, IResult searchResult, SourceInput[] inputs)
           
 void setPreferences(ILoginInfo userInfo, java.util.Map searchParams, SourceInput[] inputs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomizableSourceMap

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

getObjectType

public java.lang.String getObjectType()
Description copied from interface: ISourceMap
Returns the type of Source that the source map supports.

Specified by:
getObjectType in interface ISourceMap

getAllSourceKeys

public java.lang.String[] getAllSourceKeys(ILoginInfo userInfo,
                                           boolean checkSecurity,
                                           java.util.Map searchParams)
returns a list of all of the source names - links to SearchSource in the ISearchFieldMap

Specified by:
getAllSourceKeys in interface ISourceMap

addSourceInputs

public void addSourceInputs(java.lang.String sourceKey,
                            SourceInput[] sourceInputs)
Specified by:
addSourceInputs in interface ISourceMap

getSourceInputs

public SourceInput[] getSourceInputs(java.lang.String sourceKey)
Specified by:
getSourceInputs in interface ISourceMap

getDisplayName

public java.lang.String getDisplayName(java.lang.String sourceKey)
Specified by:
getDisplayName in interface ISourceMap

getSourceInputs

public SourceInput[] getSourceInputs(ILoginInfo userInfo,
                                     java.util.Map searchParams)
Description copied from interface: ISourceMap
Looks up the set of federated sources that are appropriate for the parameter set chosen by the user. SourceInput objects map a source name to a set of preset parameters that need to be loaded into the queryParams - this method effectively maps a set of browse selections to a set of federated sources which match the selections and then provides the configuration information needed to direct the source to the proper result type. That it, this method translates a set of browse parameters to specific input parameters needed for each site. This information is obtained from the SourceMap XML used to construct this ISourceMap object.

Specified by:
getSourceInputs in interface ISourceMap

getSourceInputs

public SourceInput[] getSourceInputs(ILoginInfo userInfo,
                                     IResult searchResult)
Specified by:
getSourceInputs in interface ISourceMap

getDescription

public java.lang.String getDescription(java.lang.String sourceName)
Specified by:
getDescription in interface ISourceMap

setPageCacheStyle

public void setPageCacheStyle(java.lang.String sourceKey,
                              int pagingStyle)
Description copied from interface: ISourceMap
Sets/gets the paging style used by a federated source. Constants defined in IFederatedSearchSource.

Specified by:
setPageCacheStyle in interface ISourceMap

getPageCacheStyle

public int getPageCacheStyle(java.lang.String sourceKey)
Specified by:
getPageCacheStyle in interface ISourceMap

setPreferences

public void setPreferences(ILoginInfo userInfo,
                           java.util.Map searchParams,
                           SourceInput[] inputs)

setPreferences

public void setPreferences(ILoginInfo userInfo,
                           IResult searchResult,
                           SourceInput[] inputs)