public interface QueryOptionsManager
Modifier and Type | Method and Description |
---|---|
void |
deleteOptions(String name)
Remove a search configuration from the REST server.
|
<T extends QueryOptionsListReadHandle> |
optionsList(T listHandle)
Retrieves the list of available named query options in a JSON or
XML representation provided as an object of an IO class.
|
<T> T |
optionsListAs(Format format,
Class<T> as)
Retrieves the list of available named query options in a JSON or
XML representation provided as an object of an IO class.
|
<T extends QueryOptionsReadHandle> |
readOptions(String name,
T queryOptionsHandle)
Fetch a query options configuration from the REST Server by name.
|
<T> T |
readOptionsAs(String name,
Format format,
Class<T> as)
Fetch a query options configuration from the REST Server by name.
|
void |
writeOptions(String name,
QueryOptionsWriteHandle queryOptionsHandle)
Write a named QueryOptions configuration to the REST server.
|
void |
writeOptionsAs(String name,
Format format,
Object queryOptions)
Write a named QueryOptions configuration to the REST server in a JSON or
XML representation provided as an object of an IO class.
|
<T> T optionsListAs(Format format, Class<T> as) throws ForbiddenUserException, FailedRequestException
format
- whether to provide the list in a JSON or XML representationas
- the IO class for reading the list of optionsForbiddenUserException
FailedRequestException
<T extends QueryOptionsListReadHandle> T optionsList(T listHandle) throws ForbiddenUserException, FailedRequestException
listHandle
- a handle for reading the list of name optionsForbiddenUserException
FailedRequestException
<T> T readOptionsAs(String name, Format format, Class<T> as) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
name
- the name of options configuration stored on MarkLogic REST instance.format
- whether to provide the options in a JSON or XML representationas
- the IO class for reading the query optionsResourceNotFoundException
ForbiddenUserException
FailedRequestException
<T extends QueryOptionsReadHandle> T readOptions(String name, T queryOptionsHandle) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
Use a QueryOptionsHandle object for access to the configuration with Java.
T
- a set of classes able to read query configurations from the database.name
- the name of options configuration stored on MarkLogic REST instance.queryOptionsHandle
- an object into which to fetch the query options.ResourceNotFoundException
ForbiddenUserException
FailedRequestException
void writeOptionsAs(String name, Format format, Object queryOptions) throws ResourceNotFoundException, ResourceNotResendableException, ForbiddenUserException, FailedRequestException
name
- name given to the QueryOptions for use in runtime queriesformat
- whether the options are provided in a JSON or XML representationqueryOptions
- an IO representation of the JSON or XML query optionsResourceNotFoundException
ResourceNotResendableException
ForbiddenUserException
FailedRequestException
void writeOptions(String name, QueryOptionsWriteHandle queryOptionsHandle) throws FailedRequestException, ForbiddenUserException, ResourceNotFoundException, ResourceNotResendableException
name
- name given to the QueryOptions for use in runtime queriesqueryOptionsHandle
- an object able to serialize a QueryOptions configurationFailedRequestException
ForbiddenUserException
ResourceNotFoundException
ResourceNotResendableException
void deleteOptions(String name) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
name
- name of query options to remove from the REST server.ResourceNotFoundException
ForbiddenUserException
FailedRequestException
Copyright © 2013-2015 MarkLogic Corporation.