|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.oak.jcr.session.NodeImpl<VersionDelegate> org.apache.jackrabbit.oak.jcr.version.VersionImpl
public class VersionImpl
Field Summary | |
---|---|
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
|
Fields inherited from interface javax.jcr.Node |
---|
JCR_CHILD_NODE_DEFINITION, JCR_CONTENT, JCR_FROZEN_NODE, JCR_PROPERTY_DEFINITION, JCR_ROOT_VERSION, JCR_VERSION_LABELS |
Constructor Summary | |
---|---|
VersionImpl(VersionDelegate dlg,
SessionContext sessionContext)
|
Method Summary | ||
---|---|---|
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.Item |
getAncestor(int depth)
|
|
javax.jcr.version.VersionHistory |
getContainingHistory()
|
|
Calendar |
getCreated()
|
|
int |
getDepth()
|
|
javax.jcr.Node |
getFrozenNode()
|
|
javax.jcr.version.Version |
getLinearPredecessor()
|
|
javax.jcr.version.Version |
getLinearSuccessor()
|
|
String |
getName()
|
|
String |
getPath()
|
|
javax.jcr.version.Version[] |
getPredecessors()
|
|
javax.jcr.Session |
getSession()
|
|
javax.jcr.version.Version[] |
getSuccessors()
|
|
boolean |
isSame(javax.jcr.Item otherItem)
|
|
protected
|
perform(SessionOperation<U> op)
Perform the passed SessionOperation . |
|
void |
refresh(boolean keepChanges)
|
|
protected
|
safePerform(SessionOperation<U> op)
Perform the passed SessionOperation assuming it does not throw an
RepositoryException . |
|
void |
save()
This implementation delegates to Session.save() if SAVE_SESSION is
true . |
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.jcr.Node |
---|
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 |
Methods inherited from interface javax.jcr.Item |
---|
accept, getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isNode, isSame, refresh, remove, save |
Field Detail |
---|
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
Constructor Detail |
---|
public VersionImpl(VersionDelegate dlg, SessionContext sessionContext)
Method Detail |
---|
public javax.jcr.version.VersionHistory getContainingHistory() throws javax.jcr.RepositoryException
getContainingHistory
in interface javax.jcr.version.Version
javax.jcr.RepositoryException
public Calendar getCreated() throws javax.jcr.RepositoryException
getCreated
in interface javax.jcr.version.Version
javax.jcr.RepositoryException
public javax.jcr.version.Version getLinearPredecessor() throws javax.jcr.RepositoryException
getLinearPredecessor
in interface javax.jcr.version.Version
javax.jcr.RepositoryException
public javax.jcr.version.Version getLinearSuccessor() throws javax.jcr.RepositoryException
getLinearSuccessor
in interface javax.jcr.version.Version
javax.jcr.RepositoryException
public javax.jcr.version.Version[] getPredecessors() throws javax.jcr.RepositoryException
getPredecessors
in interface javax.jcr.version.Version
javax.jcr.RepositoryException
public javax.jcr.version.Version[] getSuccessors() throws javax.jcr.RepositoryException
getSuccessors
in interface javax.jcr.version.Version
javax.jcr.RepositoryException
public javax.jcr.Node getFrozenNode() throws javax.jcr.RepositoryException
getFrozenNode
in interface javax.jcr.version.Version
javax.jcr.RepositoryException
@CheckForNull protected final <U> U perform(@Nonnull SessionOperation<U> op) throws javax.jcr.RepositoryException
SessionOperation
.
U
- return type of the operationop
- operation to perform
op.perform()
javax.jcr.RepositoryException
- as thrown by op.perform()
.@CheckForNull protected final <U> U safePerform(@Nonnull SessionOperation<U> op)
SessionOperation
assuming it does not throw an
RepositoryException
. If it does, wrap it into and throw it as a
RuntimeException
.
U
- return type of the operationop
- operation to perform
op.perform()
@Nonnull public String getName() throws javax.jcr.RepositoryException
getName
in interface javax.jcr.Item
javax.jcr.RepositoryException
Item.getName()
@Nonnull public String getPath() throws javax.jcr.RepositoryException
getPath
in interface javax.jcr.Item
javax.jcr.RepositoryException
Item.getPath()
@Nonnull public javax.jcr.Session getSession()
getSession
in interface javax.jcr.Item
public javax.jcr.Item getAncestor(int depth) throws javax.jcr.RepositoryException
getAncestor
in interface javax.jcr.Item
javax.jcr.RepositoryException
public int getDepth() throws javax.jcr.RepositoryException
getDepth
in interface javax.jcr.Item
javax.jcr.RepositoryException
public boolean isSame(javax.jcr.Item otherItem) throws javax.jcr.RepositoryException
isSame
in interface javax.jcr.Item
javax.jcr.RepositoryException
Item.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
UnsupportedRepositoryOperationException
save
in interface javax.jcr.Item
javax.jcr.RepositoryException
Item.save()
public void refresh(boolean keepChanges) throws javax.jcr.RepositoryException
refresh
in interface javax.jcr.Item
javax.jcr.RepositoryException
Item.refresh(boolean)
public String toString()
toString
in class Object
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
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.RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |