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) |
protected void |
addMixin(String mixinName,
boolean checkPermissions) |
org.modeshape.jcr.AbstractJcrNode |
addNode(String relPath) |
org.modeshape.jcr.AbstractJcrNode |
addNode(String relPath,
String primaryNodeTypeName) |
protected void |
autoCreateChildren(Name primaryType,
RepositoryNodeTypeManager.NodeTypes capabilities)
Create in this node any auto-created child nodes.
|
protected LinkedList<Property> |
autoCreatePropertiesFor(Name nodeName,
int snsIndex,
Name primaryType,
PropertyFactory propertyFactory,
RepositoryNodeTypeManager.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 long |
childCount(Name name)
Get the number of children that have the supplied name.
|
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 |
getNode(String relativePath,
boolean aclScope)
Gets access to the node with given relative path with enabled or disabled
permission testing.
|
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() |
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, waitgetAncestor, getDepthprotected final NodeKey key
protected final JcrSession session
protected void doRemove()
throws ConstraintViolationException,
RepositoryException
protected void checkNodeTypeCanBeModified()
throws RepositoryException
RepositoryExceptionpublic int getIndex()
throws RepositoryException
getIndex in interface NodeRepositoryExceptionpublic String getName() throws RepositoryException
RepositoryExceptionpublic org.modeshape.jcr.AbstractJcrNode getParent()
throws ItemNotFoundException,
RepositoryException
getParent in interface ItemItemNotFoundExceptionRepositoryExceptionpublic String getPath() throws RepositoryException
RepositoryExceptionprotected 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
RepositoryExceptionprotected final MutableCachedNode mutableParent() throws RepositoryException
RepositoryExceptionprotected final String location()
protected Name name() throws RepositoryException
RepositoryExceptionprotected Path.Segment segment() throws RepositoryException
RepositoryExceptionprotected 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 Nodepublic final JcrSession getSession()
getSession in interface Itempublic String getLocalName() throws RepositoryException
NamespacedgetLocalName in interface NamespacedRepositoryException - if an error occurs.public String getNamespaceURI() throws RepositoryException
NamespacedgetNamespaceURI in interface NamespacedRepositoryException - if an error occurs.public org.modeshape.jcr.AbstractJcrProperty getProperty(String relativePath) throws PathNotFoundException, RepositoryException
getProperty in interface NodePathNotFoundExceptionRepositoryExceptionprotected 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 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
RepositoryExceptionprotected final long childCount(Name name) throws RepositoryException
name - the child nameRepositoryExceptionprotected 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 NodeRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrNode getNode(String relativePath) throws PathNotFoundException, RepositoryException
getNode in interface NodePathNotFoundExceptionRepositoryExceptionprotected org.modeshape.jcr.AbstractJcrNode getNode(String relativePath, boolean aclScope) throws PathNotFoundException, RepositoryException
relativePath - the relative path of the node to accessaclScope - true to disable permissions testing and false otherwisePathNotFoundExceptionRepositoryExceptionAccessControlException - in case of negative results of permission
check procedure.public NodeIterator getNodes() throws RepositoryException
getNodes in interface NodeRepositoryExceptionprotected NodeIterator getNodesInternal() throws RepositoryException
RepositoryExceptionpublic NodeIterator getNodes(String namePattern) throws RepositoryException
getNodes in interface NodeRepositoryExceptionprotected NodeIterator getNodesInternal(String namePattern) throws RepositoryException
RepositoryExceptionpublic NodeIterator getNodes(String[] nameGlobs) throws RepositoryException
getNodes in interface NodeRepositoryExceptionprotected NodeIterator getNodesInternal(String... nameGlobs) throws RepositoryException
RepositoryExceptionprotected static List<?> createPatternsFor(String... namePatterns) throws RepositoryException
RepositoryExceptionpublic org.modeshape.jcr.AbstractJcrNode addNode(String relPath) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException
addNode in interface NodeItemExistsExceptionPathNotFoundExceptionVersionExceptionConstraintViolationExceptionLockExceptionRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrNode addNode(String relPath, String primaryNodeTypeName) throws ItemExistsException, PathNotFoundException, NoSuchNodeTypeException, LockException, VersionException, ConstraintViolationException, RepositoryException
addNode in interface NodeItemExistsExceptionPathNotFoundExceptionNoSuchNodeTypeExceptionLockExceptionVersionExceptionConstraintViolationExceptionRepositoryExceptionprotected 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, int snsIndex, Name primaryType, PropertyFactory propertyFactory, RepositoryNodeTypeManager.NodeTypes capabilities)
nodeName - the name of the node; may not be nullsnsIndex - the same-name-sibling index for this nodeprimaryType - 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, RepositoryNodeTypeManager.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 NodeUnsupportedRepositoryOperationExceptionVersionExceptionConstraintViolationExceptionItemNotFoundExceptionLockExceptionRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrProperty setProperty(String name, Value value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty in interface NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrProperty setProperty(String name, Value value, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty in interface NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrProperty setProperty(String name, Value[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty in interface NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrProperty setProperty(String name, Value[] values, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty in interface NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrProperty setProperty(String name, String[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty in interface NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionprotected 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 NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrProperty setProperty(String name, String value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty in interface NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionprotected 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 NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrProperty setProperty(String name, InputStream value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty in interface NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrProperty setProperty(String name, Binary value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty in interface NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrProperty setProperty(String name, boolean value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty in interface NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrProperty setProperty(String name, double value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty in interface NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrProperty setProperty(String name, BigDecimal value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty in interface NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrProperty setProperty(String name, long value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty in interface NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrProperty setProperty(String name, Calendar value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty in interface NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic org.modeshape.jcr.AbstractJcrProperty setProperty(String name, Node value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
setProperty in interface NodeValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic PropertyIterator getProperties() throws RepositoryException
getProperties in interface NodeRepositoryExceptionpublic PropertyIterator getProperties(String namePattern) throws RepositoryException
getProperties in interface NodeRepositoryExceptionpublic PropertyIterator getProperties(String[] nameGlobs) throws RepositoryException
getProperties in interface NodeRepositoryExceptionpublic Item getPrimaryItem() throws ItemNotFoundException, RepositoryException
getPrimaryItem in interface NodeItemNotFoundExceptionRepositoryException@Deprecated public final String getUUID() throws UnsupportedRepositoryOperationException, RepositoryException
getUUID in interface NodeUnsupportedRepositoryOperationExceptionRepositoryExceptionpublic final PropertyIterator getReferences() throws RepositoryException
getReferences in interface NodeRepositoryExceptionpublic final PropertyIterator getReferences(String propertyName) throws RepositoryException
getReferences in interface NodeRepositoryExceptionpublic PropertyIterator getWeakReferences() throws RepositoryException
getWeakReferences in interface NodeRepositoryExceptionpublic PropertyIterator getWeakReferences(String propertyName) throws RepositoryException
getWeakReferences in interface NodeRepositoryExceptionprotected 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.WEAKREFERENCEempty 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 NodeRepositoryExceptionpublic boolean hasNodes()
throws RepositoryException
hasNodes in interface NodeRepositoryExceptionpublic boolean hasProperties()
throws RepositoryException
hasProperties in interface NodeRepositoryExceptionpublic org.modeshape.jcr.JcrNodeType getPrimaryNodeType()
throws RepositoryException
getPrimaryNodeType in interface NodeRepositoryExceptionpublic NodeType[] getMixinNodeTypes() throws RepositoryException
getMixinNodeTypes in interface NodeRepositoryExceptionpublic boolean isNodeType(String nodeTypeName) throws RepositoryException
isNodeType in interface NodeRepositoryExceptionpublic 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 NodeNoSuchNodeTypeExceptionVersionExceptionConstraintViolationExceptionLockExceptionRepositoryExceptionpublic void addMixin(String mixinName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException
addMixin in interface NodeNoSuchNodeTypeExceptionVersionExceptionConstraintViolationExceptionLockExceptionRepositoryExceptionprotected void addMixin(String mixinName, boolean checkPermissions) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException
public void removeMixin(String mixinName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException
removeMixin in interface NodeNoSuchNodeTypeExceptionVersionExceptionConstraintViolationExceptionLockExceptionRepositoryExceptionpublic boolean canAddMixin(String mixinName) throws NoSuchNodeTypeException, RepositoryException
canAddMixin in interface NodeNoSuchNodeTypeExceptionRepositoryExceptionpublic NodeDefinition getDefinition() throws RepositoryException
getDefinition in interface NodeRepositoryExceptionpublic Version checkin() throws VersionException, UnsupportedRepositoryOperationException, InvalidItemStateException, LockException, RepositoryException
checkin in interface NodeVersionExceptionUnsupportedRepositoryOperationExceptionInvalidItemStateExceptionLockExceptionRepositoryExceptionpublic void checkout()
throws UnsupportedRepositoryOperationException,
LockException,
ActivityViolationException,
RepositoryException
checkout in interface NodeUnsupportedRepositoryOperationExceptionLockExceptionActivityViolationExceptionRepositoryExceptionpublic void doneMerge(Version version) throws VersionException, InvalidItemStateException, UnsupportedRepositoryOperationException, RepositoryException
doneMerge in interface NodeVersionExceptionInvalidItemStateExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionpublic void cancelMerge(Version version) throws VersionException, InvalidItemStateException, UnsupportedRepositoryOperationException, RepositoryException
cancelMerge in interface NodeVersionExceptionInvalidItemStateExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionpublic void update(String srcWorkspace) throws NoSuchWorkspaceException, AccessDeniedException, LockException, InvalidItemStateException, RepositoryException
update in interface NodeNoSuchWorkspaceExceptionAccessDeniedExceptionLockExceptionInvalidItemStateExceptionRepositoryExceptionpublic NodeIterator merge(String srcWorkspace, boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException
merge in interface NodeNoSuchWorkspaceExceptionAccessDeniedExceptionMergeExceptionLockExceptionInvalidItemStateExceptionRepositoryExceptionpublic String getCorrespondingNodePath(String workspaceName) throws ItemNotFoundException, NoSuchWorkspaceException, AccessDeniedException, RepositoryException
getCorrespondingNodePath in interface NodeItemNotFoundExceptionNoSuchWorkspaceExceptionAccessDeniedExceptionRepositoryExceptionprotected final Path correspondingNodePath(String workspaceName) throws NoSuchWorkspaceException, ItemNotFoundException, RepositoryException
public NodeIterator getSharedSet() throws RepositoryException
getSharedSet in interface NodeRepositoryExceptionpublic void removeSharedSet()
throws VersionException,
LockException,
ConstraintViolationException,
RepositoryException
removeSharedSet in interface NodeVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic void removeShare()
throws VersionException,
LockException,
ConstraintViolationException,
RepositoryException
removeShare in interface NodeVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic boolean isCheckedOut()
throws RepositoryException
isCheckedOut in interface NodeRepositoryExceptionpublic void restore(String versionName, boolean removeExisting) throws VersionException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException
restore in interface NodeVersionExceptionItemExistsExceptionUnsupportedRepositoryOperationExceptionLockExceptionInvalidItemStateExceptionRepositoryExceptionpublic void restore(Version version, boolean removeExisting) throws VersionException, ItemExistsException, InvalidItemStateException, UnsupportedRepositoryOperationException, LockException, RepositoryException
restore in interface NodeVersionExceptionItemExistsExceptionInvalidItemStateExceptionUnsupportedRepositoryOperationExceptionLockExceptionRepositoryExceptionpublic 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 NodeVersionExceptionItemExistsExceptionUnsupportedRepositoryOperationExceptionLockExceptionInvalidItemStateExceptionRepositoryExceptionpublic org.modeshape.jcr.JcrVersionHistoryNode getVersionHistory()
throws UnsupportedRepositoryOperationException,
RepositoryException
getVersionHistory in interface NodeUnsupportedRepositoryOperationExceptionRepositoryExceptionpublic org.modeshape.jcr.JcrVersionNode getBaseVersion()
throws UnsupportedRepositoryOperationException,
RepositoryException
getBaseVersion in interface NodeUnsupportedRepositoryOperationExceptionRepositoryExceptionpublic Lock lock(boolean isDeep, boolean isSessionScoped) throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, InvalidItemStateException, RepositoryException
lock in interface NodeUnsupportedRepositoryOperationExceptionLockExceptionAccessDeniedExceptionInvalidItemStateExceptionRepositoryExceptionpublic final Lock getLock() throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, RepositoryException
getLock in interface NodeUnsupportedRepositoryOperationExceptionLockExceptionAccessDeniedExceptionRepositoryExceptionprotected final Lock getLockIfExists() throws UnsupportedRepositoryOperationException, AccessDeniedException, RepositoryException
public void unlock()
throws UnsupportedRepositoryOperationException,
LockException,
AccessDeniedException,
InvalidItemStateException,
RepositoryException
unlock in interface NodeUnsupportedRepositoryOperationExceptionLockExceptionAccessDeniedExceptionInvalidItemStateExceptionRepositoryExceptionpublic boolean isLocked()
throws RepositoryException
isLocked in interface NodeRepositoryExceptionpublic void followLifecycleTransition(String transition) throws UnsupportedRepositoryOperationException
followLifecycleTransition in interface NodeUnsupportedRepositoryOperationExceptionpublic String[] getAllowedLifecycleTransistions() throws UnsupportedRepositoryOperationException, RepositoryException
getAllowedLifecycleTransistions in interface NodeUnsupportedRepositoryOperationExceptionRepositoryExceptionpublic boolean isModified()
isModified in interface Itempublic boolean isSame(Item otherItem) throws RepositoryException
isSame in interface ItemRepositoryExceptionpublic void accept(ItemVisitor visitor) throws RepositoryException
accept in interface ItemRepositoryException@Deprecated public void save() throws AccessDeniedException, ItemExistsException, ConstraintViolationException, InvalidItemStateException, ReferentialIntegrityException, VersionException, LockException, NoSuchNodeTypeException, RepositoryException
public void refresh(boolean keepChanges)
throws RepositoryException
refresh in interface ItemRepositoryExceptionpublic 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 ItemVersionExceptionLockExceptionConstraintViolationExceptionAccessDeniedExceptionRepositoryExceptionItem.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 neededInvalidItemStateExceptionItemNotFoundExceptionRepositoryExceptionprotected final void checkSession()
throws RepositoryException
live.RepositoryException - if the session is not valid or livepublic Item getAncestor(int depth) throws RepositoryException
getAncestor in interface ItemRepositoryExceptionpublic int getDepth()
throws RepositoryException
getDepth in interface ItemRepositoryExceptionprotected boolean isSameRepository(Item otherItem) throws RepositoryException
RepositoryExceptionCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.