Package stroom.query.audit.service
Interface QueryService
-
- All Known Implementing Classes:
QueryServiceHttpClient
public interface QueryService
-
-
Method Summary
Modifier and Type Method Description java.lang.Boolean
destroy(ServiceUser user, QueryKey queryKey)
Destroy any existing query being conducted under the given key.java.util.Optional<DataSource>
getDataSource(ServiceUser user, DocRef docRef)
Get the details of the DataSource given by the DocRef.java.util.Optional<DocRef>
getDocRefForQueryKey(ServiceUser user, QueryKey queryKey)
Used by REST layer to retrieve the doc ref for a given query key.java.lang.String
getType()
Get the doc ref type that this service wraps.java.util.Optional<SearchResponse>
search(ServiceUser user, SearchRequest request)
Conduct a search on the data, it may be a successive call for long running searches.
-
-
-
Method Detail
-
getType
java.lang.String getType()
Get the doc ref type that this service wraps.- Returns:
- The doc ref type name
-
getDataSource
java.util.Optional<DataSource> getDataSource(ServiceUser user, DocRef docRef) throws QueryApiException
Get the details of the DataSource given by the DocRef. Used to build user interfaces for querying the specific data.- Parameters:
user
- The authenticated userdocRef
- The Doc Ref of the DataSource to fetch- Returns:
- The DataSource definition for the given doc ref
- Throws:
QueryApiException
- if anything goes wrong
-
search
java.util.Optional<SearchResponse> search(ServiceUser user, SearchRequest request) throws QueryApiException
Conduct a search on the data, it may be a successive call for long running searches.- Parameters:
user
- The authenticated userrequest
- The details of the search- Returns:
- An optional search response.
- Throws:
QueryApiException
- if anything goes wrong
-
destroy
java.lang.Boolean destroy(ServiceUser user, QueryKey queryKey) throws QueryApiException
Destroy any existing query being conducted under the given key.- Parameters:
user
- The authenticated userqueryKey
- The query key that was given with the search request.- Returns:
- Success indicator
- Throws:
QueryApiException
- if anything goes wrong
-
getDocRefForQueryKey
java.util.Optional<DocRef> getDocRefForQueryKey(ServiceUser user, QueryKey queryKey) throws QueryApiException
Used by REST layer to retrieve the doc ref for a given query key. Primarily used to check the permissions for the given doc ref.- Parameters:
user
- The authenticated userqueryKey
- The query key, it should match a current query- Returns:
- The DocRef of the query, if found, if not found the result will be empty.
- Throws:
QueryApiException
- if anything goes wrong
-
-