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 String
check()
Checks the indexerlong
countEntries()
Counts the total number of entriesGUISearchEngine
getInfo()
Loads a search engine that contains all search engine details.void
purge()
Launches the purgeGUIResult
query(String query, int page, int size)
Executes a low-level query in the fulltext indexvoid
remove(Long[] entryIds)
Removes a set of entries from the indexvoid
reorderTokenFilters(String[] filters)
Reorders the token filters.void
rescheduleAll(boolean dropIndex)
Reschedule all entries for indexingvoid
save(GUISearchEngine searchEngine)
Saves search engine settingsvoid
saveTokenFilterSettings(String filter, GUIParameter[] settings)
Saves the settings of the specified token filtervoid
setAliases(String extension, String aliases)
Sets the parser aliases for the given extension.void
setLanguageStatus(String language, boolean active)
Changes the activation status of a languagevoid
setTokenFilterStatus(String filter, boolean active)
Changes the activation status of a token filtervoid
unlock()
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:SearchEngineService
Loads a search engine that contains all search engine details.- Specified by:
getInfo
in interfaceSearchEngineService
- Returns:
- details about the engine
- Throws:
ServerException
- an error happened in the server application
-
rescheduleAll
public void rescheduleAll(boolean dropIndex) throws ServerException
Description copied from interface:SearchEngineService
Reschedule all entries for indexing- Specified by:
rescheduleAll
in interfaceSearchEngineService
- Parameters:
dropIndex
- must the index be dropped also?- Throws:
ServerException
- an error happened in the server application
-
unlock
public void unlock() throws ServerException
Description copied from interface:SearchEngineService
Unlocks the indexer- Specified by:
unlock
in interfaceSearchEngineService
- Throws:
ServerException
- an error happened in the server application
-
check
public String check() throws ServerException
Description copied from interface:SearchEngineService
Checks the indexer- Specified by:
check
in 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:SearchEngineService
Saves search engine settings- Specified by:
save
in 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:SearchEngineService
Changes the activation status of a language- Specified by:
setLanguageStatus
in 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:SearchEngineService
Sets the parser aliases for the given extension. Aliases must be a comma-separated values- Specified by:
setAliases
in 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 ServerException
Description copied from interface:SearchEngineService
Counts the total number of entries- Specified by:
countEntries
in 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:SearchEngineService
Reorders the token filters.- Specified by:
reorderTokenFilters
in 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:SearchEngineService
Saves the settings of the specified token filter- Specified by:
saveTokenFilterSettings
in 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:SearchEngineService
Changes the activation status of a token filter- Specified by:
setTokenFilterStatus
in interfaceSearchEngineService
- Parameters:
filter
- the languageactive
- the new activation status- Throws:
ServerException
- an error happened in the server application
-
purge
public void purge() throws ServerException
Description copied from interface:SearchEngineService
Launches the purge- Specified by:
purge
in interfaceSearchEngineService
- Throws:
ServerException
- an error happened in the server application
-
remove
public void remove(Long[] entryIds) throws ServerException
Description copied from interface:SearchEngineService
Removes a set of entries from the index- Specified by:
remove
in 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:SearchEngineService
Executes a low-level query in the fulltext index- Specified by:
query
in 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
-
-