public interface ExtensionLibrariesManager
Modifier and Type | Method and Description |
---|---|
void |
delete(ExtensionLibraryDescriptor libraryDescriptor)
Removes a library asset from the server.
|
void |
delete(String libraryPath)
Removes a library asset from the server.
|
ExtensionLibraryDescriptor[] |
list()
Lists all of the library files that are installed on the server.
|
ExtensionLibraryDescriptor[] |
list(String directory)
Lists all of the library files in one directory (infinite depth) on the server.
|
<T> T |
read(ExtensionLibraryDescriptor libraryDescriptor,
Class<T> as)
Reads the contents of a library asset as an object of an IO class.
|
<T extends AbstractReadHandle> |
read(ExtensionLibraryDescriptor libraryDescriptor,
T readHandle)
Reads the contents of a library asset into a handle.
|
<T extends AbstractReadHandle> |
read(String libraryPath,
T readHandle)
Reads the contents of a library asset into a handle.
|
<T> T |
readAs(String libraryPath,
Class<T> as)
Reads the contents of a library asset as an object of an IO class.
|
void |
write(ExtensionLibraryDescriptor libraryDescriptor,
AbstractWriteHandle contentHandle)
Writes the contents of a handle to the provided path on the REST server.
|
void |
write(String libraryPath,
AbstractWriteHandle contentHandle)
Writes the contents of a handle to the provided path on the REST server.
|
void |
writeAs(ExtensionLibraryDescriptor libraryDescriptor,
Object content)
Writes the contents of a handle to the provided path on the REST server
as an object of an IO class.
|
void |
writeAs(String libraryPath,
Object content)
Writes the contents of a handle to the provided path on the REST server
as an object of an IO class.
|
ExtensionLibraryDescriptor[] list() throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
ResourceNotFoundException
ForbiddenUserException
FailedRequestException
ExtensionLibraryDescriptor[] list(String directory) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
directory
- The directory to list.ResourceNotFoundException
ForbiddenUserException
FailedRequestException
<T> T readAs(String libraryPath, Class<T> as) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
libraryPath
- the path to the libraryas
- the IO class for reading the library assetResourceNotFoundException
ForbiddenUserException
FailedRequestException
<T> T read(ExtensionLibraryDescriptor libraryDescriptor, Class<T> as) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
libraryDescriptor
- a descriptor that locates the libraryas
- the IO class for reading the library assetResourceNotFoundException
ForbiddenUserException
FailedRequestException
<T extends AbstractReadHandle> T read(String libraryPath, T readHandle) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
libraryPath
- the path to the libraryreadHandle
- a handle for reading the contents of the fileResourceNotFoundException
ForbiddenUserException
FailedRequestException
<T extends AbstractReadHandle> T read(ExtensionLibraryDescriptor libraryDescriptor, T readHandle) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
libraryDescriptor
- a descriptor that locates the library.readHandle
- A handle for reading the contents of the file.ResourceNotFoundException
ForbiddenUserException
FailedRequestException
void writeAs(String libraryPath, Object content) throws ResourceNotFoundException, ResourceNotResendableException, ForbiddenUserException, FailedRequestException
libraryPath
- The path at which to install the library.content
- an IO representation of the library assetResourceNotFoundException
ResourceNotResendableException
ForbiddenUserException
FailedRequestException
void writeAs(ExtensionLibraryDescriptor libraryDescriptor, Object content) throws ResourceNotFoundException, ResourceNotResendableException, ForbiddenUserException, FailedRequestException
libraryDescriptor
- The descriptory which locates where to install the library.content
- an IO representation of the library assetResourceNotFoundException
ResourceNotResendableException
ForbiddenUserException
FailedRequestException
void write(String libraryPath, AbstractWriteHandle contentHandle) throws ResourceNotFoundException, ResourceNotResendableException, ForbiddenUserException, FailedRequestException
libraryPath
- The path at which to install the library.contentHandle
- The handle containing the contents of the library.ResourceNotFoundException
ResourceNotResendableException
ForbiddenUserException
FailedRequestException
void write(ExtensionLibraryDescriptor libraryDescriptor, AbstractWriteHandle contentHandle) throws ResourceNotFoundException, ResourceNotResendableException, ForbiddenUserException, FailedRequestException
libraryDescriptor
- The descriptory which locates where to install the library.contentHandle
- The handle containing the contents of the library.ResourceNotFoundException
ResourceNotResendableException
ForbiddenUserException
FailedRequestException
void delete(String libraryPath) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
libraryPath
- The path to the library to delete.ResourceNotFoundException
ForbiddenUserException
FailedRequestException
void delete(ExtensionLibraryDescriptor libraryDescriptor) throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException
libraryDescriptor
- A descriptor locating the library to delete.ResourceNotFoundException
ForbiddenUserException
FailedRequestException
Copyright © 2013-2015 MarkLogic Corporation.