Class NodeImpl<T extends NodeDelegate>
- java.lang.Object
-
- org.apache.jackrabbit.oak.jcr.session.NodeImpl<T>
-
- Type Parameters:
T
- the delegate type
- All Implemented Interfaces:
javax.jcr.Item
,javax.jcr.Node
,org.apache.jackrabbit.api.JackrabbitNode
- Direct Known Subclasses:
VersionHistoryImpl
,VersionImpl
public class NodeImpl<T extends NodeDelegate> extends java.lang.Object implements org.apache.jackrabbit.api.JackrabbitNode
TODO document
-
-
Field Summary
Fields Modifier and Type Field Description protected T
dlg
static java.lang.String
ITEM_SAVE_DOES_SESSION_SAVE
static int
MV_PROPERTY_WARN_THRESHOLD
static boolean
SAVE_SESSION
The value of this flag determines the behaviour ofItem.save()
.protected SessionContext
sessionContext
protected SessionDelegate
sessionDelegate
-
Constructor Summary
Constructors Constructor Description NodeImpl(T dlg, SessionContext sessionContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(javax.jcr.ItemVisitor visitor)
void
addMixin(java.lang.String mixinName)
@NotNull javax.jcr.Node
addNode(java.lang.String relPath)
@NotNull javax.jcr.Node
addNode(java.lang.String relPath, java.lang.String primaryNodeTypeName)
boolean
canAddMixin(java.lang.String mixinName)
void
cancelMerge(javax.jcr.version.Version version)
@NotNull javax.jcr.version.Version
checkin()
void
checkout()
protected @NotNull org.apache.jackrabbit.oak.api.PropertyState
createMultiState(java.lang.String oakName, java.util.List<javax.jcr.Value> values, org.apache.jackrabbit.oak.api.Type<?> type)
static @NotNull NodeImpl<? extends NodeDelegate>
createNode(@NotNull NodeDelegate delegate, @NotNull SessionContext context)
static @Nullable NodeImpl<? extends NodeDelegate>
createNodeOrNull(@Nullable NodeDelegate delegate, @NotNull SessionContext context)
protected @NotNull org.apache.jackrabbit.oak.api.PropertyState
createSingleState(java.lang.String oakName, javax.jcr.Value value, org.apache.jackrabbit.oak.api.Type<?> type)
void
doneMerge(javax.jcr.version.Version version)
void
followLifecycleTransition(java.lang.String transition)
@NotNull java.lang.String[]
getAllowedLifecycleTransistions()
javax.jcr.Item
getAncestor(int depth)
@NotNull javax.jcr.version.Version
getBaseVersion()
@NotNull java.lang.String
getCorrespondingNodePath(java.lang.String workspaceName)
@NotNull javax.jcr.nodetype.NodeDefinition
getDefinition()
int
getDepth()
@NotNull java.lang.String
getIdentifier()
int
getIndex()
@NotNull javax.jcr.lock.Lock
getLock()
@NotNull javax.jcr.nodetype.NodeType[]
getMixinNodeTypes()
@NotNull java.lang.String
getName()
@NotNull javax.jcr.Node
getNode(java.lang.String relPath)
@Nullable org.apache.jackrabbit.api.JackrabbitNode
getNodeOrNull(@NotNull java.lang.String relPath)
@NotNull javax.jcr.NodeIterator
getNodes()
@NotNull javax.jcr.NodeIterator
getNodes(java.lang.String namePattern)
@NotNull javax.jcr.NodeIterator
getNodes(java.lang.String[] nameGlobs)
@NotNull javax.jcr.Node
getParent()
@NotNull java.lang.String
getPath()
@NotNull javax.jcr.Item
getPrimaryItem()
@NotNull javax.jcr.nodetype.NodeType
getPrimaryNodeType()
@NotNull javax.jcr.PropertyIterator
getProperties()
@NotNull javax.jcr.PropertyIterator
getProperties(java.lang.String namePattern)
@NotNull javax.jcr.PropertyIterator
getProperties(java.lang.String[] nameGlobs)
@NotNull javax.jcr.Property
getProperty(java.lang.String relPath)
@Nullable javax.jcr.Property
getPropertyOrNull(@NotNull java.lang.String relPath)
@NotNull javax.jcr.PropertyIterator
getReferences()
@NotNull javax.jcr.PropertyIterator
getReferences(java.lang.String name)
@NotNull javax.jcr.Session
getSession()
@NotNull javax.jcr.NodeIterator
getSharedSet()
@NotNull java.lang.String
getUUID()
@NotNull javax.jcr.version.VersionHistory
getVersionHistory()
@NotNull javax.jcr.PropertyIterator
getWeakReferences()
@NotNull javax.jcr.PropertyIterator
getWeakReferences(java.lang.String name)
boolean
hasNode(java.lang.String relPath)
boolean
hasNodes()
boolean
hasProperties()
boolean
hasProperty(java.lang.String relPath)
boolean
holdsLock()
boolean
internalIsCheckedOut()
boolean
isCheckedOut()
boolean
isLocked()
boolean
isModified()
boolean
isNew()
boolean
isNode()
boolean
isNodeType(java.lang.String nodeTypeName)
boolean
isSame(javax.jcr.Item otherItem)
@NotNull javax.jcr.lock.Lock
lock(boolean isDeep, boolean isSessionScoped)
@NotNull javax.jcr.NodeIterator
merge(java.lang.String srcWorkspace, boolean bestEffort)
void
orderBefore(java.lang.String srcChildRelPath, java.lang.String destChildRelPath)
protected <U> U
perform(@NotNull SessionOperation<U> op)
Perform the passedSessionOperation
.void
refresh(boolean keepChanges)
void
remove()
void
removeMixin(java.lang.String mixinName)
void
removeShare()
void
removeSharedSet()
void
rename(java.lang.String newName)
Simplified implementation ofJackrabbitNode.rename(String)
.void
restore(java.lang.String versionName, boolean removeExisting)
void
restore(javax.jcr.version.Version version, boolean removeExisting)
void
restore(javax.jcr.version.Version version, java.lang.String relPath, boolean removeExisting)
void
restoreByLabel(java.lang.String versionLabel, boolean removeExisting)
void
save()
void
setMixins(java.lang.String[] mixinNames)
Simplified implementation of theJackrabbitNode.setMixins(String[])
method that adds all mixin types that are not yet present on this node and removes all mixins that are no longer contained in the specified array.void
setPrimaryType(java.lang.String nodeTypeName)
@NotNull javax.jcr.Property
setProperty(java.lang.String name, boolean value)
@NotNull javax.jcr.Property
setProperty(java.lang.String name, double value)
@NotNull javax.jcr.Property
setProperty(java.lang.String name, long value)
@NotNull javax.jcr.Property
setProperty(java.lang.String name, java.io.InputStream value)
@NotNull javax.jcr.Property
setProperty(java.lang.String name, java.lang.String value)
@NotNull javax.jcr.Property
setProperty(java.lang.String name, java.lang.String[] values)
@NotNull javax.jcr.Property
setProperty(java.lang.String name, java.lang.String[] values, int type)
@NotNull javax.jcr.Property
setProperty(java.lang.String name, java.lang.String value, int type)
@NotNull javax.jcr.Property
setProperty(java.lang.String name, java.math.BigDecimal value)
@NotNull javax.jcr.Property
setProperty(java.lang.String name, java.util.Calendar value)
@NotNull javax.jcr.Property
setProperty(java.lang.String name, javax.jcr.Binary value)
@NotNull javax.jcr.Property
setProperty(java.lang.String name, javax.jcr.Node value)
@NotNull javax.jcr.Property
setProperty(java.lang.String name, javax.jcr.Value value)
@NotNull javax.jcr.Property
setProperty(java.lang.String name, javax.jcr.Value[] values)
@NotNull javax.jcr.Property
setProperty(java.lang.String jcrName, javax.jcr.Value[] values, int type)
@NotNull javax.jcr.Property
setProperty(java.lang.String name, javax.jcr.Value value, int type)
java.lang.String
toString()
void
unlock()
void
update(java.lang.String srcWorkspace)
-
-
-
Field Detail
-
ITEM_SAVE_DOES_SESSION_SAVE
public static final java.lang.String ITEM_SAVE_DOES_SESSION_SAVE
- See Also:
- Constant Field Values
-
MV_PROPERTY_WARN_THRESHOLD
public static final int MV_PROPERTY_WARN_THRESHOLD
- See Also:
- Constant Field Values
-
SAVE_SESSION
public static final boolean SAVE_SESSION
The value of this flag determines the behaviour ofItem.save()
. Iffalse
, save will throw aUnsupportedRepositoryOperationException
if the sub tree rooted at this item does not contain all transient changes. Iftrue
, save will delegate toSession.save()
.
-
sessionContext
protected final SessionContext sessionContext
-
dlg
protected final T extends ItemDelegate dlg
-
sessionDelegate
protected final SessionDelegate sessionDelegate
-
-
Constructor Detail
-
NodeImpl
public NodeImpl(T dlg, SessionContext sessionContext)
-
-
Method Detail
-
createNodeOrNull
@Nullable public static @Nullable NodeImpl<? extends NodeDelegate> createNodeOrNull(@Nullable @Nullable NodeDelegate delegate, @NotNull @NotNull SessionContext context) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
createNode
@NotNull public static @NotNull NodeImpl<? extends NodeDelegate> createNode(@NotNull @NotNull NodeDelegate delegate, @NotNull @NotNull SessionContext context) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
isNode
public boolean isNode()
- Specified by:
isNode
in interfacejavax.jcr.Item
- See Also:
Item.isNode()
-
getParent
@NotNull public @NotNull javax.jcr.Node getParent() throws javax.jcr.RepositoryException
- Specified by:
getParent
in interfacejavax.jcr.Item
- Throws:
javax.jcr.RepositoryException
- See Also:
Item.getParent()
-
isNew
public boolean isNew()
- Specified by:
isNew
in interfacejavax.jcr.Item
- See Also:
Item.isNew()
-
isModified
public boolean isModified()
- Specified by:
isModified
in interfacejavax.jcr.Item
- See Also:
Item.isModified()
-
remove
public void remove() throws javax.jcr.RepositoryException
- Specified by:
remove
in interfacejavax.jcr.Item
- Throws:
javax.jcr.RepositoryException
- See Also:
Item.remove()
-
accept
public void accept(javax.jcr.ItemVisitor visitor) throws javax.jcr.RepositoryException
- Specified by:
accept
in interfacejavax.jcr.Item
- Throws:
javax.jcr.RepositoryException
-
addNode
@NotNull public @NotNull javax.jcr.Node addNode(java.lang.String relPath) throws javax.jcr.RepositoryException
- Specified by:
addNode
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.addNode(String)
-
addNode
@NotNull public @NotNull javax.jcr.Node addNode(java.lang.String relPath, java.lang.String primaryNodeTypeName) throws javax.jcr.RepositoryException
- Specified by:
addNode
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
orderBefore
public void orderBefore(java.lang.String srcChildRelPath, java.lang.String destChildRelPath) throws javax.jcr.RepositoryException
- Specified by:
orderBefore
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String name, javax.jcr.Value value) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String name, javax.jcr.Value value, int type) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String name, javax.jcr.Value[] values) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String jcrName, javax.jcr.Value[] values, int type) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String name, java.lang.String[] values) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String name, java.lang.String[] values, int type) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String name, java.lang.String value) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String name, java.lang.String value, int type) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String name, java.io.InputStream value) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String name, javax.jcr.Binary value) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String name, boolean value) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String name, double value) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String name, java.math.BigDecimal value) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String name, long value) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String name, java.util.Calendar value) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setProperty
@NotNull public @NotNull javax.jcr.Property setProperty(java.lang.String name, javax.jcr.Node value) throws javax.jcr.RepositoryException
- Specified by:
setProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getNode
@NotNull public @NotNull javax.jcr.Node getNode(java.lang.String relPath) throws javax.jcr.RepositoryException
- Specified by:
getNode
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getNodes
@NotNull public @NotNull javax.jcr.NodeIterator getNodes() throws javax.jcr.RepositoryException
- Specified by:
getNodes
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getNodes
@NotNull public @NotNull javax.jcr.NodeIterator getNodes(java.lang.String namePattern) throws javax.jcr.RepositoryException
- Specified by:
getNodes
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getNodes
@NotNull public @NotNull javax.jcr.NodeIterator getNodes(java.lang.String[] nameGlobs) throws javax.jcr.RepositoryException
- Specified by:
getNodes
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getProperty
@NotNull public @NotNull javax.jcr.Property getProperty(java.lang.String relPath) throws javax.jcr.RepositoryException
- Specified by:
getProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getProperties
@NotNull public @NotNull javax.jcr.PropertyIterator getProperties() throws javax.jcr.RepositoryException
- Specified by:
getProperties
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getProperties
@NotNull public @NotNull javax.jcr.PropertyIterator getProperties(java.lang.String namePattern) throws javax.jcr.RepositoryException
- Specified by:
getProperties
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getProperties
@NotNull public @NotNull javax.jcr.PropertyIterator getProperties(java.lang.String[] nameGlobs) throws javax.jcr.RepositoryException
- Specified by:
getProperties
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getPrimaryItem
@NotNull public @NotNull javax.jcr.Item getPrimaryItem() throws javax.jcr.RepositoryException
- Specified by:
getPrimaryItem
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.getPrimaryItem()
-
getUUID
@NotNull public @NotNull java.lang.String getUUID() throws javax.jcr.RepositoryException
- Specified by:
getUUID
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.getUUID()
-
getIdentifier
@NotNull public @NotNull java.lang.String getIdentifier() throws javax.jcr.RepositoryException
- Specified by:
getIdentifier
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getIndex
public int getIndex() throws javax.jcr.RepositoryException
- Specified by:
getIndex
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getReferences
@NotNull public @NotNull javax.jcr.PropertyIterator getReferences() throws javax.jcr.RepositoryException
- Specified by:
getReferences
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.getReferences()
-
getReferences
@NotNull public @NotNull javax.jcr.PropertyIterator getReferences(java.lang.String name) throws javax.jcr.RepositoryException
- Specified by:
getReferences
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getWeakReferences
@NotNull public @NotNull javax.jcr.PropertyIterator getWeakReferences() throws javax.jcr.RepositoryException
- Specified by:
getWeakReferences
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.getWeakReferences()
-
getWeakReferences
@NotNull public @NotNull javax.jcr.PropertyIterator getWeakReferences(java.lang.String name) throws javax.jcr.RepositoryException
- Specified by:
getWeakReferences
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
hasNode
public boolean hasNode(java.lang.String relPath) throws javax.jcr.RepositoryException
- Specified by:
hasNode
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
hasProperty
public boolean hasProperty(java.lang.String relPath) throws javax.jcr.RepositoryException
- Specified by:
hasProperty
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
hasNodes
public boolean hasNodes() throws javax.jcr.RepositoryException
- Specified by:
hasNodes
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
hasProperties
public boolean hasProperties() throws javax.jcr.RepositoryException
- Specified by:
hasProperties
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getPrimaryNodeType
@NotNull public @NotNull javax.jcr.nodetype.NodeType getPrimaryNodeType() throws javax.jcr.RepositoryException
- Specified by:
getPrimaryNodeType
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.getPrimaryNodeType()
-
getMixinNodeTypes
@NotNull public @NotNull javax.jcr.nodetype.NodeType[] getMixinNodeTypes() throws javax.jcr.RepositoryException
- Specified by:
getMixinNodeTypes
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.getMixinNodeTypes()
-
isNodeType
public boolean isNodeType(java.lang.String nodeTypeName) throws javax.jcr.RepositoryException
- Specified by:
isNodeType
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
setPrimaryType
public void setPrimaryType(java.lang.String nodeTypeName) throws javax.jcr.RepositoryException
- Specified by:
setPrimaryType
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
addMixin
public void addMixin(java.lang.String mixinName) throws javax.jcr.RepositoryException
- Specified by:
addMixin
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
removeMixin
public void removeMixin(java.lang.String mixinName) throws javax.jcr.RepositoryException
- Specified by:
removeMixin
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
canAddMixin
public boolean canAddMixin(java.lang.String mixinName) throws javax.jcr.RepositoryException
- Specified by:
canAddMixin
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getDefinition
@NotNull public @NotNull javax.jcr.nodetype.NodeDefinition getDefinition() throws javax.jcr.RepositoryException
- Specified by:
getDefinition
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getCorrespondingNodePath
@NotNull public @NotNull java.lang.String getCorrespondingNodePath(java.lang.String workspaceName) throws javax.jcr.RepositoryException
- Specified by:
getCorrespondingNodePath
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
update
public void update(java.lang.String srcWorkspace) throws javax.jcr.RepositoryException
- Specified by:
update
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
checkin
@NotNull public @NotNull javax.jcr.version.Version checkin() throws javax.jcr.RepositoryException
- Specified by:
checkin
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.checkin()
-
checkout
public void checkout() throws javax.jcr.RepositoryException
- Specified by:
checkout
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.checkout()
-
doneMerge
public void doneMerge(javax.jcr.version.Version version) throws javax.jcr.RepositoryException
- Specified by:
doneMerge
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.doneMerge(javax.jcr.version.Version)
-
cancelMerge
public void cancelMerge(javax.jcr.version.Version version) throws javax.jcr.RepositoryException
- Specified by:
cancelMerge
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.cancelMerge(javax.jcr.version.Version)
-
merge
@NotNull public @NotNull javax.jcr.NodeIterator merge(java.lang.String srcWorkspace, boolean bestEffort) throws javax.jcr.RepositoryException
- Specified by:
merge
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.merge(String, boolean)
-
isCheckedOut
public boolean isCheckedOut() throws javax.jcr.RepositoryException
- Specified by:
isCheckedOut
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.isCheckedOut()
-
restore
public void restore(java.lang.String versionName, boolean removeExisting) throws javax.jcr.RepositoryException
- Specified by:
restore
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.restore(String, boolean)
-
restore
public void restore(javax.jcr.version.Version version, boolean removeExisting) throws javax.jcr.RepositoryException
- Specified by:
restore
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.restore(javax.jcr.version.Version, boolean)
-
restore
public void restore(javax.jcr.version.Version version, java.lang.String relPath, boolean removeExisting) throws javax.jcr.RepositoryException
- Specified by:
restore
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.restore(Version, String, boolean)
-
restoreByLabel
public void restoreByLabel(java.lang.String versionLabel, boolean removeExisting) throws javax.jcr.RepositoryException
- Specified by:
restoreByLabel
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.restoreByLabel(String, boolean)
-
getVersionHistory
@NotNull public @NotNull javax.jcr.version.VersionHistory getVersionHistory() throws javax.jcr.RepositoryException
- Specified by:
getVersionHistory
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.getVersionHistory()
-
getBaseVersion
@NotNull public @NotNull javax.jcr.version.Version getBaseVersion() throws javax.jcr.RepositoryException
- Specified by:
getBaseVersion
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.getBaseVersion()
-
isLocked
public boolean isLocked() throws javax.jcr.RepositoryException
- Specified by:
isLocked
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
holdsLock
public boolean holdsLock() throws javax.jcr.RepositoryException
- Specified by:
holdsLock
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getLock
@NotNull public @NotNull javax.jcr.lock.Lock getLock() throws javax.jcr.RepositoryException
- Specified by:
getLock
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
lock
@NotNull public @NotNull javax.jcr.lock.Lock lock(boolean isDeep, boolean isSessionScoped) throws javax.jcr.RepositoryException
- Specified by:
lock
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
unlock
public void unlock() throws javax.jcr.RepositoryException
- Specified by:
unlock
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
getSharedSet
@NotNull public @NotNull javax.jcr.NodeIterator getSharedSet()
- Specified by:
getSharedSet
in interfacejavax.jcr.Node
-
removeSharedSet
public void removeSharedSet() throws javax.jcr.RepositoryException
- Specified by:
removeSharedSet
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
removeShare
public void removeShare() throws javax.jcr.RepositoryException
- Specified by:
removeShare
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
-
followLifecycleTransition
public void followLifecycleTransition(java.lang.String transition) throws javax.jcr.RepositoryException
- Specified by:
followLifecycleTransition
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.followLifecycleTransition(String)
-
getAllowedLifecycleTransistions
@NotNull public @NotNull java.lang.String[] getAllowedLifecycleTransistions() throws javax.jcr.RepositoryException
- Specified by:
getAllowedLifecycleTransistions
in interfacejavax.jcr.Node
- Throws:
javax.jcr.RepositoryException
- See Also:
Node.getAllowedLifecycleTransistions()
-
internalIsCheckedOut
public boolean internalIsCheckedOut() throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
rename
public void rename(java.lang.String newName) throws javax.jcr.RepositoryException
Simplified implementation ofJackrabbitNode.rename(String)
. In contrast to the implementation in Jackrabbit 2.x which was operating on the NodeState level directly, this implementation does a move plus subsequent reorder on the JCR API due to a missing support for renaming on the OAK API. Note, that this also has an impact on how permissions are enforced: In Jackrabbit 2.x the rename just required permission to modify the child collection on the parent, whereas a move did the full permission check. With this simplified implementation that (somewhat inconsistent) difference has been removed.- Specified by:
rename
in interfaceorg.apache.jackrabbit.api.JackrabbitNode
- Parameters:
newName
- The new name of this node.- Throws:
javax.jcr.RepositoryException
- If an error occurs.
-
setMixins
public void setMixins(java.lang.String[] mixinNames) throws javax.jcr.RepositoryException
Simplified implementation of theJackrabbitNode.setMixins(String[])
method that adds all mixin types that are not yet present on this node and removes all mixins that are no longer contained in the specified array. Note, that this implementation will not work exactly like the variant in Jackrabbit 2.x which first created the effective node type and adjusted the set of child items accordingly.- Specified by:
setMixins
in interfaceorg.apache.jackrabbit.api.JackrabbitNode
- Parameters:
mixinNames
-- Throws:
javax.jcr.RepositoryException
-
getNodeOrNull
@Nullable public @Nullable org.apache.jackrabbit.api.JackrabbitNode getNodeOrNull(@NotNull @NotNull java.lang.String relPath) throws javax.jcr.RepositoryException
- Specified by:
getNodeOrNull
in interfaceorg.apache.jackrabbit.api.JackrabbitNode
- Throws:
javax.jcr.RepositoryException
-
getPropertyOrNull
@Nullable public @Nullable javax.jcr.Property getPropertyOrNull(@NotNull @NotNull java.lang.String relPath) throws javax.jcr.RepositoryException
- Specified by:
getPropertyOrNull
in interfaceorg.apache.jackrabbit.api.JackrabbitNode
- Throws:
javax.jcr.RepositoryException
-
perform
@NotNull protected final <U> U perform(@NotNull @NotNull SessionOperation<U> op) throws javax.jcr.RepositoryException
Perform the passedSessionOperation
.- Type Parameters:
U
- return type of the operation- Parameters:
op
- operation to perform- Returns:
- the result of
op.perform()
- Throws:
javax.jcr.RepositoryException
- as thrown byop.perform()
.
-
getName
@NotNull public @NotNull java.lang.String getName() throws javax.jcr.RepositoryException
- Specified by:
getName
in interfacejavax.jcr.Item
- Throws:
javax.jcr.RepositoryException
- See Also:
Item.getName()
-
getPath
@NotNull public @NotNull java.lang.String getPath() throws javax.jcr.RepositoryException
- Specified by:
getPath
in interfacejavax.jcr.Item
- Throws:
javax.jcr.RepositoryException
- See Also:
Item.getPath()
-
getSession
@NotNull public @NotNull javax.jcr.Session getSession()
- Specified by:
getSession
in interfacejavax.jcr.Item
-
getAncestor
public javax.jcr.Item getAncestor(int depth) throws javax.jcr.RepositoryException
- Specified by:
getAncestor
in interfacejavax.jcr.Item
- Throws:
javax.jcr.RepositoryException
-
getDepth
public int getDepth() throws javax.jcr.RepositoryException
- Specified by:
getDepth
in interfacejavax.jcr.Item
- Throws:
javax.jcr.RepositoryException
-
isSame
public boolean isSame(javax.jcr.Item otherItem) throws javax.jcr.RepositoryException
- Specified by:
isSame
in interfacejavax.jcr.Item
- Throws:
javax.jcr.RepositoryException
- See Also:
Item.isSame(javax.jcr.Item)
-
save
public void save() throws javax.jcr.RepositoryException
This implementation delegates toSession.save()
ifSAVE_SESSION
istrue
. Otherwise it only performs the save if the subtree rooted at this item contains all transient changes. That is, if callingSession.save()
would have the same effect as calling this method. In all other cases this method will throw anUnsupportedRepositoryOperationException
- Specified by:
save
in interfacejavax.jcr.Item
- Throws:
javax.jcr.RepositoryException
- See Also:
Item.save()
-
refresh
public void refresh(boolean keepChanges) throws javax.jcr.RepositoryException
- Specified by:
refresh
in interfacejavax.jcr.Item
- Throws:
javax.jcr.RepositoryException
- See Also:
Item.refresh(boolean)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
createSingleState
@NotNull protected @NotNull org.apache.jackrabbit.oak.api.PropertyState createSingleState(java.lang.String oakName, javax.jcr.Value value, org.apache.jackrabbit.oak.api.Type<?> type) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
createMultiState
@NotNull protected @NotNull org.apache.jackrabbit.oak.api.PropertyState createMultiState(java.lang.String oakName, java.util.List<javax.jcr.Value> values, org.apache.jackrabbit.oak.api.Type<?> type) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
-