Class CoreViewIndexManager
java.lang.Object
com.couchbase.client.core.manager.CoreViewIndexManager
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Core
protected final CoreHttpClient
protected final CoreHttpClient
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondropDesignDocument
(String name, boolean production, CoreCommonOptions options) Removes a design document from the server.CompletableFuture
<Map<String, com.couchbase.client.core.deps.com.fasterxml.jackson.databind.node.ObjectNode>> getAllDesignDocuments
(boolean production, CoreCommonOptions options) Returns map of design doc name to JSON.CompletableFuture
<byte[]> getDesignDocument
(String name, boolean production, CoreCommonOptions options) Returns the named design document from the specified namespace.publishDesignDocument
(String name, CoreCommonOptions options) Convenience method that gets a the document from the development namespace and upserts it to the production namespace.static String
requireUnqualifiedName
(String name) upsertDesignDocument
(String docName, byte[] doc, boolean production, CoreCommonOptions options) Stores the design document on the server under the specified namespace, replacing any existing document with the same name.
-
Field Details
-
core
-
viewService
-
managerService
-
-
Constructor Details
-
CoreViewIndexManager
-
-
Method Details
-
requireUnqualifiedName
-
getAllDesignDocuments
public CompletableFuture<Map<String,com.couchbase.client.core.deps.com.fasterxml.jackson.databind.node.ObjectNode>> getAllDesignDocuments(boolean production, CoreCommonOptions options) Returns map of design doc name to JSON.JSON structure is same as returned by
getDesignDocument(java.lang.String, boolean, com.couchbase.client.core.endpoint.http.CoreCommonOptions)
. -
getDesignDocument
public CompletableFuture<byte[]> getDesignDocument(String name, boolean production, CoreCommonOptions options) Returns the named design document from the specified namespace.- Parameters:
name
- name of the design document to retrieve- Throws:
DesignDocumentNotFoundException
- if the namespace does not contain a document with the given name
-
upsertDesignDocument
public CompletableFuture<Void> upsertDesignDocument(String docName, byte[] doc, boolean production, CoreCommonOptions options) Stores the design document on the server under the specified namespace, replacing any existing document with the same name.- Parameters:
doc
- document to store
-
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
-
dropDesignDocument
public CompletableFuture<Void> dropDesignDocument(String name, boolean production, CoreCommonOptions options) Removes a design document from the server.- Parameters:
name
- name of the document to remove- Throws:
DesignDocumentNotFoundException
- if the namespace does not contain a document with the given name
-