@Stability.Internal public class CoreViewIndexManager extends Object
Modifier and Type | Field and Description |
---|---|
protected Core |
core |
protected CoreHttpClient |
managerService |
protected CoreHttpClient |
viewService |
Constructor and Description |
---|
CoreViewIndexManager(Core core,
String bucket) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
dropDesignDocument(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.
|
CompletableFuture<Void> |
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) |
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.
|
protected final Core core
protected final CoreHttpClient viewService
protected final CoreHttpClient managerService
public CompletableFuture<Map<String,com.couchbase.client.core.deps.com.fasterxml.jackson.databind.node.ObjectNode>> getAllDesignDocuments(boolean production, CoreCommonOptions options)
JSON structure is same as returned by getDesignDocument(java.lang.String, boolean, com.couchbase.client.core.endpoint.http.CoreCommonOptions)
.
public CompletableFuture<byte[]> getDesignDocument(String name, boolean production, CoreCommonOptions options)
name
- name of the design document to retrieveDesignDocumentNotFoundException
- if the namespace does not contain a document with the given namepublic CompletableFuture<Void> upsertDesignDocument(String docName, byte[] doc, boolean production, CoreCommonOptions options)
doc
- document to storepublic CompletableFuture<Void> publishDesignDocument(String name, CoreCommonOptions options)
name
- name of the development design documentDesignDocumentNotFoundException
- if the development namespace does not contain a document with the given namepublic CompletableFuture<Void> dropDesignDocument(String name, boolean production, CoreCommonOptions options)
name
- name of the document to removeDesignDocumentNotFoundException
- if the namespace does not contain a document with the given nameCopyright © 2024 Couchbase, Inc.. All rights reserved.