Package com.logicaldoc.web.service
Class SearchEngineServiceImpl
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
-
- com.google.gwt.user.server.rpc.RemoteServiceServlet
-
- com.logicaldoc.web.service.AbstractRemoteService
-
- com.logicaldoc.web.service.SearchEngineServiceImpl
-
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService,com.google.gwt.user.server.rpc.SerializationPolicyProvider,SearchEngineService,Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class SearchEngineServiceImpl extends AbstractRemoteService implements SearchEngineService
Implementation of the SearchEngineService- Since:
- 6.0
- Author:
- Matteo Caruso - LogicalDOC
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.logicaldoc.gui.frontend.client.services.SearchEngineService
SearchEngineService.Instance
-
-
Constructor Summary
Constructors Constructor Description SearchEngineServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcheck()Checks the indexerlongcountEntries()Counts the total number of entriesGUISearchEnginegetInfo()Loads a search engine that contains all search engine details.voidpurge()Launches the purgeGUIResultquery(String query, int page, int size)Executes a low-level query in the fulltext indexvoidremove(Long[] entryIds)Removes a set of entries from the indexvoidreorderTokenFilters(String[] filters)Reorders the token filters.voidrescheduleAll(boolean dropIndex)Reschedule all entries for indexingvoidsave(GUISearchEngine searchEngine)Saves search engine settingsvoidsaveTokenFilterSettings(String filter, GUIParameter[] settings)Saves the settings of the specified token filtervoidsetAliases(String extension, String aliases)Sets the parser aliases for the given extension.voidsetLanguageStatus(String language, boolean active)Changes the activation status of a languagevoidsetTokenFilterStatus(String filter, boolean active)Changes the activation status of a token filtervoidunlock()Unlocks the indexer-
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
getSerializationPolicy, init, processCall, processCall, processPost
-
-
-
-
Method Detail
-
getInfo
public GUISearchEngine getInfo() throws ServerException
Description copied from interface:SearchEngineServiceLoads a search engine that contains all search engine details.- Specified by:
getInfoin interfaceSearchEngineService- Returns:
- details about the engine
- Throws:
ServerException- an error happened in the server application
-
rescheduleAll
public void rescheduleAll(boolean dropIndex) throws ServerExceptionDescription copied from interface:SearchEngineServiceReschedule all entries for indexing- Specified by:
rescheduleAllin interfaceSearchEngineService- Parameters:
dropIndex- must the index be dropped also?- Throws:
ServerException- an error happened in the server application
-
unlock
public void unlock() throws ServerExceptionDescription copied from interface:SearchEngineServiceUnlocks the indexer- Specified by:
unlockin interfaceSearchEngineService- Throws:
ServerException- an error happened in the server application
-
check
public String check() throws ServerException
Description copied from interface:SearchEngineServiceChecks the indexer- Specified by:
checkin interfaceSearchEngineService- Returns:
- check report
- Throws:
ServerException- an error happened in the server application
-
save
public void save(GUISearchEngine searchEngine) throws ServerException
Description copied from interface:SearchEngineServiceSaves search engine settings- Specified by:
savein interfaceSearchEngineService- Parameters:
searchEngine- the engine to update- Throws:
ServerException- an error happened in the server application
-
setLanguageStatus
public void setLanguageStatus(String language, boolean active) throws ServerException
Description copied from interface:SearchEngineServiceChanges the activation status of a language- Specified by:
setLanguageStatusin interfaceSearchEngineService- Parameters:
language- the language to changeactive- the new active status- Throws:
ServerException- an error happened in the server application
-
setAliases
public void setAliases(String extension, String aliases) throws ServerException
Description copied from interface:SearchEngineServiceSets the parser aliases for the given extension. Aliases must be a comma-separated values- Specified by:
setAliasesin interfaceSearchEngineService- Parameters:
extension- the file extension e.g.: xmlaliases- comma-separated list of aliases e.g.: html,htmlx- Throws:
ServerException- an error happened in the server application
-
countEntries
public long countEntries() throws ServerExceptionDescription copied from interface:SearchEngineServiceCounts the total number of entries- Specified by:
countEntriesin interfaceSearchEngineService- Returns:
- number of entries in the index
- Throws:
ServerException- an error happened in the server application
-
reorderTokenFilters
public void reorderTokenFilters(String[] filters) throws ServerException
Description copied from interface:SearchEngineServiceReorders the token filters.- Specified by:
reorderTokenFiltersin interfaceSearchEngineService- Parameters:
filters- the ordered list of the filters- Throws:
ServerException- an error happened in the server application
-
saveTokenFilterSettings
public void saveTokenFilterSettings(String filter, GUIParameter[] settings) throws ServerException
Description copied from interface:SearchEngineServiceSaves the settings of the specified token filter- Specified by:
saveTokenFilterSettingsin interfaceSearchEngineService- Parameters:
filter- token filtersettings- parameters- Throws:
ServerException- an error happened in the server application
-
setTokenFilterStatus
public void setTokenFilterStatus(String filter, boolean active) throws ServerException
Description copied from interface:SearchEngineServiceChanges the activation status of a token filter- Specified by:
setTokenFilterStatusin interfaceSearchEngineService- Parameters:
filter- the languageactive- the new activation status- Throws:
ServerException- an error happened in the server application
-
purge
public void purge() throws ServerExceptionDescription copied from interface:SearchEngineServiceLaunches the purge- Specified by:
purgein interfaceSearchEngineService- Throws:
ServerException- an error happened in the server application
-
remove
public void remove(Long[] entryIds) throws ServerException
Description copied from interface:SearchEngineServiceRemoves a set of entries from the index- Specified by:
removein interfaceSearchEngineService- Parameters:
entryIds- identifiers of the entries to delete- Throws:
ServerException- an error happened in the server application
-
query
public GUIResult query(String query, int page, int size) throws ServerException
Description copied from interface:SearchEngineServiceExecutes a low-level query in the fulltext index- Specified by:
queryin interfaceSearchEngineService- Parameters:
query- the query to usepage- the page to retrievesize- the maximum number of entries to retrieve- Returns:
- the result
- Throws:
ServerException- an error happened in the server application
-
-