Interface BranchHandle


public interface BranchHandle
Contains nodes of document variants from either nodes under handle or from version history based on the branchId and the document handle.
  • Method Details

    • getBranchId

      String getBranchId()
      Returns the branch id for which this handle should return variants. Note that if it is a non-existent branchId the variant getter methods will all return null except possibly for getPublishedMaster()
      Returns:
      branch id of this handle.
    • getPublished

      Node getPublished()

      Returns the published variant for the branch returned by getBranchId() or null if there is no published node for the branch

      The returned node can be either a variant below the handle but can also be a versioned history node corresponding to the branch for getBranchId()

      Returns:
      published variant
    • getUnpublished

      Node getUnpublished()

      Returns the unpublished variant for the branch returned by getBranchId() or null if there is no unpublished node for the branch

      The returned node can be either a variant below the handle but can also be a versioned history node corresponding to the branch for getBranchId()

      Returns:
      unpublished variant
    • getDraft

      Node getDraft()

      Returns the draft variant for the branch returned by getBranchId() or null if there is no draft node for the branch

      The returned node can be either a variant below the handle but can also be a versioned history node corresponding to the branch for getBranchId()

      Returns:
      draft variant
    • getPublishedMaster

      Node getPublishedMaster()

      Tries to return the published master node for this BranchHandle or null if there is no master published. The returned node can be a node from version history

      Returns:
      the published master node for this BranchHandle or null if there is no such node
    • isModified

      boolean isModified()
      Returns true if and false otherwise.
      Returns:
      whether the document is modified or not
    • isMaster

      boolean isMaster()
      Returns true if this branch handle's branchId is master
      Returns:
      if the handle is for master
    • isLiveAvailable

      boolean isLiveAvailable()
      Returns true if the published variant for getBranchId() exists and is live, false otherwise.
      Returns:
      if the published variant exists and is live
    • isPreviewAvailable

      boolean isPreviewAvailable()
      Returns:
      true if there is a variant for getBranchId() that exists and has availability preview