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, 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, updateaccept, getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isNode, isSame, refresh, remove, savepublic 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 VersionHistoryRepositoryExceptionpublic String getVersionableIdentifier() throws RepositoryException
getVersionableIdentifier in interface VersionHistoryRepositoryExceptionpublic Version getRootVersion() throws RepositoryException
getRootVersion in interface VersionHistoryRepositoryExceptionpublic VersionIterator getAllLinearVersions() throws RepositoryException
getAllLinearVersions in interface VersionHistoryRepositoryExceptionpublic VersionIterator getAllVersions() throws RepositoryException
getAllVersions in interface VersionHistoryRepositoryExceptionpublic NodeIterator getAllLinearFrozenNodes() throws RepositoryException
getAllLinearFrozenNodes in interface VersionHistoryRepositoryExceptionpublic NodeIterator getAllFrozenNodes() throws RepositoryException
getAllFrozenNodes in interface VersionHistoryRepositoryExceptionpublic Version getVersion(String versionName) throws VersionException, RepositoryException
getVersion in interface VersionHistoryVersionExceptionRepositoryExceptionpublic Version getVersionByLabel(String label) throws VersionException, RepositoryException
getVersionByLabel in interface VersionHistoryVersionExceptionRepositoryExceptionpublic void addVersionLabel(String versionName, String label, boolean moveLabel) throws LabelExistsVersionException, VersionException, RepositoryException
addVersionLabel in interface VersionHistoryLabelExistsVersionExceptionVersionExceptionRepositoryExceptionpublic void removeVersionLabel(String label) throws VersionException, RepositoryException
removeVersionLabel in interface VersionHistoryVersionExceptionRepositoryExceptionpublic boolean hasVersionLabel(String label) throws RepositoryException
hasVersionLabel in interface VersionHistoryRepositoryExceptionpublic boolean hasVersionLabel(Version version, String label) throws VersionException, RepositoryException
hasVersionLabel in interface VersionHistoryVersionExceptionRepositoryExceptionpublic String[] getVersionLabels() throws RepositoryException
getVersionLabels in interface VersionHistoryRepositoryExceptionpublic String[] getVersionLabels(Version version) throws VersionException, RepositoryException
getVersionLabels in interface VersionHistoryVersionExceptionRepositoryExceptionpublic void removeVersion(String versionName) throws ReferentialIntegrityException, AccessDeniedException, UnsupportedRepositoryOperationException, VersionException, RepositoryException
removeVersion in interface VersionHistoryReferentialIntegrityExceptionAccessDeniedExceptionUnsupportedRepositoryOperationExceptionVersionExceptionRepositoryException@Nonnull protected final <U> U perform(@Nonnull SessionOperation<U> op) throws RepositoryException
SessionOperation.U - return type of the operationop - operation to performop.perform()RepositoryException - as thrown by op.perform().@Nonnull public String getName() throws RepositoryException
getName in interface ItemRepositoryExceptionItem.getName()@Nonnull public String getPath() throws RepositoryException
getPath in interface ItemRepositoryExceptionItem.getPath()@Nonnull public Session getSession()
getSession in interface Itempublic Item getAncestor(int depth) throws RepositoryException
getAncestor in interface ItemRepositoryExceptionpublic int getDepth()
throws RepositoryException
getDepth in interface ItemRepositoryExceptionpublic boolean isSame(Item otherItem) throws RepositoryException
isSame in interface ItemRepositoryExceptionItem.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
UnsupportedRepositoryOperationExceptionsave in interface ItemRepositoryExceptionItem.save()public void refresh(boolean keepChanges)
throws RepositoryException
refresh in interface ItemRepositoryExceptionItem.refresh(boolean)@Nonnull protected org.apache.jackrabbit.oak.api.PropertyState createSingleState(String oakName, Value value, org.apache.jackrabbit.oak.api.Type<?> type) throws RepositoryException
RepositoryException@Nonnull protected org.apache.jackrabbit.oak.api.PropertyState createMultiState(String oakName, List<Value> values, org.apache.jackrabbit.oak.api.Type<?> type) throws RepositoryException
RepositoryExceptionCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.