Class ViewIndexManager

java.lang.Object
com.couchbase.client.java.manager.view.ViewIndexManager

public class ViewIndexManager extends Object
  • Constructor Details Link icon

  • Method Details Link icon

    • async Link icon

      public AsyncViewIndexManager async()
    • getDesignDocument Link icon

      public DesignDocument getDesignDocument(String name, DesignDocumentNamespace namespace)
      Returns the design document from the cluster if present.
      Parameters:
      name - name of the design document to retrieve.
      namespace - namespace to look in.
      Throws:
      DesignDocumentNotFoundException - if there is no design document with the given name present.
      TimeoutException - if the operation times out before getting a result.
      CouchbaseException - for all other error reasons (acts as a base type and catch-all).
    • getDesignDocument Link icon

      public DesignDocument getDesignDocument(String name, DesignDocumentNamespace namespace, GetDesignDocumentOptions options)
      Returns the design document from the cluster if present with custom options.
      Parameters:
      name - name of the design document to retrieve
      namespace - namespace to look in
      options - additional optional arguments (timeout, retry, etc.)
      Throws:
      DesignDocumentNotFoundException - if there is no design document with the given name present.
      TimeoutException - if the operation times out before getting a result.
      CouchbaseException - for all other error reasons (acts as a base type and catch-all).
    • upsertDesignDocument Link icon

      public void upsertDesignDocument(DesignDocument designDocument, DesignDocumentNamespace namespace)
      Stores the design document on the server under the specified namespace, replacing any existing document with the same name.
      Parameters:
      designDocument - document to store
      namespace - namespace to store it in
      Throws:
      TimeoutException - if the operation times out before getting a result.
      CouchbaseException - for all other error reasons (acts as a base type and catch-all).
    • upsertDesignDocument Link icon

      public void upsertDesignDocument(DesignDocument designDocument, DesignDocumentNamespace namespace, UpsertDesignDocumentOptions options)
      Stores the design document on the server under the specified namespace, replacing any existing document with the same name.
      Parameters:
      designDocument - document to store
      namespace - namespace to store it in
      options - additional optional arguments (timeout, retry, etc.)
      Throws:
      TimeoutException - if the operation times out before getting a result.
      CouchbaseException - for all other error reasons (acts as a base type and catch-all).
    • publishDesignDocument Link icon

      public 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
      TimeoutException - if the operation times out before getting a result.
      CouchbaseException - for all other error reasons (acts as a base type and catch-all).
    • publishDesignDocument Link icon

      public 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 document
      options - additional optional arguments (timeout, retry, etc.)
      Throws:
      DesignDocumentNotFoundException - if the development namespace does not contain a document with the given name
      TimeoutException - if the operation times out before getting a result.
      CouchbaseException - for all other error reasons (acts as a base type and catch-all).
    • dropDesignDocument Link icon

      public void dropDesignDocument(String name, DesignDocumentNamespace namespace)
      Removes a design document from the server.
      Parameters:
      name - name of the document to remove
      namespace - namespace to remove it from
      Throws:
      DesignDocumentNotFoundException - if the namespace does not contain a document with the given name
      TimeoutException - if the operation times out before getting a result.
      CouchbaseException - for all other error reasons (acts as a base type and catch-all).
    • dropDesignDocument Link icon

      public void dropDesignDocument(String name, DesignDocumentNamespace namespace, DropDesignDocumentOptions options)
      Removes a design document from the server.
      Parameters:
      name - name of the document to remove
      namespace - namespace to remove it from
      options - additional optional arguments (timeout, retry, etc.)
      Throws:
      DesignDocumentNotFoundException - if the namespace does not contain a document with the given name
      TimeoutException - if the operation times out before getting a result.
      CouchbaseException - for all other error reasons (acts as a base type and catch-all).
    • getAllDesignDocuments Link icon

      public List<DesignDocument> getAllDesignDocuments(DesignDocumentNamespace namespace)
      Returns all of the design documents in the specified namespace.
      Parameters:
      namespace - namespace to query
      Throws:
      TimeoutException - if the operation times out before getting a result.
      CouchbaseException - for all other error reasons (acts as a base type and catch-all).
    • getAllDesignDocuments Link icon

      public List<DesignDocument> getAllDesignDocuments(DesignDocumentNamespace namespace, GetAllDesignDocumentsOptions options)
      Returns all of the design documents in the specified namespace.
      Parameters:
      namespace - namespace to query
      options - additional optional arguments (timeout, retry, etc.)
      Throws:
      TimeoutException - if the operation times out before getting a result.
      CouchbaseException - for all other error reasons (acts as a base type and catch-all).