public class VersionHistoryImpl extends NodeImpl<VersionHistoryDelegate> implements javax.jcr.version.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 |
| Constructor and Description |
|---|
VersionHistoryImpl(VersionHistoryDelegate dlg,
SessionContext sessionContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addVersionLabel(String versionName,
String label,
boolean moveLabel) |
protected org.apache.jackrabbit.oak.api.PropertyState |
createMultiState(String oakName,
List<javax.jcr.Value> values,
org.apache.jackrabbit.oak.api.Type<?> type) |
protected org.apache.jackrabbit.oak.api.PropertyState |
createSingleState(String oakName,
javax.jcr.Value value,
org.apache.jackrabbit.oak.api.Type<?> type) |
javax.jcr.NodeIterator |
getAllFrozenNodes() |
javax.jcr.NodeIterator |
getAllLinearFrozenNodes() |
javax.jcr.version.VersionIterator |
getAllLinearVersions() |
javax.jcr.version.VersionIterator |
getAllVersions() |
javax.jcr.Item |
getAncestor(int depth) |
int |
getDepth() |
String |
getName() |
String |
getPath() |
javax.jcr.version.Version |
getRootVersion() |
javax.jcr.Session |
getSession() |
javax.jcr.version.Version |
getVersion(String versionName) |
String |
getVersionableIdentifier() |
String |
getVersionableUUID() |
javax.jcr.version.Version |
getVersionByLabel(String label) |
String[] |
getVersionLabels() |
String[] |
getVersionLabels(javax.jcr.version.Version version) |
boolean |
hasVersionLabel(String label) |
boolean |
hasVersionLabel(javax.jcr.version.Version version,
String label) |
boolean |
isSame(javax.jcr.Item otherItem) |
protected <U> U |
perform(SessionOperation<U> op)
Perform the passed
SessionOperation. |
void |
refresh(boolean keepChanges) |
void |
removeVersion(String versionName) |
void |
removeVersionLabel(String label) |
void |
save()
|
String |
toString() |
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, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddMixin, 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, updatepublic 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 javax.jcr.RepositoryException
getVersionableUUID in interface javax.jcr.version.VersionHistoryjavax.jcr.RepositoryExceptionpublic String getVersionableIdentifier() throws javax.jcr.RepositoryException
getVersionableIdentifier in interface javax.jcr.version.VersionHistoryjavax.jcr.RepositoryExceptionpublic javax.jcr.version.Version getRootVersion()
throws javax.jcr.RepositoryException
getRootVersion in interface javax.jcr.version.VersionHistoryjavax.jcr.RepositoryExceptionpublic javax.jcr.version.VersionIterator getAllLinearVersions()
throws javax.jcr.RepositoryException
getAllLinearVersions in interface javax.jcr.version.VersionHistoryjavax.jcr.RepositoryExceptionpublic javax.jcr.version.VersionIterator getAllVersions()
throws javax.jcr.RepositoryException
getAllVersions in interface javax.jcr.version.VersionHistoryjavax.jcr.RepositoryExceptionpublic javax.jcr.NodeIterator getAllLinearFrozenNodes()
throws javax.jcr.RepositoryException
getAllLinearFrozenNodes in interface javax.jcr.version.VersionHistoryjavax.jcr.RepositoryExceptionpublic javax.jcr.NodeIterator getAllFrozenNodes()
throws javax.jcr.RepositoryException
getAllFrozenNodes in interface javax.jcr.version.VersionHistoryjavax.jcr.RepositoryExceptionpublic javax.jcr.version.Version getVersion(String versionName) throws javax.jcr.version.VersionException, javax.jcr.RepositoryException
getVersion in interface javax.jcr.version.VersionHistoryjavax.jcr.version.VersionExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.version.Version getVersionByLabel(String label) throws javax.jcr.version.VersionException, javax.jcr.RepositoryException
getVersionByLabel in interface javax.jcr.version.VersionHistoryjavax.jcr.version.VersionExceptionjavax.jcr.RepositoryExceptionpublic void addVersionLabel(String versionName, String label, boolean moveLabel) throws javax.jcr.version.LabelExistsVersionException, javax.jcr.version.VersionException, javax.jcr.RepositoryException
addVersionLabel in interface javax.jcr.version.VersionHistoryjavax.jcr.version.LabelExistsVersionExceptionjavax.jcr.version.VersionExceptionjavax.jcr.RepositoryExceptionpublic void removeVersionLabel(String label) throws javax.jcr.version.VersionException, javax.jcr.RepositoryException
removeVersionLabel in interface javax.jcr.version.VersionHistoryjavax.jcr.version.VersionExceptionjavax.jcr.RepositoryExceptionpublic boolean hasVersionLabel(String label) throws javax.jcr.RepositoryException
hasVersionLabel in interface javax.jcr.version.VersionHistoryjavax.jcr.RepositoryExceptionpublic boolean hasVersionLabel(javax.jcr.version.Version version,
String label)
throws javax.jcr.version.VersionException,
javax.jcr.RepositoryException
hasVersionLabel in interface javax.jcr.version.VersionHistoryjavax.jcr.version.VersionExceptionjavax.jcr.RepositoryExceptionpublic String[] getVersionLabels() throws javax.jcr.RepositoryException
getVersionLabels in interface javax.jcr.version.VersionHistoryjavax.jcr.RepositoryExceptionpublic String[] getVersionLabels(javax.jcr.version.Version version) throws javax.jcr.version.VersionException, javax.jcr.RepositoryException
getVersionLabels in interface javax.jcr.version.VersionHistoryjavax.jcr.version.VersionExceptionjavax.jcr.RepositoryExceptionpublic void removeVersion(String versionName) throws javax.jcr.ReferentialIntegrityException, javax.jcr.AccessDeniedException, javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.version.VersionException, javax.jcr.RepositoryException
removeVersion in interface javax.jcr.version.VersionHistoryjavax.jcr.ReferentialIntegrityExceptionjavax.jcr.AccessDeniedExceptionjavax.jcr.UnsupportedRepositoryOperationExceptionjavax.jcr.version.VersionExceptionjavax.jcr.RepositoryException@Nonnull protected final <U> U perform(@Nonnull SessionOperation<U> op) throws javax.jcr.RepositoryException
SessionOperation.U - return type of the operationop - operation to performop.perform()javax.jcr.RepositoryException - as thrown by op.perform().@Nonnull public String getName() throws javax.jcr.RepositoryException
getName in interface javax.jcr.Itemjavax.jcr.RepositoryExceptionItem.getName()@Nonnull public String getPath() throws javax.jcr.RepositoryException
getPath in interface javax.jcr.Itemjavax.jcr.RepositoryExceptionItem.getPath()@Nonnull public javax.jcr.Session getSession()
getSession in interface javax.jcr.Itempublic javax.jcr.Item getAncestor(int depth)
throws javax.jcr.RepositoryException
getAncestor in interface javax.jcr.Itemjavax.jcr.RepositoryExceptionpublic int getDepth()
throws javax.jcr.RepositoryException
getDepth in interface javax.jcr.Itemjavax.jcr.RepositoryExceptionpublic boolean isSame(javax.jcr.Item otherItem)
throws javax.jcr.RepositoryException
isSame in interface javax.jcr.Itemjavax.jcr.RepositoryExceptionItem.isSame(javax.jcr.Item)public void save()
throws javax.jcr.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
UnsupportedRepositoryOperationExceptionsave in interface javax.jcr.Itemjavax.jcr.RepositoryExceptionItem.save()public void refresh(boolean keepChanges)
throws javax.jcr.RepositoryException
refresh in interface javax.jcr.Itemjavax.jcr.RepositoryExceptionItem.refresh(boolean)@Nonnull protected org.apache.jackrabbit.oak.api.PropertyState createSingleState(String oakName, javax.jcr.Value value, org.apache.jackrabbit.oak.api.Type<?> type) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException@Nonnull protected org.apache.jackrabbit.oak.api.PropertyState createMultiState(String oakName, List<javax.jcr.Value> values, org.apache.jackrabbit.oak.api.Type<?> type) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionCopyright © 2012-2019 The Apache Software Foundation. All Rights Reserved.