Package com.logicaldoc.web.service
Class SearchServiceImpl
- 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.SearchServiceImpl
-
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService
,com.google.gwt.user.server.rpc.SerializationPolicyProvider
,SearchService
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class SearchServiceImpl extends AbstractRemoteService implements SearchService
Implementation of the SearchService- Since:
- 6.0
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.logicaldoc.gui.frontend.client.services.SearchService
SearchService.Instance
-
-
Constructor Summary
Constructors Constructor Description SearchServiceImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete(String[] names)
Deletes a previously saved searchstatic List<SearchOptions>
getSearches(Session session)
Load all the search options associated to all the searches saved for the current userGUISearchOptions
load(String name)
Loads a saved searchboolean
save(GUISearchOptions options)
Saves the search options in the user's working dirGUIResult
search(GUISearchOptions options)
Performs a search against the databasevoid
shareSearch(String name, long[] userIds, long[] groupIds)
Shares a search among a set of users and groups-
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
getSerializationPolicy, init, processCall, processCall, processPost
-
-
-
-
Method Detail
-
search
public GUIResult search(GUISearchOptions options) throws ServerException
Description copied from interface:SearchService
Performs a search against the database- Specified by:
search
in interfaceSearchService
- Parameters:
options
- The search options- Returns:
- Result hits and statistics
- Throws:
ServerException
- error in the server application
-
save
public boolean save(GUISearchOptions options) throws ServerException
Description copied from interface:SearchService
Saves the search options in the user's working dir- Specified by:
save
in interfaceSearchService
- Parameters:
options
- The search options- Returns:
- true if the operation was successful and there were no duplicates
- Throws:
ServerException
- error in the server application
-
delete
public void delete(String[] names) throws ServerException
Description copied from interface:SearchService
Deletes a previously saved search- Specified by:
delete
in interfaceSearchService
- Parameters:
names
- The saved search names- Throws:
ServerException
- error in the server application
-
load
public GUISearchOptions load(String name) throws ServerException
Description copied from interface:SearchService
Loads a saved search- Specified by:
load
in interfaceSearchService
- Parameters:
name
- The saved search name- Returns:
- the options
- Throws:
ServerException
- error in the server application
-
getSearches
public static List<SearchOptions> getSearches(Session session) throws PersistenceException, IOException
Load all the search options associated to all the searches saved for the current user- Parameters:
session
- the current session- Returns:
- the list of search options
- Throws:
PersistenceException
- A problem at db levelIOException
- a generic IO error
-
shareSearch
public void shareSearch(String name, long[] userIds, long[] groupIds) throws ServerException
Description copied from interface:SearchService
Shares a search among a set of users and groups- Specified by:
shareSearch
in interfaceSearchService
- Parameters:
name
- the name of the searchuserIds
- direct ids of users to share the search togroupIds
- the groups of users to share the search to- Throws:
ServerException
- share the search to
-
-