Class AsyncViewIndexManager
java.lang.Object
com.couchbase.client.java.manager.view.AsyncViewIndexManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondropDesignDocument
(String name, DesignDocumentNamespace namespace) Removes a design document from the server.dropDesignDocument
(String name, DesignDocumentNamespace namespace, DropDesignDocumentOptions options) Removes a design document from the server.getAllDesignDocuments
(DesignDocumentNamespace namespace) Returns all of the design documents in the specified namespace.getAllDesignDocuments
(DesignDocumentNamespace namespace, GetAllDesignDocumentsOptions options) Returns all of the design documents in the specified namespace.getDesignDocument
(String name, DesignDocumentNamespace namespace) Returns the named design document from the specified namespace.getDesignDocument
(String name, DesignDocumentNamespace namespace, GetDesignDocumentOptions options) Returns the named design document from the specified namespace.publishDesignDocument
(String name) Convenience method that gets a the document from the development namespace and upserts it to the production namespace.publishDesignDocument
(String name, PublishDesignDocumentOptions options) Convenience method that gets a the document from the development namespace and upserts it to the production namespace.upsertDesignDocument
(DesignDocument doc, DesignDocumentNamespace namespace) Stores the design document on the server under the specified namespace, replacing any existing document with the same name.upsertDesignDocument
(DesignDocument doc, DesignDocumentNamespace namespace, UpsertDesignDocumentOptions options) Stores the design document on the server under the specified namespace, replacing any existing document with the same name.
-
Constructor Details
-
AsyncViewIndexManager
-
-
Method Details
-
getAllDesignDocuments
public CompletableFuture<List<DesignDocument>> getAllDesignDocuments(DesignDocumentNamespace namespace) Returns all of the design documents in the specified namespace.- Parameters:
namespace
- namespace to query
-
getAllDesignDocuments
public CompletableFuture<List<DesignDocument>> getAllDesignDocuments(DesignDocumentNamespace namespace, GetAllDesignDocumentsOptions options) Returns all of the design documents in the specified namespace.- Parameters:
namespace
- namespace to queryoptions
- additional optional arguments (timeout, retry, etc.)
-
getDesignDocument
public CompletableFuture<DesignDocument> getDesignDocument(String name, DesignDocumentNamespace namespace) Returns the named design document from the specified namespace.- Parameters:
name
- name of the design document to retrievenamespace
- namespace to look in- Throws:
DesignDocumentNotFoundException
- if the namespace does not contain a document with the given name
-
getDesignDocument
public CompletableFuture<DesignDocument> getDesignDocument(String name, DesignDocumentNamespace namespace, GetDesignDocumentOptions options) Returns the named design document from the specified namespace.- Parameters:
name
- name of the design document to retrievenamespace
- namespace to look inoptions
- additional optional arguments (timeout, retry, etc.)- Throws:
DesignDocumentNotFoundException
- if the namespace does not contain a document with the given name
-
upsertDesignDocument
public CompletableFuture<Void> upsertDesignDocument(DesignDocument doc, DesignDocumentNamespace namespace) Stores the design document on the server under the specified namespace, replacing any existing document with the same name.- Parameters:
doc
- document to storenamespace
- namespace to store it in
-
upsertDesignDocument
public CompletableFuture<Void> upsertDesignDocument(DesignDocument doc, DesignDocumentNamespace namespace, UpsertDesignDocumentOptions options) Stores the design document on the server under the specified namespace, replacing any existing document with the same name.- Parameters:
doc
- document to storenamespace
- namespace to store it inoptions
- additional optional arguments (timeout, retry, etc.)
-
publishDesignDocument
Convenience method that gets a the document from the development namespace and upserts it to the production namespace.- Parameters:
name
- name of the development design document- Throws:
DesignDocumentNotFoundException
- if the development namespace does not contain a document with the given name
-
publishDesignDocument
public CompletableFuture<Void> publishDesignDocument(String name, PublishDesignDocumentOptions options) Convenience method that gets a the document from the development namespace and upserts it to the production namespace.- Parameters:
name
- name of the development design documentoptions
- additional optional arguments (timeout, retry, etc.)- Throws:
DesignDocumentNotFoundException
- if the development namespace does not contain a document with the given name
-
dropDesignDocument
Removes a design document from the server.- Parameters:
name
- name of the document to removenamespace
- namespace to remove it from- Throws:
DesignDocumentNotFoundException
- if the namespace does not contain a document with the given name
-
dropDesignDocument
public CompletableFuture<Void> dropDesignDocument(String name, DesignDocumentNamespace namespace, DropDesignDocumentOptions options) Removes a design document from the server.- Parameters:
name
- name of the document to removenamespace
- namespace to remove it fromoptions
- additional optional arguments (timeout, retry, etc.)- Throws:
DesignDocumentNotFoundException
- if the namespace does not contain a document with the given name
-