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
RepositoryExceptionpublic void addListener(java.util.EventListener listener,
int eventTypes)
@CheckReturnValue @Nonnull public java.lang.String toString()
toString in class java.lang.Objectpublic Node addNode(java.lang.String relPath)
throws ItemExistsException,
PathNotFoundException,
VersionException,
ConstraintViolationException,
LockException,
RepositoryException
ItemExistsExceptionPathNotFoundExceptionVersionExceptionConstraintViolationExceptionLockExceptionRepositoryExceptionpublic Node addNode(java.lang.String relPath,
java.lang.String primaryNodeTypeName)
throws ItemExistsException,
PathNotFoundException,
NoSuchNodeTypeException,
LockException,
VersionException,
ConstraintViolationException,
RepositoryException
ItemExistsExceptionPathNotFoundExceptionNoSuchNodeTypeExceptionLockExceptionVersionExceptionConstraintViolationExceptionRepositoryExceptionpublic 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
UnsupportedRepositoryOperationExceptionVersionExceptionConstraintViolationExceptionItemNotFoundExceptionLockExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
Value value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
Value value,
int type)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
Value[] values)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
Value[] values,
int type)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
java.lang.String[] values)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
java.lang.String[] values,
int type)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
java.lang.String value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
java.lang.String value,
int type)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
java.io.InputStream in)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
Binary value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
boolean value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
double value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
java.math.BigDecimal value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
long value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
java.util.Calendar value)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Property setProperty(java.lang.String name,
Node node)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
ValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic Node getNode(java.lang.String relPath)
throws PathNotFoundException,
RepositoryException
PathNotFoundExceptionRepositoryExceptionpublic NodeIterator getNodes()
throws RepositoryException
RepositoryExceptionpublic NodeIterator getNodes(java.lang.String namePattern)
throws RepositoryException
RepositoryExceptionpublic NodeIterator getNodes(java.lang.String[] namePatterns)
throws RepositoryException
RepositoryExceptionpublic Property getProperty(java.lang.String relPath)
throws PathNotFoundException,
RepositoryException
PathNotFoundExceptionRepositoryExceptionpublic PropertyIterator getProperties()
throws RepositoryException
RepositoryExceptionpublic PropertyIterator getProperties(java.lang.String name)
throws RepositoryException
RepositoryExceptionpublic PropertyIterator getProperties(java.lang.String[] names)
throws RepositoryException
RepositoryExceptionpublic Item getPrimaryItem()
throws ItemNotFoundException,
RepositoryException
ItemNotFoundExceptionRepositoryExceptionpublic java.lang.String getUUID()
throws UnsupportedRepositoryOperationException,
RepositoryException
UnsupportedRepositoryOperationExceptionRepositoryExceptionpublic java.lang.String getIdentifier()
throws RepositoryException
RepositoryExceptionpublic int getIndex()
throws RepositoryException
RepositoryExceptionpublic PropertyIterator getReferences()
throws RepositoryException
RepositoryExceptionpublic PropertyIterator getReferences(java.lang.String name)
throws RepositoryException
RepositoryExceptionpublic PropertyIterator getWeakReferences()
throws RepositoryException
RepositoryExceptionpublic PropertyIterator getWeakReferences(java.lang.String name)
throws RepositoryException
RepositoryExceptionpublic DataSource getDS() throws RepositoryException
RepositoryExceptionprotected java.lang.String makeRawPath()
public boolean hasNode(java.lang.String relPath)
throws RepositoryException
RepositoryExceptionpublic boolean hasProperty(java.lang.String name)
throws RepositoryException
RepositoryExceptionpublic boolean hasNodes()
throws RepositoryException
RepositoryExceptionpublic boolean hasProperties()
throws RepositoryException
RepositoryExceptionpublic NodeType getPrimaryNodeType()
throws RepositoryException
RepositoryExceptionpublic NodeType[] getMixinNodeTypes()
throws RepositoryException
RepositoryExceptionpublic boolean isNodeType(java.lang.String nodeTypeName)
throws RepositoryException
RepositoryExceptionpublic void setPrimaryType(java.lang.String type)
throws NoSuchNodeTypeException,
VersionException,
ConstraintViolationException,
LockException,
RepositoryException
NoSuchNodeTypeExceptionVersionExceptionConstraintViolationExceptionLockExceptionRepositoryExceptionpublic void addMixin(java.lang.String mixinName)
throws NoSuchNodeTypeException,
VersionException,
ConstraintViolationException,
LockException,
RepositoryException
NoSuchNodeTypeExceptionVersionExceptionConstraintViolationExceptionLockExceptionRepositoryExceptionpublic void removeMixin(java.lang.String mixinName)
throws NoSuchNodeTypeException,
VersionException,
ConstraintViolationException,
LockException,
RepositoryException
NoSuchNodeTypeExceptionVersionExceptionConstraintViolationExceptionLockExceptionRepositoryExceptionpublic boolean canAddMixin(java.lang.String mixinName)
throws NoSuchNodeTypeException,
RepositoryException
NoSuchNodeTypeExceptionRepositoryExceptionpublic NodeDefinition getDefinition()
throws RepositoryException
RepositoryExceptionpublic Version checkin()
throws VersionException,
UnsupportedRepositoryOperationException,
InvalidItemStateException,
LockException,
RepositoryException
VersionExceptionUnsupportedRepositoryOperationExceptionInvalidItemStateExceptionLockExceptionRepositoryExceptionpublic void checkout()
throws UnsupportedRepositoryOperationException,
LockException,
ActivityViolationException,
RepositoryException
UnsupportedRepositoryOperationExceptionLockExceptionActivityViolationExceptionRepositoryExceptionpublic void doneMerge(Version vrsn)
throws VersionException,
InvalidItemStateException,
UnsupportedRepositoryOperationException,
RepositoryException
VersionExceptionInvalidItemStateExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionpublic void cancelMerge(Version vrsn)
throws VersionException,
InvalidItemStateException,
UnsupportedRepositoryOperationException,
RepositoryException
VersionExceptionInvalidItemStateExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionpublic void update(java.lang.String srcWorkspace)
throws NoSuchWorkspaceException,
AccessDeniedException,
LockException,
InvalidItemStateException,
RepositoryException
NoSuchWorkspaceExceptionAccessDeniedExceptionLockExceptionInvalidItemStateExceptionRepositoryExceptionpublic NodeIterator merge(java.lang.String srcWorkspace,
boolean bestEffort)
throws NoSuchWorkspaceException,
AccessDeniedException,
MergeException,
LockException,
InvalidItemStateException,
RepositoryException
NoSuchWorkspaceExceptionAccessDeniedExceptionMergeExceptionLockExceptionInvalidItemStateExceptionRepositoryExceptionpublic java.lang.String getCorrespondingNodePath(java.lang.String workspaceName)
throws ItemNotFoundException,
NoSuchWorkspaceException,
AccessDeniedException,
RepositoryException
ItemNotFoundExceptionNoSuchWorkspaceExceptionAccessDeniedExceptionRepositoryExceptionpublic NodeIterator getSharedSet()
throws RepositoryException
RepositoryExceptionpublic void removeSharedSet()
throws VersionException,
LockException,
ConstraintViolationException,
RepositoryException
VersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic void removeShare()
throws VersionException,
LockException,
ConstraintViolationException,
RepositoryException
VersionExceptionLockExceptionConstraintViolationExceptionRepositoryExceptionpublic boolean isCheckedOut()
throws RepositoryException
RepositoryExceptionpublic void restore(java.lang.String version,
boolean replace)
throws VersionException,
ItemExistsException,
UnsupportedRepositoryOperationException,
LockException,
InvalidItemStateException,
RepositoryException
VersionExceptionItemExistsExceptionUnsupportedRepositoryOperationExceptionLockExceptionInvalidItemStateExceptionRepositoryExceptionpublic void restore(Version vrsn,
boolean replace)
throws VersionException,
ItemExistsException,
InvalidItemStateException,
UnsupportedRepositoryOperationException,
LockException,
RepositoryException
VersionExceptionItemExistsExceptionInvalidItemStateExceptionUnsupportedRepositoryOperationExceptionLockExceptionRepositoryExceptionpublic void restore(Version vrsn,
java.lang.String nodePath,
boolean replace)
throws PathNotFoundException,
ItemExistsException,
VersionException,
ConstraintViolationException,
UnsupportedRepositoryOperationException,
LockException,
InvalidItemStateException,
RepositoryException
PathNotFoundExceptionItemExistsExceptionVersionExceptionConstraintViolationExceptionUnsupportedRepositoryOperationExceptionLockExceptionInvalidItemStateExceptionRepositoryExceptionpublic void restoreByLabel(java.lang.String label,
boolean replace)
throws VersionException,
ItemExistsException,
UnsupportedRepositoryOperationException,
LockException,
InvalidItemStateException,
RepositoryException
VersionExceptionItemExistsExceptionUnsupportedRepositoryOperationExceptionLockExceptionInvalidItemStateExceptionRepositoryExceptionpublic VersionHistory getVersionHistory()
throws UnsupportedRepositoryOperationException,
RepositoryException
UnsupportedRepositoryOperationExceptionRepositoryExceptionpublic Version getBaseVersion()
throws UnsupportedRepositoryOperationException,
RepositoryException
UnsupportedRepositoryOperationExceptionRepositoryExceptionpublic Lock lock(boolean isDeep,
boolean isSessionScoped)
throws UnsupportedRepositoryOperationException,
LockException,
AccessDeniedException,
InvalidItemStateException,
RepositoryException
UnsupportedRepositoryOperationExceptionLockExceptionAccessDeniedExceptionInvalidItemStateExceptionRepositoryExceptionpublic Lock getLock()
throws UnsupportedRepositoryOperationException,
LockException,
AccessDeniedException,
RepositoryException
UnsupportedRepositoryOperationExceptionLockExceptionAccessDeniedExceptionRepositoryExceptionpublic void unlock()
throws UnsupportedRepositoryOperationException,
LockException,
AccessDeniedException,
InvalidItemStateException,
RepositoryException
UnsupportedRepositoryOperationExceptionLockExceptionAccessDeniedExceptionInvalidItemStateExceptionRepositoryExceptionpublic boolean holdsLock()
throws RepositoryException
RepositoryExceptionpublic boolean isLocked()
throws RepositoryException
RepositoryExceptionpublic void followLifecycleTransition(java.lang.String string)
throws UnsupportedRepositoryOperationException,
InvalidLifecycleTransitionException,
RepositoryException
UnsupportedRepositoryOperationExceptionInvalidLifecycleTransitionExceptionRepositoryExceptionpublic java.lang.String[] getAllowedLifecycleTransistions()
throws UnsupportedRepositoryOperationException,
RepositoryException
UnsupportedRepositoryOperationExceptionRepositoryExceptionpublic java.lang.String getPath()
throws RepositoryException
RepositoryExceptionpublic java.lang.String getName()
throws RepositoryException
RepositoryExceptionpublic Item getAncestor(int depth)
throws ItemNotFoundException,
AccessDeniedException,
RepositoryException
depth - ItemNotFoundExceptionAccessDeniedExceptionRepositoryExceptionpublic Node getParent()
throws ItemNotFoundException,
AccessDeniedException,
RepositoryException
ItemNotFoundExceptionAccessDeniedExceptionRepositoryExceptionpublic int getDepth()
throws RepositoryException
RepositoryExceptionpublic Session getSession()
throws RepositoryException
RepositoryExceptionpublic boolean isNode()
public boolean isNew()
public boolean isModified()
public boolean isSame(Item item)
throws RepositoryException
RepositoryExceptionpublic void accept(ItemVisitor iv)
throws RepositoryException
RepositoryExceptionpublic void save()
throws AccessDeniedException,
ItemExistsException,
ConstraintViolationException,
InvalidItemStateException,
ReferentialIntegrityException,
VersionException,
LockException,
NoSuchNodeTypeException,
RepositoryException
AccessDeniedExceptionItemExistsExceptionConstraintViolationExceptionInvalidItemStateExceptionReferentialIntegrityExceptionVersionExceptionLockExceptionNoSuchNodeTypeExceptionRepositoryExceptionpublic void refresh(boolean keepChanges)
throws InvalidItemStateException,
RepositoryException
InvalidItemStateExceptionRepositoryExceptionpublic void remove()
throws VersionException,
LockException,
ConstraintViolationException,
AccessDeniedException,
RepositoryException
VersionExceptionLockExceptionConstraintViolationExceptionAccessDeniedExceptionRepositoryExceptionpublic void eventReload(@Nonnull
DBObject obj)
eventReload in interface ReloadEventListenerobj - The object that was reloaded.public void registerWatchedObject(@Nonnull
DBObject obj)
registerWatchedObject in interface Watcherobj - The object to watchstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.