public class NodeDBObject extends java.lang.Object implements ReloadEventListener
Modifier and Type | Field and Description |
---|---|
protected DBFile |
file |
protected DBFolder |
folder |
static java.lang.String |
JCR_XMLCHAR |
static java.lang.String |
JCR_XMLTEXT |
static java.lang.String |
MIX_REFERENCABLE |
static java.lang.String |
PROPERTY_CONTENT |
static java.lang.String |
PROPERTY_MIX_IN_TYPES |
static java.lang.String |
PROPERTY_NT_ADDRESS |
static java.lang.String |
PROPERTY_NT_BASE |
static java.lang.String |
PROPERTY_NT_UNSTRUCTURED |
static java.lang.String |
PROPERTY_PRIMARY_TYPE |
static java.lang.String |
PROPERTY_UUID |
static java.lang.String |
SV_NAME |
WorkspaceDBObject |
workspace |
Constructor and Description |
---|
NodeDBObject(WorkspaceDBObject workspace,
DBFolder folder,
DBFile file) |
Modifier and Type | Method and Description |
---|---|
void |
accept(ItemVisitor iv) |
void |
addListener(java.util.EventListener listener,
int eventTypes) |
void |
addMixin(java.lang.String mixinName) |
Node |
addNode(java.lang.String relPath) |
Node |
addNode(java.lang.String relPath,
java.lang.String primaryNodeTypeName) |
boolean |
canAddMixin(java.lang.String mixinName) |
void |
cancelMerge(Version vrsn) |
Version |
checkin() |
void |
checkout() |
void |
doneMerge(Version vrsn) |
void |
eventReload(DBObject obj)
Called when a watched DBObject is reloaded, internally or externally.
|
void |
followLifecycleTransition(java.lang.String string) |
java.lang.String[] |
getAllowedLifecycleTransistions() |
Item |
getAncestor(int depth)
Walk up the tree by n steps
|
Version |
getBaseVersion() |
java.lang.String |
getCorrespondingNodePath(java.lang.String workspaceName) |
DBObject |
getDBObject() |
NodeDefinition |
getDefinition() |
int |
getDepth() |
DataSource |
getDS() |
java.lang.String |
getIdentifier() |
int |
getIndex() |
Lock |
getLock() |
NodeType[] |
getMixinNodeTypes() |
java.lang.String |
getName() |
Node |
getNode(java.lang.String relPath) |
NodeIterator |
getNodes() |
NodeIterator |
getNodes(java.lang.String namePattern) |
NodeIterator |
getNodes(java.lang.String[] namePatterns) |
Node |
getParent() |
java.lang.String |
getPath() |
Item |
getPrimaryItem() |
NodeType |
getPrimaryNodeType() |
PropertyIterator |
getProperties() |
PropertyIterator |
getProperties(java.lang.String name) |
PropertyIterator |
getProperties(java.lang.String[] names) |
Property |
getProperty(java.lang.String relPath) |
PropertyIterator |
getReferences() |
PropertyIterator |
getReferences(java.lang.String name) |
Session |
getSession() |
NodeIterator |
getSharedSet() |
java.lang.String |
getUUID() |
VersionHistory |
getVersionHistory() |
PropertyIterator |
getWeakReferences() |
PropertyIterator |
getWeakReferences(java.lang.String name) |
boolean |
hasNode(java.lang.String relPath) |
boolean |
hasNodes() |
boolean |
hasProperties() |
boolean |
hasProperty(java.lang.String name) |
boolean |
holdsLock() |
boolean |
isCheckedOut() |
boolean |
isLocked() |
boolean |
isModified() |
boolean |
isNew() |
boolean |
isNode() |
boolean |
isNodeType(java.lang.String nodeTypeName) |
boolean |
isSame(Item item) |
Lock |
lock(boolean isDeep,
boolean isSessionScoped) |
NodeDBObject |
makeNode(WorkspaceDBObject workspace,
DBFolder folder,
DBFile file) |
protected java.lang.String |
makeRawPath() |
NodeIterator |
merge(java.lang.String srcWorkspace,
boolean bestEffort) |
void |
orderBefore(java.lang.String srcChildRelPath,
java.lang.String destChildRelPath) |
void |
refresh(boolean keepChanges) |
void |
registerWatchedObject(DBObject obj)
We need to hold a hard link on the object so that we are paired and one object will not be cleared without the other.
|
void |
remove() |
void |
removeEventListener(java.util.EventListener el) |
void |
removeMixin(java.lang.String mixinName) |
void |
removeShare() |
void |
removeSharedSet() |
void |
restore(java.lang.String version,
boolean replace) |
void |
restore(Version vrsn,
boolean replace) |
void |
restore(Version vrsn,
java.lang.String nodePath,
boolean replace) |
void |
restoreByLabel(java.lang.String label,
boolean replace) |
void |
save() |
void |
setPrimaryType(java.lang.String type) |
Property |
setProperty(java.lang.String name,
java.math.BigDecimal value) |
Property |
setProperty(java.lang.String name,
Binary value) |
Property |
setProperty(java.lang.String name,
boolean value) |
Property |
setProperty(java.lang.String name,
java.util.Calendar value) |
Property |
setProperty(java.lang.String name,
double value) |
Property |
setProperty(java.lang.String name,
java.io.InputStream in) |
Property |
setProperty(java.lang.String name,
long value) |
Property |
setProperty(java.lang.String name,
Node node) |
Property |
setProperty(java.lang.String name,
java.lang.String value) |
Property |
setProperty(java.lang.String name,
java.lang.String[] values) |
Property |
setProperty(java.lang.String name,
java.lang.String[] values,
int type) |
Property |
setProperty(java.lang.String name,
java.lang.String value,
int type) |
Property |
setProperty(java.lang.String name,
Value value) |
Property |
setProperty(java.lang.String name,
Value[] values) |
Property |
setProperty(java.lang.String name,
Value[] values,
int type) |
Property |
setProperty(java.lang.String name,
Value value,
int type) |
java.lang.String |
toString() |
void |
unlock() |
void |
update(java.lang.String srcWorkspace) |
public static final java.lang.String PROPERTY_PRIMARY_TYPE
public static final java.lang.String PROPERTY_CONTENT
public static final java.lang.String PROPERTY_NT_BASE
public static final java.lang.String PROPERTY_NT_UNSTRUCTURED
public static final java.lang.String PROPERTY_NT_ADDRESS
public static final java.lang.String JCR_XMLTEXT
public static final java.lang.String JCR_XMLCHAR
public static final java.lang.String SV_NAME
public static final java.lang.String MIX_REFERENCABLE
public static final java.lang.String PROPERTY_MIX_IN_TYPES
public static final java.lang.String PROPERTY_UUID
protected DBFolder folder
protected DBFile file
public final WorkspaceDBObject workspace
public NodeDBObject(WorkspaceDBObject workspace, DBFolder folder, DBFile file)
public DBObject getDBObject()
public void removeEventListener(java.util.EventListener el) throws RepositoryException
RepositoryException
public void addListener(java.util.EventListener listener, int eventTypes)
@CheckReturnValue @Nonnull public java.lang.String toString()
toString
in class java.lang.Object
public Node addNode(java.lang.String relPath) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException
ItemExistsException
PathNotFoundException
VersionException
ConstraintViolationException
LockException
RepositoryException
public Node addNode(java.lang.String relPath, java.lang.String primaryNodeTypeName) throws ItemExistsException, PathNotFoundException, NoSuchNodeTypeException, LockException, VersionException, ConstraintViolationException, RepositoryException
ItemExistsException
PathNotFoundException
NoSuchNodeTypeException
LockException
VersionException
ConstraintViolationException
RepositoryException
public NodeDBObject makeNode(WorkspaceDBObject workspace, DBFolder folder, DBFile file)
public void orderBefore(java.lang.String srcChildRelPath, java.lang.String destChildRelPath) throws UnsupportedRepositoryOperationException, VersionException, ConstraintViolationException, ItemNotFoundException, LockException, RepositoryException
UnsupportedRepositoryOperationException
VersionException
ConstraintViolationException
ItemNotFoundException
LockException
RepositoryException
public Property setProperty(java.lang.String name, Value value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Property setProperty(java.lang.String name, Value value, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Property setProperty(java.lang.String name, Value[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Property setProperty(java.lang.String name, Value[] values, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Property setProperty(java.lang.String name, java.lang.String[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Property setProperty(java.lang.String name, java.lang.String[] values, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Property setProperty(java.lang.String name, java.lang.String value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Property setProperty(java.lang.String name, java.lang.String value, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Property setProperty(java.lang.String name, java.io.InputStream in) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Property setProperty(java.lang.String name, Binary value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Property setProperty(java.lang.String name, boolean value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Property setProperty(java.lang.String name, double value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Property setProperty(java.lang.String name, java.math.BigDecimal value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Property setProperty(java.lang.String name, long value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Property setProperty(java.lang.String name, java.util.Calendar value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Property setProperty(java.lang.String name, Node node) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
ValueFormatException
VersionException
LockException
ConstraintViolationException
RepositoryException
public Node getNode(java.lang.String relPath) throws PathNotFoundException, RepositoryException
PathNotFoundException
RepositoryException
public NodeIterator getNodes() throws RepositoryException
RepositoryException
public NodeIterator getNodes(java.lang.String namePattern) throws RepositoryException
RepositoryException
public NodeIterator getNodes(java.lang.String[] namePatterns) throws RepositoryException
RepositoryException
public Property getProperty(java.lang.String relPath) throws PathNotFoundException, RepositoryException
PathNotFoundException
RepositoryException
public PropertyIterator getProperties() throws RepositoryException
RepositoryException
public PropertyIterator getProperties(java.lang.String name) throws RepositoryException
RepositoryException
public PropertyIterator getProperties(java.lang.String[] names) throws RepositoryException
RepositoryException
public Item getPrimaryItem() throws ItemNotFoundException, RepositoryException
ItemNotFoundException
RepositoryException
public java.lang.String getUUID() throws UnsupportedRepositoryOperationException, RepositoryException
UnsupportedRepositoryOperationException
RepositoryException
public java.lang.String getIdentifier() throws RepositoryException
RepositoryException
public int getIndex() throws RepositoryException
RepositoryException
public PropertyIterator getReferences() throws RepositoryException
RepositoryException
public PropertyIterator getReferences(java.lang.String name) throws RepositoryException
RepositoryException
public PropertyIterator getWeakReferences() throws RepositoryException
RepositoryException
public PropertyIterator getWeakReferences(java.lang.String name) throws RepositoryException
RepositoryException
public DataSource getDS() throws RepositoryException
RepositoryException
protected java.lang.String makeRawPath()
public boolean hasNode(java.lang.String relPath) throws RepositoryException
RepositoryException
public boolean hasProperty(java.lang.String name) throws RepositoryException
RepositoryException
public boolean hasNodes() throws RepositoryException
RepositoryException
public boolean hasProperties() throws RepositoryException
RepositoryException
public NodeType getPrimaryNodeType() throws RepositoryException
RepositoryException
public NodeType[] getMixinNodeTypes() throws RepositoryException
RepositoryException
public boolean isNodeType(java.lang.String nodeTypeName) throws RepositoryException
RepositoryException
public void setPrimaryType(java.lang.String type) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException
NoSuchNodeTypeException
VersionException
ConstraintViolationException
LockException
RepositoryException
public void addMixin(java.lang.String mixinName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException
NoSuchNodeTypeException
VersionException
ConstraintViolationException
LockException
RepositoryException
public void removeMixin(java.lang.String mixinName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException
NoSuchNodeTypeException
VersionException
ConstraintViolationException
LockException
RepositoryException
public boolean canAddMixin(java.lang.String mixinName) throws NoSuchNodeTypeException, RepositoryException
NoSuchNodeTypeException
RepositoryException
public NodeDefinition getDefinition() throws RepositoryException
RepositoryException
public Version checkin() throws VersionException, UnsupportedRepositoryOperationException, InvalidItemStateException, LockException, RepositoryException
VersionException
UnsupportedRepositoryOperationException
InvalidItemStateException
LockException
RepositoryException
public void checkout() throws UnsupportedRepositoryOperationException, LockException, ActivityViolationException, RepositoryException
UnsupportedRepositoryOperationException
LockException
ActivityViolationException
RepositoryException
public void doneMerge(Version vrsn) throws VersionException, InvalidItemStateException, UnsupportedRepositoryOperationException, RepositoryException
VersionException
InvalidItemStateException
UnsupportedRepositoryOperationException
RepositoryException
public void cancelMerge(Version vrsn) throws VersionException, InvalidItemStateException, UnsupportedRepositoryOperationException, RepositoryException
VersionException
InvalidItemStateException
UnsupportedRepositoryOperationException
RepositoryException
public void update(java.lang.String srcWorkspace) throws NoSuchWorkspaceException, AccessDeniedException, LockException, InvalidItemStateException, RepositoryException
NoSuchWorkspaceException
AccessDeniedException
LockException
InvalidItemStateException
RepositoryException
public NodeIterator merge(java.lang.String srcWorkspace, boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException
NoSuchWorkspaceException
AccessDeniedException
MergeException
LockException
InvalidItemStateException
RepositoryException
public java.lang.String getCorrespondingNodePath(java.lang.String workspaceName) throws ItemNotFoundException, NoSuchWorkspaceException, AccessDeniedException, RepositoryException
ItemNotFoundException
NoSuchWorkspaceException
AccessDeniedException
RepositoryException
public NodeIterator getSharedSet() throws RepositoryException
RepositoryException
public void removeSharedSet() throws VersionException, LockException, ConstraintViolationException, RepositoryException
VersionException
LockException
ConstraintViolationException
RepositoryException
public void removeShare() throws VersionException, LockException, ConstraintViolationException, RepositoryException
VersionException
LockException
ConstraintViolationException
RepositoryException
public boolean isCheckedOut() throws RepositoryException
RepositoryException
public void restore(java.lang.String version, boolean replace) throws VersionException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException
VersionException
ItemExistsException
UnsupportedRepositoryOperationException
LockException
InvalidItemStateException
RepositoryException
public void restore(Version vrsn, boolean replace) throws VersionException, ItemExistsException, InvalidItemStateException, UnsupportedRepositoryOperationException, LockException, RepositoryException
VersionException
ItemExistsException
InvalidItemStateException
UnsupportedRepositoryOperationException
LockException
RepositoryException
public void restore(Version vrsn, java.lang.String nodePath, boolean replace) throws PathNotFoundException, ItemExistsException, VersionException, ConstraintViolationException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException
PathNotFoundException
ItemExistsException
VersionException
ConstraintViolationException
UnsupportedRepositoryOperationException
LockException
InvalidItemStateException
RepositoryException
public void restoreByLabel(java.lang.String label, boolean replace) throws VersionException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException
VersionException
ItemExistsException
UnsupportedRepositoryOperationException
LockException
InvalidItemStateException
RepositoryException
public VersionHistory getVersionHistory() throws UnsupportedRepositoryOperationException, RepositoryException
UnsupportedRepositoryOperationException
RepositoryException
public Version getBaseVersion() throws UnsupportedRepositoryOperationException, RepositoryException
UnsupportedRepositoryOperationException
RepositoryException
public Lock lock(boolean isDeep, boolean isSessionScoped) throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, InvalidItemStateException, RepositoryException
UnsupportedRepositoryOperationException
LockException
AccessDeniedException
InvalidItemStateException
RepositoryException
public Lock getLock() throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, RepositoryException
UnsupportedRepositoryOperationException
LockException
AccessDeniedException
RepositoryException
public void unlock() throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, InvalidItemStateException, RepositoryException
UnsupportedRepositoryOperationException
LockException
AccessDeniedException
InvalidItemStateException
RepositoryException
public boolean holdsLock() throws RepositoryException
RepositoryException
public boolean isLocked() throws RepositoryException
RepositoryException
public void followLifecycleTransition(java.lang.String string) throws UnsupportedRepositoryOperationException, InvalidLifecycleTransitionException, RepositoryException
UnsupportedRepositoryOperationException
InvalidLifecycleTransitionException
RepositoryException
public java.lang.String[] getAllowedLifecycleTransistions() throws UnsupportedRepositoryOperationException, RepositoryException
UnsupportedRepositoryOperationException
RepositoryException
public java.lang.String getPath() throws RepositoryException
RepositoryException
public java.lang.String getName() throws RepositoryException
RepositoryException
public Item getAncestor(int depth) throws ItemNotFoundException, AccessDeniedException, RepositoryException
depth
- ItemNotFoundException
AccessDeniedException
RepositoryException
public Node getParent() throws ItemNotFoundException, AccessDeniedException, RepositoryException
ItemNotFoundException
AccessDeniedException
RepositoryException
public int getDepth() throws RepositoryException
RepositoryException
public Session getSession() throws RepositoryException
RepositoryException
public boolean isNode()
public boolean isNew()
public boolean isModified()
public boolean isSame(Item item) throws RepositoryException
RepositoryException
public void accept(ItemVisitor iv) throws RepositoryException
RepositoryException
public void save() throws AccessDeniedException, ItemExistsException, ConstraintViolationException, InvalidItemStateException, ReferentialIntegrityException, VersionException, LockException, NoSuchNodeTypeException, RepositoryException
AccessDeniedException
ItemExistsException
ConstraintViolationException
InvalidItemStateException
ReferentialIntegrityException
VersionException
LockException
NoSuchNodeTypeException
RepositoryException
public void refresh(boolean keepChanges) throws InvalidItemStateException, RepositoryException
InvalidItemStateException
RepositoryException
public void remove() throws VersionException, LockException, ConstraintViolationException, AccessDeniedException, RepositoryException
VersionException
LockException
ConstraintViolationException
AccessDeniedException
RepositoryException
public void eventReload(@Nonnull DBObject obj)
eventReload
in interface ReloadEventListener
obj
- The object that was reloaded.public void registerWatchedObject(@Nonnull DBObject obj)
registerWatchedObject
in interface Watcher
obj
- The object to watchstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.