Class AsyncViewIndexManager
- java.lang.Object
-
- com.couchbase.client.java.manager.view.AsyncViewIndexManager
-
public class AsyncViewIndexManager extends Object
-
-
Constructor Summary
Constructors Constructor Description AsyncViewIndexManager(Core core, String bucket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Void>dropDesignDocument(String name, DesignDocumentNamespace namespace)Removes a design document from the server.CompletableFuture<Void>dropDesignDocument(String name, DesignDocumentNamespace namespace, DropDesignDocumentOptions options)Removes a design document from the server.CompletableFuture<List<DesignDocument>>getAllDesignDocuments(DesignDocumentNamespace namespace)Returns all of the design documents in the specified namespace.CompletableFuture<List<DesignDocument>>getAllDesignDocuments(DesignDocumentNamespace namespace, GetAllDesignDocumentsOptions options)Returns all of the design documents in the specified namespace.CompletableFuture<DesignDocument>getDesignDocument(String name, DesignDocumentNamespace namespace)Returns the named design document from the specified namespace.CompletableFuture<DesignDocument>getDesignDocument(String name, DesignDocumentNamespace namespace, GetDesignDocumentOptions options)Returns the named design document from the specified namespace.CompletableFuture<Void>publishDesignDocument(String name)Convenience method that gets a the document from the development namespace and upserts it to the production namespace.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.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.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.
-
-
-
Method Detail
-
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
public CompletableFuture<Void> publishDesignDocument(String name)
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
public CompletableFuture<Void> dropDesignDocument(String name, DesignDocumentNamespace namespace)
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
-
-