public class ClientNode extends ClientItem implements Node
RemoteNode
interface. This class makes a remote node locally available using
the JCR Node
interface.Node
,
RemoteNode
JCR_CHILD_NODE_DEFINITION, JCR_CONTENT, JCR_FROZEN_NODE, JCR_PROPERTY_DEFINITION, JCR_ROOT_VERSION, JCR_VERSION_LABELS
Constructor and Description |
---|
ClientNode(Session session,
RemoteNode remote,
LocalAdapterFactory factory)
Creates a local adapter for the given remote node.
|
getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isSame, refresh, remove, save
getFactory, getItem, getNode, getNodeTypeArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isSame, refresh, remove, save
public ClientNode(Session session, RemoteNode remote, LocalAdapterFactory factory)
session
- current sessionremote
- remote nodefactory
- local adapter factorypublic boolean isNode()
true
without contacting the remote node.
Returns false by default without contacting the remote item.
This method should be overridden by Node
subclasses.
isNode
in interface Item
isNode
in class ClientItem
public void accept(ItemVisitor visitor) throws RepositoryException
ItemVisitor.visit(Node)
method of the given visitor. Does not contact the remote node, but
the visitor may invoke other methods that do contact the remote node.
Accepts the visitor to visit this item. Node
and
Property
subclasses should override this method
to call the appropriate ItemVisitor
methods,
as the default implementation does nothing.
accept
in interface Item
accept
in class ClientItem
RepositoryException
public Node addNode(String path) throws RepositoryException
addNode
in interface Node
RepositoryException
public Node addNode(String path, String type) throws RepositoryException
addNode
in interface Node
RepositoryException
public void orderBefore(String src, String dst) throws RepositoryException
orderBefore
in interface Node
RepositoryException
public Property setProperty(String name, Value value) throws RepositoryException
setProperty
in interface Node
RepositoryException
public Property setProperty(String name, Value[] values) throws RepositoryException
setProperty
in interface Node
RepositoryException
public Property setProperty(String name, String[] strings) throws RepositoryException
setProperty
in interface Node
RepositoryException
public Property setProperty(String name, String value) throws RepositoryException
setProperty
in interface Node
RepositoryException
public Property setProperty(String name, InputStream value) throws RepositoryException
setProperty
in interface Node
RepositoryException
public Property setProperty(String name, boolean value) throws RepositoryException
setProperty
in interface Node
RepositoryException
public Property setProperty(String name, double value) throws RepositoryException
setProperty
in interface Node
RepositoryException
public Property setProperty(String name, long value) throws RepositoryException
setProperty
in interface Node
RepositoryException
public Property setProperty(String name, Calendar value) throws RepositoryException
setProperty
in interface Node
RepositoryException
public Property setProperty(String name, Node value) throws RepositoryException
setProperty
in interface Node
RepositoryException
public Property setProperty(String name, Binary value) throws RepositoryException
setProperty
in interface Node
RepositoryException
public Property setProperty(String name, BigDecimal value) throws RepositoryException
setProperty
in interface Node
RepositoryException
public Node getNode(String path) throws RepositoryException
getNode
in interface Node
RepositoryException
public NodeIterator getNodes() throws RepositoryException
getNodes
in interface Node
RepositoryException
public NodeIterator getNodes(String pattern) throws RepositoryException
getNodes
in interface Node
RepositoryException
public NodeIterator getNodes(String[] globs) throws RepositoryException
getNodes
in interface Node
RepositoryException
public Property getProperty(String path) throws RepositoryException
getProperty
in interface Node
RepositoryException
public PropertyIterator getProperties() throws RepositoryException
getProperties
in interface Node
RepositoryException
public PropertyIterator getProperties(String pattern) throws RepositoryException
getProperties
in interface Node
RepositoryException
public PropertyIterator getProperties(String[] globs) throws RepositoryException
getProperties
in interface Node
RepositoryException
public Item getPrimaryItem() throws RepositoryException
getPrimaryItem
in interface Node
RepositoryException
public String getIdentifier() throws RepositoryException
getIdentifier
in interface Node
RepositoryException
public String getUUID() throws RepositoryException
getUUID
in interface Node
RepositoryException
public PropertyIterator getReferences() throws RepositoryException
getReferences
in interface Node
RepositoryException
public PropertyIterator getReferences(String name) throws RepositoryException
getReferences
in interface Node
RepositoryException
public boolean hasNode(String path) throws RepositoryException
hasNode
in interface Node
RepositoryException
public boolean hasProperty(String path) 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 NodeType getPrimaryNodeType() throws RepositoryException
getPrimaryNodeType
in interface Node
RepositoryException
public NodeType[] getMixinNodeTypes() throws RepositoryException
getMixinNodeTypes
in interface Node
RepositoryException
public boolean isNodeType(String type) throws RepositoryException
isNodeType
in interface Node
RepositoryException
public void addMixin(String name) throws RepositoryException
addMixin
in interface Node
RepositoryException
public void removeMixin(String name) throws RepositoryException
removeMixin
in interface Node
RepositoryException
public boolean canAddMixin(String name) throws RepositoryException
canAddMixin
in interface Node
RepositoryException
public NodeDefinition getDefinition() throws RepositoryException
getDefinition
in interface Node
RepositoryException
public Version checkin() throws RepositoryException
checkin
in interface Node
RepositoryException
public void checkout() throws RepositoryException
checkout
in interface Node
RepositoryException
public void update(String workspace) throws RepositoryException
update
in interface Node
RepositoryException
public NodeIterator merge(String workspace, boolean bestEffort) throws RepositoryException
merge
in interface Node
RepositoryException
public void cancelMerge(Version version) throws RepositoryException
cancelMerge
in interface Node
RepositoryException
public void doneMerge(Version version) throws RepositoryException
doneMerge
in interface Node
RepositoryException
public String getCorrespondingNodePath(String workspace) throws RepositoryException
getCorrespondingNodePath
in interface Node
RepositoryException
public int getIndex() throws RepositoryException
getIndex
in interface Node
RepositoryException
public void restore(String version, boolean removeExisting) throws RepositoryException
restore
in interface Node
RepositoryException
public void restore(Version version, boolean removeExisting) throws RepositoryException
restore
in interface Node
RepositoryException
public void restore(Version version, String path, boolean removeExisting) throws RepositoryException
restore
in interface Node
RepositoryException
public void restoreByLabel(String label, boolean removeExisting) throws RepositoryException
restoreByLabel
in interface Node
RepositoryException
public Property setProperty(String name, String[] strings, int type) throws RepositoryException
setProperty
in interface Node
RepositoryException
public Property setProperty(String name, Value[] values, int type) throws RepositoryException
setProperty
in interface Node
RepositoryException
public Property setProperty(String name, Value value, int type) throws RepositoryException
setProperty
in interface Node
RepositoryException
public Property setProperty(String name, String string, int type) throws RepositoryException
setProperty
in interface Node
RepositoryException
public boolean isCheckedOut() throws RepositoryException
isCheckedOut
in interface Node
RepositoryException
public VersionHistory getVersionHistory() throws RepositoryException
getVersionHistory
in interface Node
RepositoryException
public Version getBaseVersion() throws RepositoryException
getBaseVersion
in interface Node
RepositoryException
public Lock lock(boolean isDeep, boolean isSessionScoped) throws RepositoryException
lock
in interface Node
RepositoryException
public Lock getLock() throws RepositoryException
getLock
in interface Node
RepositoryException
public void unlock() throws RepositoryException
unlock
in interface Node
RepositoryException
public boolean holdsLock() throws RepositoryException
holdsLock
in interface Node
RepositoryException
public boolean isLocked() throws RepositoryException
isLocked
in interface Node
RepositoryException
public void followLifecycleTransition(String transition) throws RepositoryException
followLifecycleTransition
in interface Node
RepositoryException
public String[] getAllowedLifecycleTransistions() throws RepositoryException
getAllowedLifecycleTransistions
in interface Node
RepositoryException
public NodeIterator getSharedSet() throws RepositoryException
getSharedSet
in interface Node
RepositoryException
public PropertyIterator getWeakReferences() throws RepositoryException
getWeakReferences
in interface Node
RepositoryException
public PropertyIterator getWeakReferences(String name) throws RepositoryException
getWeakReferences
in interface Node
RepositoryException
public void removeShare() throws RepositoryException
removeShare
in interface Node
RepositoryException
public void removeSharedSet() throws RepositoryException
removeSharedSet
in interface Node
RepositoryException
public void setPrimaryType(String nodeTypeName) throws RepositoryException
setPrimaryType
in interface Node
RepositoryException
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.