no.sesat.search.mode.config
Class PropertiesCommandConfig

java.lang.Object
  extended by no.sesat.search.mode.config.CommandConfig
      extended by no.sesat.search.mode.config.PropertiesCommandConfig
All Implemented Interfaces:
Serializable, BaseSearchConfiguration, SearchConfiguration, SearchConfiguration.ModesW3cDomDeserialiser

@CommandConfig.Controller(value="PropertiesCommand")
public class PropertiesCommandConfig
extends CommandConfig

Given the resource name for a properties file, loads it into a Map. The following is a tutorial for a simple enrichment using this command https://dev.schibstedsok.no/confluence/display/SESAT/Developing+a+quick+and+simple+Enrichment+tutorial

Version:
$Id: PropertiesCommandConfig.java 7225 2009-04-09 00:32:20Z ssmiweve $
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class no.sesat.search.mode.config.CommandConfig
CommandConfig.Controller
 
Nested classes/interfaces inherited from interface no.sesat.search.mode.config.SearchConfiguration
SearchConfiguration.ModesW3cDomDeserialiser
 
Field Summary
 
Fields inherited from class no.sesat.search.mode.config.CommandConfig
DEFAULT_DOCUMENTS_TO_RETURN
 
Fields inherited from interface no.sesat.search.mode.config.SearchConfiguration
DEFAULT_PAGING_PARAMETER, DEFAULT_USER_SORT_PARAMETER
 
Constructor Summary
PropertiesCommandConfig()
           
 
Method Summary
 Map<String,String> getProperties()
           
 String getPropertiesFilename()
           
 String getProperty(String key)
           
 PropertiesCommandConfig readSearchConfiguration(Element element, SearchConfiguration inherit, SearchModeFactory.Context context)
          Apply the attributes found in element to 'this'.
 void setPropertiesFilename(String propertiesFilename)
           
 
Methods inherited from class no.sesat.search.mode.config.CommandConfig
addQueryTransformer, addResultField, addResultFields, addResultHandler, clearFieldFilters, clearQueryTransformers, clearResultHandlers, getFieldFilterMap, getId, getInitialQueryTransformer, getName, getPagingParameter, getQueryBuilder, getQueryParameter, getQueryTransformers, getResultFieldMap, getResultFields, getResultHandlers, getResultsToReturn, getStatisticalName, getUserSortParameter, isAlwaysRun, isAsynchronous, isRunBlank, parseNavigators, setAlwaysRun, setAsynchronous, setFieldFilters, setId, setInitialQueryTransformer, setPagingParameter, setQueryBuilder, setQueryParameter, setResultsToReturn, setRunBlank, setStatisticalName, setUserSortParameter, toString, toStringLong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertiesCommandConfig

public PropertiesCommandConfig()
Method Detail

getPropertiesFilename

public String getPropertiesFilename()

setPropertiesFilename

public void setPropertiesFilename(String propertiesFilename)

getProperties

public Map<String,String> getProperties()

getProperty

public String getProperty(String key)

readSearchConfiguration

public PropertiesCommandConfig readSearchConfiguration(Element element,
                                                       SearchConfiguration inherit,
                                                       SearchModeFactory.Context context)
Description copied from interface: SearchConfiguration.ModesW3cDomDeserialiser
Apply the attributes found in element to 'this'. If some attributes are not found in element then try to fetch them from inherit and set them on 'this'.

Specified by:
readSearchConfiguration in interface SearchConfiguration.ModesW3cDomDeserialiser
Overrides:
readSearchConfiguration in class CommandConfig
Returns:
The newly read configuration (chaining pattern)


Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.