public class VersionHistoryImpl extends NodeImpl<VersionHistoryDelegate> implements VersionHistory
VersionHistoryImpl
...Modifier and Type | Field and Description |
---|---|
protected T |
dlg |
static String |
ITEM_SAVE_DOES_SESSION_SAVE |
static int |
MV_PROPERTY_WARN_THRESHOLD |
static boolean |
SAVE_SESSION
The value of this flag determines the behaviour of
save() . |
protected SessionContext |
sessionContext |
protected SessionDelegate |
sessionDelegate |
JCR_CHILD_NODE_DEFINITION, JCR_CONTENT, JCR_FROZEN_NODE, JCR_PROPERTY_DEFINITION, JCR_ROOT_VERSION, JCR_VERSION_LABELS
Constructor and Description |
---|
VersionHistoryImpl(VersionHistoryDelegate dlg,
SessionContext sessionContext) |
accept, addMixin, addNode, addNode, canAddMixin, cancelMerge, checkin, checkout, createNode, createNodeOrNull, doneMerge, followLifecycleTransition, getAllowedLifecycleTransistions, getBaseVersion, getCorrespondingNodePath, getDefinition, getIdentifier, getIndex, getLock, getMixinNodeTypes, getNode, getNodes, getNodes, getNodes, getParent, getPrimaryItem, getPrimaryNodeType, getProperties, getProperties, getProperties, getProperty, getReferences, getReferences, getSharedSet, getUUID, getVersionHistory, getWeakReferences, getWeakReferences, hasNode, hasNodes, hasProperties, hasProperty, holdsLock, isCheckedOut, isLocked, isModified, isNew, isNode, isNodeType, lock, merge, orderBefore, remove, removeMixin, removeShare, removeSharedSet, rename, restore, restore, restore, restoreByLabel, setMixins, setPrimaryType, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, unlock, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addMixin, addNode, addNode, canAddMixin, cancelMerge, checkin, checkout, doneMerge, followLifecycleTransition, getAllowedLifecycleTransistions, getBaseVersion, getCorrespondingNodePath, getDefinition, getIdentifier, getIndex, getLock, getMixinNodeTypes, getNode, getNodes, getNodes, getNodes, getPrimaryItem, getPrimaryNodeType, getProperties, getProperties, getProperties, getProperty, getReferences, getReferences, getSharedSet, getUUID, getVersionHistory, getWeakReferences, getWeakReferences, hasNode, hasNodes, hasProperties, hasProperty, holdsLock, isCheckedOut, isLocked, isNodeType, lock, merge, orderBefore, removeMixin, removeShare, removeSharedSet, restore, restore, restore, restoreByLabel, setPrimaryType, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, unlock, update
accept, getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isNode, isSame, refresh, remove, save
public static final String ITEM_SAVE_DOES_SESSION_SAVE
public static final int MV_PROPERTY_WARN_THRESHOLD
public static final boolean SAVE_SESSION
save()
. If false
,
save will throw a UnsupportedRepositoryOperationException
if the
sub tree rooted at this item does not contain all transient changes. If
true
, save will delegate to Session.save()
.protected final SessionContext sessionContext
protected final T extends ItemDelegate dlg
protected final SessionDelegate sessionDelegate
public VersionHistoryImpl(VersionHistoryDelegate dlg, SessionContext sessionContext)
public String getVersionableUUID() throws RepositoryException
getVersionableUUID
in interface VersionHistory
RepositoryException
public String getVersionableIdentifier() throws RepositoryException
getVersionableIdentifier
in interface VersionHistory
RepositoryException
public Version getRootVersion() throws RepositoryException
getRootVersion
in interface VersionHistory
RepositoryException
public VersionIterator getAllLinearVersions() throws RepositoryException
getAllLinearVersions
in interface VersionHistory
RepositoryException
public VersionIterator getAllVersions() throws RepositoryException
getAllVersions
in interface VersionHistory
RepositoryException
public NodeIterator getAllLinearFrozenNodes() throws RepositoryException
getAllLinearFrozenNodes
in interface VersionHistory
RepositoryException
public NodeIterator getAllFrozenNodes() throws RepositoryException
getAllFrozenNodes
in interface VersionHistory
RepositoryException
public Version getVersion(String versionName) throws VersionException, RepositoryException
getVersion
in interface VersionHistory
VersionException
RepositoryException
public Version getVersionByLabel(String label) throws VersionException, RepositoryException
getVersionByLabel
in interface VersionHistory
VersionException
RepositoryException
public void addVersionLabel(String versionName, String label, boolean moveLabel) throws LabelExistsVersionException, VersionException, RepositoryException
addVersionLabel
in interface VersionHistory
LabelExistsVersionException
VersionException
RepositoryException
public void removeVersionLabel(String label) throws VersionException, RepositoryException
removeVersionLabel
in interface VersionHistory
VersionException
RepositoryException
public boolean hasVersionLabel(String label) throws RepositoryException
hasVersionLabel
in interface VersionHistory
RepositoryException
public boolean hasVersionLabel(Version version, String label) throws VersionException, RepositoryException
hasVersionLabel
in interface VersionHistory
VersionException
RepositoryException
public String[] getVersionLabels() throws RepositoryException
getVersionLabels
in interface VersionHistory
RepositoryException
public String[] getVersionLabels(Version version) throws VersionException, RepositoryException
getVersionLabels
in interface VersionHistory
VersionException
RepositoryException
public void removeVersion(String versionName) throws ReferentialIntegrityException, AccessDeniedException, UnsupportedRepositoryOperationException, VersionException, RepositoryException
removeVersion
in interface VersionHistory
ReferentialIntegrityException
AccessDeniedException
UnsupportedRepositoryOperationException
VersionException
RepositoryException
@NotNull protected final <U> U perform(@NotNull @NotNull SessionOperation<U> op) throws RepositoryException
SessionOperation
.U
- return type of the operationop
- operation to performop.perform()
RepositoryException
- as thrown by op.perform()
.@NotNull public @NotNull String getName() throws RepositoryException
getName
in interface Item
RepositoryException
Item.getName()
@NotNull public @NotNull String getPath() throws RepositoryException
getPath
in interface Item
RepositoryException
Item.getPath()
@NotNull public @NotNull Session getSession()
getSession
in interface Item
public Item getAncestor(int depth) throws RepositoryException
getAncestor
in interface Item
RepositoryException
public int getDepth() throws RepositoryException
getDepth
in interface Item
RepositoryException
public boolean isSame(Item otherItem) throws RepositoryException
isSame
in interface Item
RepositoryException
Item.isSame(javax.jcr.Item)
public void save() throws RepositoryException
Session.save()
if SAVE_SESSION
is
true
. Otherwise it only performs the save if the subtree rooted at this item contains
all transient changes. That is, if calling Session.save()
would have the same effect
as calling this method. In all other cases this method will throw an
UnsupportedRepositoryOperationException
save
in interface Item
RepositoryException
Item.save()
public void refresh(boolean keepChanges) throws RepositoryException
refresh
in interface Item
RepositoryException
Item.refresh(boolean)
@NotNull protected @NotNull org.apache.jackrabbit.oak.api.PropertyState createSingleState(String oakName, Value value, org.apache.jackrabbit.oak.api.Type<?> type) throws RepositoryException
RepositoryException
@NotNull protected @NotNull org.apache.jackrabbit.oak.api.PropertyState createMultiState(String oakName, List<Value> values, org.apache.jackrabbit.oak.api.Type<?> type) throws RepositoryException
RepositoryException
Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.