Interface BranchHandle
-
Method Summary
Modifier and TypeMethodDescriptionReturns the branch id for which this handle should return variants.getDraft()
Returns the draft variant for the branch returned bygetBranchId()
ornull
if there is no draft node for the branchReturns the published variant for the branch returned bygetBranchId()
ornull
if there is no published node for the branchTries to return the published master node for thisBranchHandle
ornull
if there is no master published.Returns the unpublished variant for the branch returned bygetBranchId()
ornull
if there is no unpublished node for the branchboolean
boolean
isMaster()
Returns true if this branch handle's branchId is masterboolean
Returnstrue
if the lastModifiedDate ofgetPublished()
is not equal that ofgetUnpublished()
getPublished()
availability is not live or null andgetUnpublished()
is not null andfalse
otherwise.boolean
-
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 returnnull
except possibly forgetPublishedMaster()
- Returns:
- branch id of this handle.
-
getPublished
Node getPublished()Returns the published variant for the branch returned by
getBranchId()
ornull
if there is no published node for the branchThe 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()
ornull
if there is no unpublished node for the branchThe 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()
ornull
if there is no draft node for the branchThe 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
ornull
if there is no master published. The returned node can be a node from version history- Returns:
- the published master node for this
BranchHandle
ornull
if there is no such node
-
isModified
boolean isModified()Returnstrue
if- the lastModifiedDate of
getPublished()
is not equal that ofgetUnpublished()
getPublished()
availability is not live or null andgetUnpublished()
is not null
false
otherwise.- Returns:
- whether the document is modified or not
- the lastModifiedDate of
-
isMaster
boolean isMaster()Returns true if this branch handle's branchId is master- Returns:
- if the handle is for master
-
isLiveAvailable
boolean isLiveAvailable()- Returns:
- if the published variant exists and is live
-
isPreviewAvailable
boolean isPreviewAvailable()- Returns:
true
if there is a variant forgetBranchId()
that exists and has availability preview
-