public interface ResourceExtensionsManager
A Resource Extensions Manager supports writing, reading, and deleting a Resource Services extension as well as listing the installed Resource Services extensions. A Resource Services extension implements server operations on a kind of database resource not supported by default.
| Modifier and Type | Interface and Description |
|---|---|
static class |
ResourceExtensionsManager.MethodParameters
Method Parameters declare the parameters accepted by the Resource Services extension.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteServices(String resourceName)
Uninstalls the services that implement a resource.
|
<T extends StructureReadHandle> |
listServices(T listHandle)
Reads the list of resource service extensions installed on the server.
|
<T extends StructureReadHandle> |
listServices(T listHandle,
boolean refresh)
Reads the list of resource service extensions installed on the server, specifying whether to refresh the metadata about each extension by parsing the extension source.
|
<T> T |
listServicesAs(Format format,
Class<T> as)
Reads the list of resource service extensions installed on the server in a JSON or XML representation provided as an object of an IO class.
|
<T> T |
listServicesAs(Format format,
Class<T> as,
boolean refresh)
Reads the list of resource service extensions installed on the server in a JSON or XML representation provided as an object of an IO class.
|
<T extends TextReadHandle> |
readServices(String resourceName,
T sourceHandle)
Reads the XQuery implementation of the services for a resource.
|
<T> T |
readServicesAs(String resourceName,
Class<T> as)
Reads the XQuery implementation of the services for a resource in a textual representation provided as an object of an IO class.
|
void |
startLogging(RequestLogger logger)
Starts debugging client requests.
|
void |
stopLogging()
Stops debugging client requests.
|
void |
writeServices(String resourceName,
TextWriteHandle sourceHandle,
ExtensionMetadata metadata,
ResourceExtensionsManager.MethodParameters... methodParams)
Installs the services that implement a resource.
|
void |
writeServicesAs(String resourceName,
Object source,
ExtensionMetadata metadata,
ResourceExtensionsManager.MethodParameters... methodParams)
Installs the services that implement a resource in a textual representation provided as an object of an IO class.
|
<T> T listServicesAs(Format format, Class<T> as)
Reads the list of resource service extensions installed on the server in a JSON or XML representation provided as an object of an IO class.
The IO class must have been registered before creating the database client. By default, the provided handles that implement ContentHandle are registered.
T - the type of object that will be returned by the handle registered for itformat - whether to provide the list in a JSON or XML representationas - the IO class for reading the list of resource service extensions<T> T listServicesAs(Format format, Class<T> as, boolean refresh)
Reads the list of resource service extensions installed on the server in a JSON or XML representation provided as an object of an IO class.
The IO class must have been registered before creating the database client. By default, the provided handles that implement ContentHandle are registered.
T - the type of object that will be returned by the handle registered for itformat - whether to provide the list in a JSON or XML representationas - the IO class for reading the list of resource service extensionsrefresh - whether to parse metadata from the extension source<T extends StructureReadHandle> T listServices(T listHandle)
Reads the list of resource service extensions installed on the server.
T - the type of StructureReadHandle to returnlistHandle - a handle on a JSON or XML representation of the list<T extends StructureReadHandle> T listServices(T listHandle, boolean refresh)
Reads the list of resource service extensions installed on the server, specifying whether to refresh the metadata about each extension by parsing the extension source.
T - the type of StructureReadHandle to returnlistHandle - a handle on a JSON or XML representation of the listrefresh - whether to parse metadata from the extension source<T> T readServicesAs(String resourceName, Class<T> as)
Reads the XQuery implementation of the services for a resource in a textual representation provided as an object of an IO class.
The IO class must have been registered before creating the database client. By default, the provided handles that implement ContentHandle are registered.
T - the type of object that will be returned by the handle registered for itresourceName - the name of the resourceas - the IO class for reading the source code as text<T extends TextReadHandle> T readServices(String resourceName, T sourceHandle)
Reads the XQuery implementation of the services for a resource.
T - the type of TextReadHandle to returnresourceName - the name of the resourcesourceHandle - a handle for reading the text of the XQuery implementation.void writeServicesAs(String resourceName, Object source, ExtensionMetadata metadata, ResourceExtensionsManager.MethodParameters... methodParams)
Installs the services that implement a resource in a textual representation provided as an object of an IO class.
The IO class must have been registered before creating the database client. By default, the provided handles that implement ContentHandle are registered.
resourceName - the name of the resourcesource - an IO representation of the source codemetadata - the metadata about the resource servicesmethodParams - a declaration of the parameters for the servicesvoid writeServices(String resourceName, TextWriteHandle sourceHandle, ExtensionMetadata metadata, ResourceExtensionsManager.MethodParameters... methodParams)
Installs the services that implement a resource.
resourceName - the name of the resourcesourceHandle - a handle on the source for the XQuery implementationmetadata - the metadata about the resource servicesmethodParams - a declaration of the parameters for the servicesvoid deleteServices(String resourceName)
Uninstalls the services that implement a resource.
resourceName - the name of the resourcevoid startLogging(RequestLogger logger)
Starts debugging client requests. You can suspend and resume debugging output using the methods of the logger.
logger - the logger that receives debugging outputvoid stopLogging()
Stops debugging client requests.
Copyright © 2013-2017 MarkLogic Corporation.