com.elasticpath.service.index.impl
Class AbstractIndexServiceImpl

java.lang.Object
  extended by com.elasticpath.service.impl.AbstractEpServiceImpl
      extended by com.elasticpath.service.impl.AbstractEpPersistenceServiceImpl
          extended by com.elasticpath.service.index.impl.AbstractIndexServiceImpl
All Implemented Interfaces:
EpPersistenceService, EpService
Direct Known Subclasses:
AbstractIndexBuildServiceImpl, AbstractSpellIndexServiceImpl

public abstract class AbstractIndexServiceImpl
extends AbstractEpPersistenceServiceImpl

A high level implementation of an Indexing Service. Can be subclassed to implement specific indexing algorithms.


Constructor Summary
AbstractIndexServiceImpl()
          Default constructor.
 
Method Summary
 void buildIndex()
          Builds the search index.
 void buildIndex(boolean rebuild, java.util.Locale locale)
          Builds the search index based on the given locale.
 void buildIndexForDefaultLocale()
          Builds the search index for system default locale only.
 Analyzer getAnalyzer()
          Returns the analyzer.
 java.lang.Object getObject(long uid)
          This is a stub implementation.
 TimeService getTimeService()
          Returns the time service.
 void setAnalyzer(Analyzer analyzer)
          Sets the anaylyer.
 void setElasticPath(ElasticPath elasticPath)
          Set the ElasticPath instance.
 void setPropertiesDao(PropertiesDao propertiesDao)
          Set the DAO used to load properties.
 void setTimeService(TimeService timeService)
          Sets the time service.
 void setUtility(Utility utility)
          Set the utility class.
 
Methods inherited from class com.elasticpath.service.impl.AbstractEpPersistenceServiceImpl
getPersistenceEngine, setPersistenceEngine
 
Methods inherited from class com.elasticpath.service.impl.AbstractEpServiceImpl
getElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath
 

Constructor Detail

AbstractIndexServiceImpl

public AbstractIndexServiceImpl()
Default constructor.

Method Detail

buildIndex

public void buildIndex()
Builds the search index.


buildIndex

public void buildIndex(boolean rebuild,
                       java.util.Locale locale)
Builds the search index based on the given locale.

Parameters:
rebuild - true if recreating a new index, false otherwise
locale - the locale, giving null to build index on all locales that system support

buildIndexForDefaultLocale

public void buildIndexForDefaultLocale()
Builds the search index for system default locale only.


getAnalyzer

public Analyzer getAnalyzer()
Returns the analyzer.

Returns:
the analyzer

getObject

public java.lang.Object getObject(long uid)
                           throws EpServiceException
This is a stub implementation. It should never be called.

Parameters:
uid - the persistent instance uid
Returns:
the persistent instance if exists, otherwise null
Throws:
EpServiceException - - in case it is called

getTimeService

public TimeService getTimeService()
Returns the time service.

Returns:
the time service.

setAnalyzer

public void setAnalyzer(Analyzer analyzer)
Sets the anaylyer.

Parameters:
analyzer - the anaylyer

setElasticPath

public void setElasticPath(ElasticPath elasticPath)
Set the ElasticPath instance.

Specified by:
setElasticPath in interface EpService
Overrides:
setElasticPath in class AbstractEpServiceImpl
Parameters:
elasticPath - the instance of ElasticPath

setPropertiesDao

public void setPropertiesDao(PropertiesDao propertiesDao)
Set the DAO used to load properties.

Parameters:
propertiesDao - the DAO used to load properties.

setTimeService

public void setTimeService(TimeService timeService)
Sets the time service.

Parameters:
timeService - the time service

setUtility

public void setUtility(Utility utility)
Set the utility class.

Parameters:
utility - the utility class