Class Document.Builder

  • Enclosing class:
    Document

    public static class Document.Builder
    extends Object
    Builder.
    • Constructor Detail

      • Builder

        public Builder()
        Instantiates a new builder.
    • Method Detail

      • build

        public Document build()
        Builds a Document.
        Returns:
        the new Document instance
      • addConflicts

        public Document.Builder addConflicts​(String conflicts)
        Adds an conflicts to conflicts.
        Parameters:
        conflicts - the new conflicts
        Returns:
        the Document builder
      • addDeletedConflicts

        public Document.Builder addDeletedConflicts​(String deletedConflicts)
        Adds an deletedConflicts to deletedConflicts.
        Parameters:
        deletedConflicts - the new deletedConflicts
        Returns:
        the Document builder
      • attachments

        public Document.Builder attachments​(Map<String,​Attachment> attachments)
        Set the attachments.
        Parameters:
        attachments - the attachments
        Returns:
        the Document builder
      • conflicts

        public Document.Builder conflicts​(List<String> conflicts)
        Set the conflicts. Existing conflicts will be replaced.
        Parameters:
        conflicts - the conflicts
        Returns:
        the Document builder
      • deleted

        public Document.Builder deleted​(Boolean deleted)
        Set the deleted.
        Parameters:
        deleted - the deleted
        Returns:
        the Document builder
      • deletedConflicts

        public Document.Builder deletedConflicts​(List<String> deletedConflicts)
        Set the deletedConflicts. Existing deletedConflicts will be replaced.
        Parameters:
        deletedConflicts - the deletedConflicts
        Returns:
        the Document builder
      • id

        public Document.Builder id​(String id)
        Set the id.
        Parameters:
        id - the id
        Returns:
        the Document builder
      • localSeq

        public Document.Builder localSeq​(String localSeq)
        Set the localSeq.
        Parameters:
        localSeq - the localSeq
        Returns:
        the Document builder
      • rev

        public Document.Builder rev​(String rev)
        Set the rev.
        Parameters:
        rev - the rev
        Returns:
        the Document builder
      • revisions

        public Document.Builder revisions​(Revisions revisions)
        Set the revisions.
        Parameters:
        revisions - the revisions
        Returns:
        the Document builder
      • add

        public Document.Builder add​(String name,
                                    Object value)
        Add an arbitrary property.
        Parameters:
        name - the name of the property to add
        value - the value of the property to add
        Returns:
        the Document builder