public class MockNode extends Object implements javax.jcr.Node
| Constructor and Description |
|---|
MockNode(String path) |
MockNode(String path,
String type) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(javax.jcr.ItemVisitor visitor) |
void |
addMixin(String mixinName) |
javax.jcr.Node |
addNode(String relPath) |
javax.jcr.Node |
addNode(String relPath,
String primaryNodeTypeName) |
boolean |
canAddMixin(String mixinName) |
void |
cancelMerge(javax.jcr.version.Version version) |
javax.jcr.version.Version |
checkin() |
void |
checkout() |
void |
doneMerge(javax.jcr.version.Version version) |
boolean |
equals(Object obj) |
void |
followLifecycleTransition(String transition) |
String[] |
getAllowedLifecycleTransistions() |
javax.jcr.Item |
getAncestor(int depth) |
javax.jcr.version.Version |
getBaseVersion() |
String |
getCorrespondingNodePath(String workspaceName) |
javax.jcr.nodetype.NodeDefinition |
getDefinition() |
int |
getDepth() |
String |
getIdentifier() |
int |
getIndex() |
javax.jcr.lock.Lock |
getLock() |
javax.jcr.nodetype.NodeType[] |
getMixinNodeTypes() |
String |
getName() |
javax.jcr.Node |
getNode(String relPath) |
javax.jcr.NodeIterator |
getNodes() |
javax.jcr.NodeIterator |
getNodes(String namePattern) |
javax.jcr.NodeIterator |
getNodes(String[] nameGlobs) |
javax.jcr.Node |
getParent() |
String |
getPath() |
javax.jcr.Item |
getPrimaryItem() |
javax.jcr.nodetype.NodeType |
getPrimaryNodeType() |
javax.jcr.PropertyIterator |
getProperties() |
javax.jcr.PropertyIterator |
getProperties(String namePattern) |
javax.jcr.PropertyIterator |
getProperties(String[] nameGlobs) |
javax.jcr.Property |
getProperty(String relPath) |
javax.jcr.PropertyIterator |
getReferences() |
javax.jcr.PropertyIterator |
getReferences(String name) |
javax.jcr.Session |
getSession() |
javax.jcr.NodeIterator |
getSharedSet() |
String |
getUUID() |
javax.jcr.version.VersionHistory |
getVersionHistory() |
javax.jcr.PropertyIterator |
getWeakReferences() |
javax.jcr.PropertyIterator |
getWeakReferences(String name) |
int |
hashCode() |
boolean |
hasNode(String relPath) |
boolean |
hasNodes() |
boolean |
hasProperties() |
boolean |
hasProperty(String relPath) |
boolean |
holdsLock() |
boolean |
isCheckedOut() |
boolean |
isLocked() |
boolean |
isModified() |
boolean |
isNew() |
boolean |
isNode() |
boolean |
isNodeType(String nodeTypeName) |
boolean |
isSame(javax.jcr.Item otherItem) |
javax.jcr.lock.Lock |
lock(boolean isDeep,
boolean isSessionScoped) |
javax.jcr.NodeIterator |
merge(String srcWorkspace,
boolean bestEffort) |
void |
orderBefore(String srcChildRelPath,
String destChildRelPath) |
void |
refresh(boolean keepChanges) |
void |
remove() |
void |
removeMixin(String mixinName) |
void |
removeShare() |
void |
removeSharedSet() |
void |
restore(String versionName,
boolean removeExisting) |
void |
restore(javax.jcr.version.Version version,
boolean removeExisting) |
void |
restore(javax.jcr.version.Version version,
String relPath,
boolean removeExisting) |
void |
restoreByLabel(String versionLabel,
boolean removeExisting) |
void |
save() |
void |
setPrimaryType(String nodeTypeName) |
javax.jcr.Property |
setProperty(String name,
BigDecimal value) |
javax.jcr.Property |
setProperty(String name,
javax.jcr.Binary value) |
javax.jcr.Property |
setProperty(String name,
boolean value) |
javax.jcr.Property |
setProperty(String name,
Calendar value) |
javax.jcr.Property |
setProperty(String name,
double value) |
javax.jcr.Property |
setProperty(String name,
InputStream value) |
javax.jcr.Property |
setProperty(String name,
long value) |
javax.jcr.Property |
setProperty(String name,
javax.jcr.Node value) |
javax.jcr.Property |
setProperty(String name,
String value) |
javax.jcr.Property |
setProperty(String name,
String[] values) |
javax.jcr.Property |
setProperty(String name,
String[] values,
int type) |
javax.jcr.Property |
setProperty(String name,
String value,
int type) |
javax.jcr.Property |
setProperty(String name,
javax.jcr.Value value) |
javax.jcr.Property |
setProperty(String name,
javax.jcr.Value[] values) |
javax.jcr.Property |
setProperty(String name,
javax.jcr.Value[] values,
int type) |
javax.jcr.Property |
setProperty(String name,
javax.jcr.Value value,
int type) |
void |
setSession(javax.jcr.Session session) |
String |
toString() |
void |
unlock() |
void |
update(String srcWorkspaceName) |
public MockNode(String path)
public String getName()
getName in interface javax.jcr.Itempublic javax.jcr.Node getParent()
getParent in interface javax.jcr.Itempublic String getPath()
getPath in interface javax.jcr.Itempublic javax.jcr.nodetype.NodeType getPrimaryNodeType()
getPrimaryNodeType in interface javax.jcr.Nodepublic boolean isSame(javax.jcr.Item otherItem)
isSame in interface javax.jcr.Itempublic void addMixin(String mixinName)
addMixin in interface javax.jcr.Nodepublic javax.jcr.Node addNode(String relPath)
addNode in interface javax.jcr.Nodepublic javax.jcr.Node addNode(String relPath, String primaryNodeTypeName)
addNode in interface javax.jcr.Nodepublic boolean canAddMixin(String mixinName)
canAddMixin in interface javax.jcr.Nodepublic void cancelMerge(javax.jcr.version.Version version)
cancelMerge in interface javax.jcr.Nodepublic javax.jcr.version.Version checkin()
checkin in interface javax.jcr.Nodepublic void checkout()
checkout in interface javax.jcr.Nodepublic void doneMerge(javax.jcr.version.Version version)
doneMerge in interface javax.jcr.Nodepublic javax.jcr.version.Version getBaseVersion()
getBaseVersion in interface javax.jcr.Nodepublic String getCorrespondingNodePath(String workspaceName)
getCorrespondingNodePath in interface javax.jcr.Nodepublic javax.jcr.nodetype.NodeDefinition getDefinition()
getDefinition in interface javax.jcr.Nodepublic int getIndex()
getIndex in interface javax.jcr.Nodepublic javax.jcr.lock.Lock getLock()
getLock in interface javax.jcr.Nodepublic javax.jcr.nodetype.NodeType[] getMixinNodeTypes()
getMixinNodeTypes in interface javax.jcr.Nodepublic javax.jcr.Node getNode(String relPath)
getNode in interface javax.jcr.Nodepublic javax.jcr.NodeIterator getNodes()
getNodes in interface javax.jcr.Nodepublic javax.jcr.NodeIterator getNodes(String namePattern)
getNodes in interface javax.jcr.Nodepublic javax.jcr.Item getPrimaryItem()
getPrimaryItem in interface javax.jcr.Nodepublic javax.jcr.PropertyIterator getProperties()
getProperties in interface javax.jcr.Nodepublic javax.jcr.PropertyIterator getProperties(String namePattern) throws javax.jcr.RepositoryException
getProperties in interface javax.jcr.Nodejavax.jcr.RepositoryExceptionpublic javax.jcr.Property getProperty(String relPath)
getProperty in interface javax.jcr.Nodepublic javax.jcr.PropertyIterator getReferences()
getReferences in interface javax.jcr.Nodepublic String getUUID()
getUUID in interface javax.jcr.Nodepublic javax.jcr.version.VersionHistory getVersionHistory()
getVersionHistory in interface javax.jcr.Nodepublic boolean hasNode(String relPath)
hasNode in interface javax.jcr.Nodepublic boolean hasNodes()
hasNodes in interface javax.jcr.Nodepublic boolean hasProperties()
hasProperties in interface javax.jcr.Nodepublic boolean hasProperty(String relPath)
hasProperty in interface javax.jcr.Nodepublic boolean holdsLock()
holdsLock in interface javax.jcr.Nodepublic boolean isCheckedOut()
isCheckedOut in interface javax.jcr.Nodepublic boolean isLocked()
isLocked in interface javax.jcr.Nodepublic boolean isNodeType(String nodeTypeName)
isNodeType in interface javax.jcr.Nodepublic javax.jcr.lock.Lock lock(boolean isDeep,
boolean isSessionScoped)
lock in interface javax.jcr.Nodepublic javax.jcr.NodeIterator merge(String srcWorkspace, boolean bestEffort)
merge in interface javax.jcr.Nodepublic void orderBefore(String srcChildRelPath, String destChildRelPath)
orderBefore in interface javax.jcr.Nodepublic void removeMixin(String mixinName)
removeMixin in interface javax.jcr.Nodepublic void restore(String versionName, boolean removeExisting)
restore in interface javax.jcr.Nodepublic void restore(javax.jcr.version.Version version,
boolean removeExisting)
restore in interface javax.jcr.Nodepublic void restore(javax.jcr.version.Version version,
String relPath,
boolean removeExisting)
restore in interface javax.jcr.Nodepublic void restoreByLabel(String versionLabel, boolean removeExisting)
restoreByLabel in interface javax.jcr.Nodepublic javax.jcr.Property setProperty(String name, javax.jcr.Value value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
setProperty in interface javax.jcr.Nodejavax.jcr.ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.Property setProperty(String name, javax.jcr.Value[] values) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
setProperty in interface javax.jcr.Nodejavax.jcr.ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.Property setProperty(String name, String[] values) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
setProperty in interface javax.jcr.Nodejavax.jcr.ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.Property setProperty(String name, String value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
setProperty in interface javax.jcr.Nodejavax.jcr.ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.Property setProperty(String name, InputStream value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
setProperty in interface javax.jcr.Nodejavax.jcr.ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.Property setProperty(String name, boolean value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
setProperty in interface javax.jcr.Nodejavax.jcr.ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.Property setProperty(String name, double value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
setProperty in interface javax.jcr.Nodejavax.jcr.ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.Property setProperty(String name, long value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
setProperty in interface javax.jcr.Nodejavax.jcr.ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.Property setProperty(String name, Calendar value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
setProperty in interface javax.jcr.Nodejavax.jcr.ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.Property setProperty(String name, javax.jcr.Node value)
setProperty in interface javax.jcr.Nodepublic javax.jcr.Property setProperty(String name, javax.jcr.Value value, int type)
setProperty in interface javax.jcr.Nodepublic javax.jcr.Property setProperty(String name, javax.jcr.Value[] values, int type)
setProperty in interface javax.jcr.Nodepublic javax.jcr.Property setProperty(String name, String[] values, int type)
setProperty in interface javax.jcr.Nodepublic javax.jcr.Property setProperty(String name, String value, int type)
setProperty in interface javax.jcr.Nodepublic void unlock()
unlock in interface javax.jcr.Nodepublic void update(String srcWorkspaceName)
update in interface javax.jcr.Nodepublic void accept(javax.jcr.ItemVisitor visitor)
accept in interface javax.jcr.Itempublic javax.jcr.Item getAncestor(int depth)
getAncestor in interface javax.jcr.Itempublic int getDepth()
getDepth in interface javax.jcr.Itempublic javax.jcr.Session getSession()
getSession in interface javax.jcr.Itempublic void setSession(javax.jcr.Session session)
public boolean isModified()
isModified in interface javax.jcr.Itempublic boolean isNew()
isNew in interface javax.jcr.Itempublic boolean isNode()
isNode in interface javax.jcr.Itempublic void refresh(boolean keepChanges)
refresh in interface javax.jcr.Itempublic void remove()
remove in interface javax.jcr.Itempublic void save()
save in interface javax.jcr.Itempublic void followLifecycleTransition(String transition) throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.InvalidLifecycleTransitionException, javax.jcr.RepositoryException
followLifecycleTransition in interface javax.jcr.Nodejavax.jcr.UnsupportedRepositoryOperationExceptionjavax.jcr.InvalidLifecycleTransitionExceptionjavax.jcr.RepositoryExceptionpublic String[] getAllowedLifecycleTransistions() throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
getAllowedLifecycleTransistions in interface javax.jcr.Nodejavax.jcr.UnsupportedRepositoryOperationExceptionjavax.jcr.RepositoryExceptionpublic String getIdentifier() throws javax.jcr.RepositoryException
getIdentifier in interface javax.jcr.Nodejavax.jcr.RepositoryExceptionpublic javax.jcr.NodeIterator getNodes(String[] nameGlobs) throws javax.jcr.RepositoryException
getNodes in interface javax.jcr.Nodejavax.jcr.RepositoryExceptionpublic javax.jcr.PropertyIterator getProperties(String[] nameGlobs) throws javax.jcr.RepositoryException
getProperties in interface javax.jcr.Nodejavax.jcr.RepositoryExceptionpublic javax.jcr.PropertyIterator getReferences(String name) throws javax.jcr.RepositoryException
getReferences in interface javax.jcr.Nodejavax.jcr.RepositoryExceptionpublic javax.jcr.NodeIterator getSharedSet()
throws javax.jcr.RepositoryException
getSharedSet in interface javax.jcr.Nodejavax.jcr.RepositoryExceptionpublic javax.jcr.PropertyIterator getWeakReferences()
throws javax.jcr.RepositoryException
getWeakReferences in interface javax.jcr.Nodejavax.jcr.RepositoryExceptionpublic javax.jcr.PropertyIterator getWeakReferences(String name) throws javax.jcr.RepositoryException
getWeakReferences in interface javax.jcr.Nodejavax.jcr.RepositoryExceptionpublic void removeShare()
throws javax.jcr.version.VersionException,
javax.jcr.lock.LockException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.RepositoryException
removeShare in interface javax.jcr.Nodejavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic void removeSharedSet()
throws javax.jcr.version.VersionException,
javax.jcr.lock.LockException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.RepositoryException
removeSharedSet in interface javax.jcr.Nodejavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic void setPrimaryType(String nodeTypeName) throws javax.jcr.nodetype.NoSuchNodeTypeException, javax.jcr.version.VersionException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.lock.LockException, javax.jcr.RepositoryException
setPrimaryType in interface javax.jcr.Nodejavax.jcr.nodetype.NoSuchNodeTypeExceptionjavax.jcr.version.VersionExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.lock.LockExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.Property setProperty(String name, BigDecimal value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
setProperty in interface javax.jcr.Nodejavax.jcr.ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.Property setProperty(String name, javax.jcr.Binary value) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
setProperty in interface javax.jcr.Nodejavax.jcr.ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.