public class JcrSystemNode extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractJcrNode.ChildNodeResolver |
Modifier and Type | Field and Description |
---|---|
protected NodeKey |
key |
protected JcrSession |
session |
JCR_CHILD_NODE_DEFINITION, JCR_CONTENT, JCR_FROZEN_NODE, JCR_PROPERTY_DEFINITION, JCR_ROOT_VERSION, JCR_VERSION_LABELS
Modifier and Type | Method and Description |
---|---|
protected Path |
absolutePathFor(Path parentPath,
Path.Segment childSegment) |
void |
accept(ItemVisitor visitor) |
protected org.modeshape.jcr.AbstractJcrNode |
addAclNode(String relPath,
String primaryNodeTypeName) |
void |
addMixin(String mixinName) |
org.modeshape.jcr.AbstractJcrNode |
addNode(String relPath) |
org.modeshape.jcr.AbstractJcrNode |
addNode(String relPath,
String primaryNodeTypeName) |
protected void |
autoCreateChildren(Name primaryType,
NodeTypes capabilities)
Create in this node any auto-created child nodes.
|
protected LinkedList<Property> |
autoCreatePropertiesFor(Name nodeName,
Name primaryType,
PropertyFactory propertyFactory,
NodeTypes capabilities)
If there are any auto-created properties, create them and return them in a list.
|
boolean |
canAddMixin(String mixinName) |
void |
cancelMerge(Version version) |
protected void |
checkForCheckedOut()
Verifies that this node is either not versionable or that it is versionable but checked out.
|
protected void |
checkForLock()
Checks that this node is not already locked by another session.
|
Version |
checkin() |
protected void |
checkNodeTypeCanBeModified()
Check that this type of node can be modified
|
void |
checkout() |
protected void |
checkSession()
Check that the session is still valid and
live . |
protected long |
childCount()
Get the total number of children.
|
protected org.modeshape.jcr.AbstractJcrNode |
childNode(Name name,
org.modeshape.jcr.AbstractJcrNode.Type expectedType)
Get the JCR node for the named child.
|
protected org.modeshape.jcr.AbstractJcrNode |
childNode(Path.Segment segment,
org.modeshape.jcr.AbstractJcrNode.Type expectedType)
Get the JCR node for the named child.
|
protected boolean |
containsChangesWithExternalDependencies(AtomicReference<Set<NodeKey>> affectedNodeKeys)
Determines whether this node, or any nodes below it, contain changes that depend on nodes that are outside of this node's
hierarchy.
|
protected Path |
correspondingNodePath(String workspaceName) |
protected static List<?> |
createPatternsFor(String... namePatterns) |
void |
doneMerge(Version version) |
protected void |
doRemove()
Perform a real remove of this node.
|
void |
followLifecycleTransition(String transition) |
String[] |
getAllowedLifecycleTransistions() |
Item |
getAncestor(int depth) |
org.modeshape.jcr.JcrVersionNode |
getBaseVersion() |
String |
getCorrespondingNodePath(String workspaceName) |
NodeDefinition |
getDefinition() |
int |
getDepth() |
String |
getIdentifier() |
int |
getIndex() |
String |
getLocalName()
Return the local part of the object's name.
|
Lock |
getLock() |
protected Lock |
getLockIfExists() |
NodeType[] |
getMixinNodeTypes() |
String |
getName() |
String |
getNamespaceURI()
Returns the URI in which this object's name is scoped.
|
org.modeshape.jcr.AbstractJcrNode |
getNode(String relativePath) |
protected org.modeshape.jcr.AbstractJcrNode |
getNodeIfExists(Name childName) |
NodeIterator |
getNodes() |
NodeIterator |
getNodes(String namePattern) |
NodeIterator |
getNodes(String[] nameGlobs) |
protected NodeIterator |
getNodesInternal() |
protected NodeIterator |
getNodesInternal(String... nameGlobs) |
protected NodeIterator |
getNodesInternal(String namePattern) |
org.modeshape.jcr.AbstractJcrNode |
getParent() |
String |
getPath() |
Item |
getPrimaryItem() |
org.modeshape.jcr.JcrNodeType |
getPrimaryNodeType() |
PropertyIterator |
getProperties() |
PropertyIterator |
getProperties(String namePattern) |
PropertyIterator |
getProperties(String[] nameGlobs) |
org.modeshape.jcr.AbstractJcrProperty |
getProperty(String relativePath) |
PropertyIterator |
getReferences() |
PropertyIterator |
getReferences(String propertyName) |
JcrSession |
getSession() |
NodeIterator |
getSharedSet() |
String |
getUUID()
Deprecated.
|
org.modeshape.jcr.JcrVersionHistoryNode |
getVersionHistory() |
PropertyIterator |
getWeakReferences() |
PropertyIterator |
getWeakReferences(String propertyName) |
boolean |
hasNode(String relativePath) |
boolean |
hasNodes() |
boolean |
hasProperties() |
boolean |
hasProperty(String relPath) |
boolean |
holdsLock() |
boolean |
isCheckedOut() |
protected boolean |
isExternal()
Checks if this node belongs to an external source.
|
protected boolean |
isForeign()
Checks if this node is foreign for its current owning session
|
protected boolean |
isInTheSameProcessAs(String otherProcessId) |
boolean |
isLocked() |
protected boolean |
isLockedByAnotherSession() |
boolean |
isModified() |
boolean |
isNew() |
boolean |
isNode() |
boolean |
isNodeType(Name nodeTypeName)
Determine whether this node's primary type or any of the mixins are or extend the node type with the supplied name.
|
boolean |
isNodeType(String nodeTypeName) |
boolean |
isSame(Item otherItem) |
protected boolean |
isSameRepository(Item otherItem) |
protected NodeKey |
key() |
protected String |
location()
Obtain a string identifying this node, usually for error or logging purposes.
|
Lock |
lock(boolean isDeep,
boolean isSessionScoped) |
NodeIterator |
merge(String srcWorkspace,
boolean bestEffort) |
protected MutableCachedNode |
mutable() |
protected MutableCachedNode |
mutableParent() |
protected Name |
name() |
protected CachedNode |
node()
Get the cached node.
|
void |
orderBefore(String srcChildRelPath,
String destChildRelPath) |
protected NodeKey |
parentKey() |
protected static String[] |
patternStringToGlobArray(String namePattern) |
protected PropertyIterator |
propertiesOnOtherNodesReferencingThis(String propertyName,
int referenceType)
Find the properties on other nodes that are REFERENCE or WEAKREFERENCE properties (as dictated by the
referenceType parameter) to this node. |
protected NodeIterator |
referringNodes(CachedNode.ReferenceType referenceType)
Obtain an iterator over the nodes that reference this node.
|
void |
refresh(boolean keepChanges) |
void |
remove()
According to Section 14.3 of the JCR 2.0 specification, an implementation may choose whether the
Item.remove()
method (and the Session.removeItem(String) method) behaves as a Node.removeShare() or
Node.removeSharedSet() . |
void |
removeMixin(String mixinName) |
void |
removeShare() |
void |
removeSharedSet() |
void |
restore(String versionName,
boolean removeExisting) |
void |
restore(Version version,
boolean removeExisting) |
void |
restore(Version version,
String relPath,
boolean removeExisting) |
void |
restoreByLabel(String versionLabel,
boolean removeExisting) |
void |
save()
Deprecated.
|
protected Path.Segment |
segment() |
protected SessionCache |
sessionCache() |
void |
setPrimaryType(String nodeTypeName) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
BigDecimal value) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
Binary value) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
boolean value) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
Calendar value) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
double value) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
InputStream value) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
long value) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
Node value) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
String value) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
String[] values) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
String[] values,
int type) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
String value,
int type) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
Value value) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
Value[] values) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
Value[] values,
int type) |
org.modeshape.jcr.AbstractJcrProperty |
setProperty(String name,
Value value,
int type) |
protected org.modeshape.jcr.AbstractJcrProperty |
setPropertyInAccessControlScope(String name,
String value) |
protected org.modeshape.jcr.AbstractJcrProperty |
setPropertyInAccessControlScope(String name,
String[] values) |
String |
toString() |
void |
unlock() |
void |
update(String srcWorkspace) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAncestor, getDepth
protected final NodeKey key
protected final JcrSession session
protected void doRemove() throws ConstraintViolationException, RepositoryException
protected void checkNodeTypeCanBeModified() throws RepositoryException
RepositoryException
public int getIndex() throws RepositoryException
getIndex
in interface Node
RepositoryException
public String getName() throws RepositoryException
RepositoryException
public org.modeshape.jcr.AbstractJcrNode getParent() throws ItemNotFoundException, RepositoryException
getParent
in interface Item
ItemNotFoundException
RepositoryException
public String getPath() throws RepositoryException
RepositoryException
protected SessionCache sessionCache()
protected final NodeKey key()
protected final CachedNode node() throws ItemNotFoundException, InvalidItemStateException
InvalidItemStateException
- if the node has been removed in this session's transient stateItemNotFoundException
- if the node does not existprotected final MutableCachedNode mutable()
protected NodeKey parentKey() throws RepositoryException
RepositoryException
protected final MutableCachedNode mutableParent() throws RepositoryException
RepositoryException
protected final String location()
protected Name name() throws RepositoryException
RepositoryException
protected Path.Segment segment() throws RepositoryException
RepositoryException
protected final boolean isForeign()
JcrSession.isForeignKey(org.modeshape.jcr.cache.NodeKey)
protected final boolean isExternal()
protected final boolean isInTheSameProcessAs(String otherProcessId)
public final String getIdentifier()
getIdentifier
in interface Node
public final JcrSession getSession()
getSession
in interface Item
public String getLocalName() throws RepositoryException
Namespaced
getLocalName
in interface Namespaced
RepositoryException
- if an error occurs.public String getNamespaceURI() throws RepositoryException
Namespaced
getNamespaceURI
in interface Namespaced
RepositoryException
- if an error occurs.public org.modeshape.jcr.AbstractJcrProperty getProperty(String relativePath) throws PathNotFoundException, RepositoryException
getProperty
in interface Node
PathNotFoundException
RepositoryException
protected final void checkForLock() throws LockException, RepositoryException
Session
, this method completes silently. If the node is locked (either directly or as part of
a deep lock from an ancestor), this method throws a LockException
.LockException
- if this node is locked (that is, if isLocked() == true && getLock().getLockToken() == null
).RepositoryException
- if any other error occursNode.isLocked()
,
Lock.getLockToken()
protected final boolean isLockedByAnotherSession() throws RepositoryException
RepositoryException
protected final void checkForCheckedOut() throws VersionException, RepositoryException
VersionException
- if the node is versionable but is checked in and cannot be modifiedRepositoryException
- if there is an error accessing the repositoryprotected final long childCount() throws RepositoryException
RepositoryException
protected final org.modeshape.jcr.AbstractJcrNode childNode(Name name, org.modeshape.jcr.AbstractJcrNode.Type expectedType) throws PathNotFoundException, ItemNotFoundException, InvalidItemStateException
name
- the child name; may not be nullexpectedType
- the expected implementation type for the node, or null if it is not knownPathNotFoundException
- if there is no child with the supplied nameItemNotFoundException
- if this node or the referenced child no longer exist or cannot be foundInvalidItemStateException
- if this node has been removed in this session's transient stateprotected final org.modeshape.jcr.AbstractJcrNode childNode(Path.Segment segment, org.modeshape.jcr.AbstractJcrNode.Type expectedType) throws PathNotFoundException, ItemNotFoundException, InvalidItemStateException
segment
- the child name and SNS index; may not be nullexpectedType
- the expected implementation type for the node, or null if it is not knownPathNotFoundException
- if there is no child with the supplied nameItemNotFoundException
- if this node or the referenced child cannot be foundInvalidItemStateException
- if this node has been removed in this session's transient statepublic boolean hasNode(String relativePath) throws RepositoryException
hasNode
in interface Node
RepositoryException
public org.modeshape.jcr.AbstractJcrNode getNode(String relativePath) throws PathNotFoundException, RepositoryException
getNode
in interface Node
PathNotFoundException
RepositoryException
protected org.modeshape.jcr.AbstractJcrNode getNodeIfExists(Name childName) throws RepositoryException
RepositoryException
public NodeIterator getNodes() throws RepositoryException
getNodes
in interface Node
RepositoryException
protected NodeIterator getNodesInternal() throws RepositoryException
RepositoryException
public NodeIterator getNodes(String namePattern) throws RepositoryException
getNodes
in interface Node
RepositoryException
protected NodeIterator getNodesInternal(String namePattern) throws RepositoryException
RepositoryException
public NodeIterator getNodes(String[] nameGlobs) throws RepositoryException
getNodes
in interface Node
RepositoryException
protected NodeIterator getNodesInternal(String... nameGlobs) throws RepositoryException
RepositoryException
public org.modeshape.jcr.AbstractJcrNode addNode(String relPath) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException
addNode
in interface Node
ItemExistsException
PathNotFoundException
VersionException
ConstraintViolationException
LockException
RepositoryException
public org.modeshape.jcr.AbstractJcrNode addNode(String relPath, String primaryNodeTypeName) throws ItemExistsException, PathNotFoundException, NoSuchNodeTypeException, LockException, VersionException, ConstraintViolationException, RepositoryException
addNode
in interface Node
ItemExistsException
PathNotFoundException
NoSuchNodeTypeException
LockException
VersionException
ConstraintViolationException
RepositoryException
protected org.modeshape.jcr.AbstractJcrNode addAclNode(String relPath, String primaryNodeTypeName) throws ItemExistsException, PathNotFoundException, NoSuchNodeTypeException, LockException, VersionException, ConstraintViolationException, RepositoryException
protected final Path absolutePathFor(Path parentPath, Path.Segment childSegment)
protected LinkedList<Property> autoCreatePropertiesFor(Name nodeName, Name primaryType, PropertyFactory propertyFactory, NodeTypes capabilities)
nodeName
- the name of the node; may not be nullprimaryType
- the name of the primary type; may not be nullpropertyFactory
- the factory for properties; may not be nullcapabilities
- the node type capabilities cache; may not be nullprotected void autoCreateChildren(Name primaryType, NodeTypes capabilities) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException
primaryType
- the desired primary type for the new node; null value indicates that the default primary type from the
appropriate definition for this node should be usedcapabilities
- the node type capabilities cache; may not be nullItemExistsException
- if an item at the specified path already exists and same-name siblings are not allowed.PathNotFoundException
- if the specified path implies intermediary nodes that do not exist.VersionException
- not thrown at this time, but included for compatibility with the specificationConstraintViolationException
- if the change would violate a node type or implementation-specific constraint.LockException
- not thrown at this time, but included for compatibility with the specificationRepositoryException
- if another error occurspublic void orderBefore(String srcChildRelPath, String destChildRelPath) throws UnsupportedRepositoryOperationException, VersionException, ConstraintViolationException, ItemNotFoundException, LockException, RepositoryException
orderBefore
in interface Node
UnsupportedRepositoryOperationException
VersionException
ConstraintViolationException
ItemNotFoundException
LockException
RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, Value value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, Value value, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, Value[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, Value[] values, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, String[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
protected org.modeshape.jcr.AbstractJcrProperty setPropertyInAccessControlScope(String name, String[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, String[] values, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, String value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
protected org.modeshape.jcr.AbstractJcrProperty setPropertyInAccessControlScope(String name, String value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, String value, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, InputStream value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, Binary value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, boolean value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, double value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, BigDecimal value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, long value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, Calendar value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public org.modeshape.jcr.AbstractJcrProperty setProperty(String name, Node value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty
in interface Node
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public PropertyIterator getProperties() throws RepositoryException
getProperties
in interface Node
RepositoryException
public PropertyIterator getProperties(String namePattern) throws RepositoryException
getProperties
in interface Node
RepositoryException
public PropertyIterator getProperties(String[] nameGlobs) throws RepositoryException
getProperties
in interface Node
RepositoryException
public Item getPrimaryItem() throws ItemNotFoundException, RepositoryException
getPrimaryItem
in interface Node
ItemNotFoundException
RepositoryException
@Deprecated public final String getUUID() throws UnsupportedRepositoryOperationException, RepositoryException
getUUID
in interface Node
UnsupportedRepositoryOperationException
RepositoryException
public final PropertyIterator getReferences() throws RepositoryException
getReferences
in interface Node
RepositoryException
public final PropertyIterator getReferences(String propertyName) throws RepositoryException
getReferences
in interface Node
RepositoryException
public PropertyIterator getWeakReferences() throws RepositoryException
getWeakReferences
in interface Node
RepositoryException
public PropertyIterator getWeakReferences(String propertyName) throws RepositoryException
getWeakReferences
in interface Node
RepositoryException
protected PropertyIterator propertiesOnOtherNodesReferencingThis(String propertyName, int referenceType) throws RepositoryException
referenceType
parameter) to this node.propertyName
- the name of the referring REFERENCE or WEAKREFERENCE properties on the other nodes, or null if all
referring REFERENCE or WEAKREFERENCE properties should be returnedreferenceType
- either PropertyType.REFERENCE
or PropertyType.WEAKREFERENCE
empty
if there are no references or if
this node is not referenceableRepositoryException
- if there is an error finding the referencing propertiesprotected final NodeIterator referringNodes(CachedNode.ReferenceType referenceType) throws RepositoryException
referenceType
- specification of the type of references to include; may not be nullRepositoryException
- if an error occurs while obtaining the informationpublic boolean hasProperty(String relPath) throws RepositoryException
hasProperty
in interface Node
RepositoryException
public boolean hasNodes() throws RepositoryException
hasNodes
in interface Node
RepositoryException
public boolean hasProperties() throws RepositoryException
hasProperties
in interface Node
RepositoryException
public org.modeshape.jcr.JcrNodeType getPrimaryNodeType() throws RepositoryException
getPrimaryNodeType
in interface Node
RepositoryException
public NodeType[] getMixinNodeTypes() throws RepositoryException
getMixinNodeTypes
in interface Node
RepositoryException
public boolean isNodeType(String nodeTypeName) throws RepositoryException
isNodeType
in interface Node
RepositoryException
public final boolean isNodeType(Name nodeTypeName) throws RepositoryException
equivalent in the JCR
API
, especially when the node type name is already a Name
object.nodeTypeName
- the name of the node typeRepositoryException
- if there is an exceptionpublic void setPrimaryType(String nodeTypeName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException
setPrimaryType
in interface Node
NoSuchNodeTypeException
VersionException
ConstraintViolationException
LockException
RepositoryException
public void addMixin(String mixinName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException
addMixin
in interface Node
NoSuchNodeTypeException
VersionException
ConstraintViolationException
LockException
RepositoryException
public void removeMixin(String mixinName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException
removeMixin
in interface Node
NoSuchNodeTypeException
VersionException
ConstraintViolationException
LockException
RepositoryException
public boolean canAddMixin(String mixinName) throws NoSuchNodeTypeException, RepositoryException
canAddMixin
in interface Node
NoSuchNodeTypeException
RepositoryException
public NodeDefinition getDefinition() throws RepositoryException
getDefinition
in interface Node
RepositoryException
public Version checkin() throws VersionException, UnsupportedRepositoryOperationException, InvalidItemStateException, LockException, RepositoryException
checkin
in interface Node
VersionException
UnsupportedRepositoryOperationException
InvalidItemStateException
LockException
RepositoryException
public void checkout() throws UnsupportedRepositoryOperationException, LockException, ActivityViolationException, RepositoryException
checkout
in interface Node
UnsupportedRepositoryOperationException
LockException
ActivityViolationException
RepositoryException
public void doneMerge(Version version) throws VersionException, InvalidItemStateException, UnsupportedRepositoryOperationException, RepositoryException
doneMerge
in interface Node
VersionException
InvalidItemStateException
UnsupportedRepositoryOperationException
RepositoryException
public void cancelMerge(Version version) throws VersionException, InvalidItemStateException, UnsupportedRepositoryOperationException, RepositoryException
cancelMerge
in interface Node
VersionException
InvalidItemStateException
UnsupportedRepositoryOperationException
RepositoryException
public void update(String srcWorkspace) throws NoSuchWorkspaceException, AccessDeniedException, LockException, InvalidItemStateException, RepositoryException
update
in interface Node
NoSuchWorkspaceException
AccessDeniedException
LockException
InvalidItemStateException
RepositoryException
public NodeIterator merge(String srcWorkspace, boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException
merge
in interface Node
NoSuchWorkspaceException
AccessDeniedException
MergeException
LockException
InvalidItemStateException
RepositoryException
public String getCorrespondingNodePath(String workspaceName) throws ItemNotFoundException, NoSuchWorkspaceException, AccessDeniedException, RepositoryException
getCorrespondingNodePath
in interface Node
ItemNotFoundException
NoSuchWorkspaceException
AccessDeniedException
RepositoryException
protected final Path correspondingNodePath(String workspaceName) throws NoSuchWorkspaceException, ItemNotFoundException, RepositoryException
public NodeIterator getSharedSet() throws RepositoryException
getSharedSet
in interface Node
RepositoryException
public void removeSharedSet() throws VersionException, LockException, ConstraintViolationException, RepositoryException
removeSharedSet
in interface Node
VersionException
LockException
ConstraintViolationException
RepositoryException
public void removeShare() throws VersionException, LockException, ConstraintViolationException, RepositoryException
removeShare
in interface Node
VersionException
LockException
ConstraintViolationException
RepositoryException
public boolean isCheckedOut() throws RepositoryException
isCheckedOut
in interface Node
RepositoryException
public void restore(String versionName, boolean removeExisting) throws VersionException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException
restore
in interface Node
VersionException
ItemExistsException
UnsupportedRepositoryOperationException
LockException
InvalidItemStateException
RepositoryException
public void restore(Version version, boolean removeExisting) throws VersionException, ItemExistsException, InvalidItemStateException, UnsupportedRepositoryOperationException, LockException, RepositoryException
restore
in interface Node
VersionException
ItemExistsException
InvalidItemStateException
UnsupportedRepositoryOperationException
LockException
RepositoryException
public void restore(Version version, String relPath, boolean removeExisting) throws PathNotFoundException, ItemExistsException, VersionException, ConstraintViolationException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException
public void restoreByLabel(String versionLabel, boolean removeExisting) throws VersionException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException
restoreByLabel
in interface Node
VersionException
ItemExistsException
UnsupportedRepositoryOperationException
LockException
InvalidItemStateException
RepositoryException
public org.modeshape.jcr.JcrVersionHistoryNode getVersionHistory() throws UnsupportedRepositoryOperationException, RepositoryException
getVersionHistory
in interface Node
UnsupportedRepositoryOperationException
RepositoryException
public org.modeshape.jcr.JcrVersionNode getBaseVersion() throws UnsupportedRepositoryOperationException, RepositoryException
getBaseVersion
in interface Node
UnsupportedRepositoryOperationException
RepositoryException
public Lock lock(boolean isDeep, boolean isSessionScoped) throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, InvalidItemStateException, RepositoryException
lock
in interface Node
UnsupportedRepositoryOperationException
LockException
AccessDeniedException
InvalidItemStateException
RepositoryException
public final Lock getLock() throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, RepositoryException
getLock
in interface Node
UnsupportedRepositoryOperationException
LockException
AccessDeniedException
RepositoryException
protected final Lock getLockIfExists() throws UnsupportedRepositoryOperationException, AccessDeniedException, RepositoryException
public void unlock() throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, InvalidItemStateException, RepositoryException
unlock
in interface Node
UnsupportedRepositoryOperationException
LockException
AccessDeniedException
InvalidItemStateException
RepositoryException
public boolean isLocked() throws RepositoryException
isLocked
in interface Node
RepositoryException
public void followLifecycleTransition(String transition) throws UnsupportedRepositoryOperationException
followLifecycleTransition
in interface Node
UnsupportedRepositoryOperationException
public String[] getAllowedLifecycleTransistions() throws UnsupportedRepositoryOperationException, RepositoryException
getAllowedLifecycleTransistions
in interface Node
UnsupportedRepositoryOperationException
RepositoryException
public boolean isModified()
isModified
in interface Item
public boolean isSame(Item otherItem) throws RepositoryException
isSame
in interface Item
RepositoryException
public void accept(ItemVisitor visitor) throws RepositoryException
accept
in interface Item
RepositoryException
@Deprecated public void save() throws AccessDeniedException, ItemExistsException, ConstraintViolationException, InvalidItemStateException, ReferentialIntegrityException, VersionException, LockException, NoSuchNodeTypeException, RepositoryException
public void refresh(boolean keepChanges) throws RepositoryException
refresh
in interface Item
RepositoryException
public void remove() throws VersionException, LockException, ConstraintViolationException, AccessDeniedException, RepositoryException
According to Section 14.3 of the JCR 2.0 specification, an implementation may choose whether the Item.remove()
method (and the Session.removeItem(String)
method) behaves as a Node.removeShare()
or
Node.removeSharedSet()
. Node.removeShare()
just removes this node from the shared set,
whereas Node.removeSharedSet()
removes all nodes in the shared set, including the original shared node.
ModeShape implements Item.remove()
of a shared node as simply removing this node from the shared set. In other
words, this method is equivalent to calling removeShare()
.
remove
in interface Item
VersionException
LockException
ConstraintViolationException
AccessDeniedException
RepositoryException
Item.remove()
protected boolean containsChangesWithExternalDependencies(AtomicReference<Set<NodeKey>> affectedNodeKeys) throws RepositoryException
affectedNodeKeys
- the reference that should be assigned to the set of node keys that are at or below this node; may
be null if not neededInvalidItemStateException
ItemNotFoundException
RepositoryException
protected final void checkSession() throws RepositoryException
live
.RepositoryException
- if the session is not valid or livepublic Item getAncestor(int depth) throws RepositoryException
getAncestor
in interface Item
RepositoryException
public int getDepth() throws RepositoryException
getDepth
in interface Item
RepositoryException
protected boolean isSameRepository(Item otherItem) throws RepositoryException
RepositoryException
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.