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.Item
public javax.jcr.Node getParent()
getParent
in interface javax.jcr.Item
public String getPath()
getPath
in interface javax.jcr.Item
public javax.jcr.nodetype.NodeType getPrimaryNodeType()
getPrimaryNodeType
in interface javax.jcr.Node
public boolean isSame(javax.jcr.Item otherItem)
isSame
in interface javax.jcr.Item
public void addMixin(String mixinName)
addMixin
in interface javax.jcr.Node
public javax.jcr.Node addNode(String relPath)
addNode
in interface javax.jcr.Node
public javax.jcr.Node addNode(String relPath, String primaryNodeTypeName)
addNode
in interface javax.jcr.Node
public boolean canAddMixin(String mixinName)
canAddMixin
in interface javax.jcr.Node
public void cancelMerge(javax.jcr.version.Version version)
cancelMerge
in interface javax.jcr.Node
public javax.jcr.version.Version checkin()
checkin
in interface javax.jcr.Node
public void checkout()
checkout
in interface javax.jcr.Node
public void doneMerge(javax.jcr.version.Version version)
doneMerge
in interface javax.jcr.Node
public javax.jcr.version.Version getBaseVersion()
getBaseVersion
in interface javax.jcr.Node
public String getCorrespondingNodePath(String workspaceName)
getCorrespondingNodePath
in interface javax.jcr.Node
public javax.jcr.nodetype.NodeDefinition getDefinition()
getDefinition
in interface javax.jcr.Node
public int getIndex()
getIndex
in interface javax.jcr.Node
public javax.jcr.lock.Lock getLock()
getLock
in interface javax.jcr.Node
public javax.jcr.nodetype.NodeType[] getMixinNodeTypes()
getMixinNodeTypes
in interface javax.jcr.Node
public javax.jcr.Node getNode(String relPath)
getNode
in interface javax.jcr.Node
public javax.jcr.NodeIterator getNodes()
getNodes
in interface javax.jcr.Node
public javax.jcr.NodeIterator getNodes(String namePattern)
getNodes
in interface javax.jcr.Node
public javax.jcr.Item getPrimaryItem()
getPrimaryItem
in interface javax.jcr.Node
public javax.jcr.PropertyIterator getProperties()
getProperties
in interface javax.jcr.Node
public javax.jcr.PropertyIterator getProperties(String namePattern) throws javax.jcr.RepositoryException
getProperties
in interface javax.jcr.Node
javax.jcr.RepositoryException
public javax.jcr.Property getProperty(String relPath)
getProperty
in interface javax.jcr.Node
public javax.jcr.PropertyIterator getReferences()
getReferences
in interface javax.jcr.Node
public String getUUID()
getUUID
in interface javax.jcr.Node
public javax.jcr.version.VersionHistory getVersionHistory()
getVersionHistory
in interface javax.jcr.Node
public boolean hasNode(String relPath)
hasNode
in interface javax.jcr.Node
public boolean hasNodes()
hasNodes
in interface javax.jcr.Node
public boolean hasProperties()
hasProperties
in interface javax.jcr.Node
public boolean hasProperty(String relPath)
hasProperty
in interface javax.jcr.Node
public boolean holdsLock()
holdsLock
in interface javax.jcr.Node
public boolean isCheckedOut()
isCheckedOut
in interface javax.jcr.Node
public boolean isLocked()
isLocked
in interface javax.jcr.Node
public boolean isNodeType(String nodeTypeName)
isNodeType
in interface javax.jcr.Node
public javax.jcr.lock.Lock lock(boolean isDeep, boolean isSessionScoped)
lock
in interface javax.jcr.Node
public javax.jcr.NodeIterator merge(String srcWorkspace, boolean bestEffort)
merge
in interface javax.jcr.Node
public void orderBefore(String srcChildRelPath, String destChildRelPath)
orderBefore
in interface javax.jcr.Node
public void removeMixin(String mixinName)
removeMixin
in interface javax.jcr.Node
public void restore(String versionName, boolean removeExisting)
restore
in interface javax.jcr.Node
public void restore(javax.jcr.version.Version version, boolean removeExisting)
restore
in interface javax.jcr.Node
public void restore(javax.jcr.version.Version version, String relPath, boolean removeExisting)
restore
in interface javax.jcr.Node
public void restoreByLabel(String versionLabel, boolean removeExisting)
restoreByLabel
in interface javax.jcr.Node
public 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.Node
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public 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.Node
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public 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.Node
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public 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.Node
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public 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.Node
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public 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.Node
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public 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.Node
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public 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.Node
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public 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.Node
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public javax.jcr.Property setProperty(String name, javax.jcr.Node value)
setProperty
in interface javax.jcr.Node
public javax.jcr.Property setProperty(String name, javax.jcr.Value value, int type)
setProperty
in interface javax.jcr.Node
public javax.jcr.Property setProperty(String name, javax.jcr.Value[] values, int type)
setProperty
in interface javax.jcr.Node
public javax.jcr.Property setProperty(String name, String[] values, int type)
setProperty
in interface javax.jcr.Node
public javax.jcr.Property setProperty(String name, String value, int type)
setProperty
in interface javax.jcr.Node
public void unlock()
unlock
in interface javax.jcr.Node
public void update(String srcWorkspaceName)
update
in interface javax.jcr.Node
public void accept(javax.jcr.ItemVisitor visitor)
accept
in interface javax.jcr.Item
public javax.jcr.Item getAncestor(int depth)
getAncestor
in interface javax.jcr.Item
public int getDepth()
getDepth
in interface javax.jcr.Item
public javax.jcr.Session getSession()
getSession
in interface javax.jcr.Item
public void setSession(javax.jcr.Session session)
public boolean isModified()
isModified
in interface javax.jcr.Item
public boolean isNew()
isNew
in interface javax.jcr.Item
public boolean isNode()
isNode
in interface javax.jcr.Item
public void refresh(boolean keepChanges)
refresh
in interface javax.jcr.Item
public void remove()
remove
in interface javax.jcr.Item
public void save()
save
in interface javax.jcr.Item
public void followLifecycleTransition(String transition) throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.InvalidLifecycleTransitionException, javax.jcr.RepositoryException
followLifecycleTransition
in interface javax.jcr.Node
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.InvalidLifecycleTransitionException
javax.jcr.RepositoryException
public String[] getAllowedLifecycleTransistions() throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
getAllowedLifecycleTransistions
in interface javax.jcr.Node
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
public String getIdentifier() throws javax.jcr.RepositoryException
getIdentifier
in interface javax.jcr.Node
javax.jcr.RepositoryException
public javax.jcr.NodeIterator getNodes(String[] nameGlobs) throws javax.jcr.RepositoryException
getNodes
in interface javax.jcr.Node
javax.jcr.RepositoryException
public javax.jcr.PropertyIterator getProperties(String[] nameGlobs) throws javax.jcr.RepositoryException
getProperties
in interface javax.jcr.Node
javax.jcr.RepositoryException
public javax.jcr.PropertyIterator getReferences(String name) throws javax.jcr.RepositoryException
getReferences
in interface javax.jcr.Node
javax.jcr.RepositoryException
public javax.jcr.NodeIterator getSharedSet() throws javax.jcr.RepositoryException
getSharedSet
in interface javax.jcr.Node
javax.jcr.RepositoryException
public javax.jcr.PropertyIterator getWeakReferences() throws javax.jcr.RepositoryException
getWeakReferences
in interface javax.jcr.Node
javax.jcr.RepositoryException
public javax.jcr.PropertyIterator getWeakReferences(String name) throws javax.jcr.RepositoryException
getWeakReferences
in interface javax.jcr.Node
javax.jcr.RepositoryException
public void removeShare() throws javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
removeShare
in interface javax.jcr.Node
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public void removeSharedSet() throws javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
removeSharedSet
in interface javax.jcr.Node
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public 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.Node
javax.jcr.nodetype.NoSuchNodeTypeException
javax.jcr.version.VersionException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.lock.LockException
javax.jcr.RepositoryException
public 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.Node
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public 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.Node
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.