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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getBranchId()
Returns the branch id for which this handle should return variants.javax.jcr.Node
getDraft()
Returns the draft variant for the branch returned bygetBranchId()
ornull
if there is no draft node for the branchjavax.jcr.Node
getPublished()
Returns the published variant for the branch returned bygetBranchId()
ornull
if there is no published node for the branchjavax.jcr.Node
getPublishedMaster()
Tries to return the published master node for thisBranchHandle
ornull
if there is no master published.javax.jcr.Node
getUnpublished()
Returns the unpublished variant for the branch returned bygetBranchId()
ornull
if there is no unpublished node for the branchboolean
isLiveAvailable()
boolean
isMaster()
Returns true if this branch handle's branchId is masterboolean
isModified()
Returnstrue
if the lastModifiedDate ofgetPublished()
is not equal that ofgetUnpublished()
getPublished()
availability is not live or null andgetUnpublished()
is not null andfalse
otherwise.boolean
isPreviewAvailable()
-
-
-
Method Detail
-
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
javax.jcr.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
javax.jcr.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
javax.jcr.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
javax.jcr.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
-
-