|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NodeDaoService
Service layer accessing persistent node entities directly
Nested Class Summary | |
---|---|
static interface |
NodeDaoService.ChildAssocRefQueryCallback
Interface used to iterate over results from child association queries |
static interface |
NodeDaoService.ChildAssocRefQueryCallbackFilter
Interface used to iterate over results from child association queries |
static interface |
NodeDaoService.NodePropertyHandler
Iterface to handle callbacks when iterating over properties |
static interface |
NodeDaoService.NodeRefQueryCallback
Interface used to iterate over pure node results |
static interface |
NodeDaoService.ObjectArrayQueryCallback
Interface used to iterate over object array results |
Method Summary | |
---|---|
void |
addNodeAspects(java.lang.Long nodeId,
java.util.Set aspectQNames)
|
void |
addNodeProperties(java.lang.Long nodeId,
java.util.Map properties)
|
void |
addNodeProperty(java.lang.Long nodeId,
QName qname,
java.io.Serializable value)
|
org.alfresco.util.Pair |
createStore(StoreRef storeRef)
Creates a unique store for the given protocol and identifier combination. |
void |
deleteChildAssoc(java.lang.Long childAssocId)
|
boolean |
deleteChildAssoc(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
QName assocTypeQName,
QName qname)
Deletes an explicit child association. |
void |
deleteNode(java.lang.Long nodeId)
Deletes the node and all entities. |
void |
deleteNodeAssoc(java.lang.Long assocId)
|
void |
flush()
Flush the data changes to the persistence layer. |
org.alfresco.util.Pair |
getChildAssoc(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
QName assocTypeQName,
QName qname)
|
org.alfresco.util.Pair |
getChildAssoc(java.lang.Long parentNodeId,
QName assocTypeQName,
java.lang.String childName)
|
void |
getChildAssocs(java.lang.Long parentNodeId,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback,
boolean recurse)
Get a collection of all child association references for a given parent node. |
void |
getChildAssocs(java.lang.Long parentNodeId,
QName assocTypeQName,
java.util.Collection childNames,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
Get a collection of all child associations references where the child name is an exact match. |
void |
getChildAssocs(java.lang.Long parentNodeId,
QName assocQName,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
Get a collection of all child association references for a given parent node. |
void |
getChildAssocsByChildTypes(java.lang.Long parentNodeId,
java.util.Set childNodeTypeQNames,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
|
void |
getChildAssocsByTypeQNameAndQName(java.lang.Long parentNodeId,
QName assocTypeQName,
QName assocQName,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
|
void |
getChildAssocsByTypeQNames(java.lang.Long parentNodeId,
java.util.List assocTypeQNames,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
|
void |
getChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId,
QName assocTypeQName,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
Gets the set of child associations of a certain parent node without parent associations of a certain type to other nodes with the same parent! In effect the 'orphans' with respect to a certain association type. |
void |
getContentUrlsForStore(StoreRef storeRef,
NodeDaoService.ObjectArrayQueryCallback resultsCallback)
Iterate over all content nodes to get owner/creator and content url (in order to extract content size) |
java.lang.Long |
getMaxTxnCommitTime()
|
java.lang.Long |
getMaxTxnIdByCommitTime(long maxCommitTime)
Retrieves the maximum transaction ID for which the commit time is less than the given time. |
java.lang.Long |
getMinTxnCommitTime()
|
java.lang.Long |
getNodeAccessControlList(java.lang.Long nodeId)
|
java.util.Set |
getNodeAspects(java.lang.Long nodeId)
|
org.alfresco.util.Pair |
getNodeAssoc(java.lang.Long sourceNodeId,
java.lang.Long targetNodeId,
QName assocTypeQName)
|
AssociationRef |
getNodeAssocOrNull(java.lang.Long assocId)
Gets a node association by ID. |
java.util.Collection |
getNodeAssocsToAndFrom(java.lang.Long nodeId)
|
org.alfresco.util.Pair |
getNodePair(java.lang.Long nodeId)
|
org.alfresco.util.Pair |
getNodePair(NodeRef nodeRef)
|
java.util.Map |
getNodeProperties(java.lang.Long nodeId)
|
java.util.Map |
getNodePropertiesRaw(java.lang.Long nodeId)
|
java.io.Serializable |
getNodeProperty(java.lang.Long nodeId,
QName propertyQName)
|
NodeRef.Status |
getNodeRefStatus(NodeRef nodeRef)
|
void |
getNodesDeletedInOldTxns(java.lang.Long minNodeId,
long maxCommitTime,
int count,
NodeDaoService.NodeRefQueryCallback resultsCallback)
Gets a batch of deleted nodes in old transactions. |
void |
getNodesWithAspect(QName aspectQName,
java.lang.Long minNodeId,
int count,
NodeDaoService.NodeRefQueryCallback resultsCallback)
|
void |
getNodesWithChildrenInDifferentStore(java.lang.Long storeId,
java.lang.Long minNodeId,
int count,
NodeDaoService.NodeRefQueryCallback resultsCallback)
Deprecated. Since 2.2SP6, 3.1SP2, 3.2: not performant and not relevant to any use-cases |
QName |
getNodeType(java.lang.Long nodeId)
|
java.util.Collection |
getParentAssocs(java.lang.Long childNodeId)
Get all parent associations for the node. |
void |
getPrimaryChildAssocs(java.lang.Long parentNodeId,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
|
void |
getPrimaryChildAssocsNotInSameStore(java.lang.Long parentNodeId,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
|
org.alfresco.util.Pair |
getPrimaryParentAssoc(java.lang.Long childNodeId)
Finds the association between the node's primary parent and the node itself |
void |
getPropertyValuesByActualType(DataTypeDefinition actualDataTypeDefinition,
NodeDaoService.NodePropertyHandler handler)
Iterate over all property values for the given type definition. |
void |
getPropertyValuesByPropertyAndValue(StoreRef storeRef,
QName propertyQName,
java.lang.String value,
NodeDaoService.NodePropertyHandler handler)
Iterate over all nodes that have a given property type with a given string value. |
org.alfresco.util.Pair |
getRootNode(StoreRef storeRef)
|
java.util.Collection |
getSourceNodeAssocs(java.lang.Long targetNodeId)
|
java.util.List |
getStores()
Fetch a list of all stores in the repository |
java.util.Collection |
getTargetNodeAssocs(java.lang.Long sourceNodeId)
|
int |
getTransactionCount()
|
Transaction |
getTxnById(long txnId)
Retrieves a specific transaction. |
java.util.List |
getTxnChanges(long txnId)
|
java.util.List |
getTxnChangesForStore(StoreRef storeRef,
long txnId)
|
int |
getTxnDeleteCount(long txnId)
|
java.util.List |
getTxnsByCommitTimeAscending(long fromTimeInclusive,
long toTimeExclusive,
int count,
java.util.List excludeTxnIds,
boolean remoteOnly)
Get all transactions in a given time range. |
java.util.List |
getTxnsByCommitTimeDescending(long fromTimeInclusive,
long toTimeExclusive,
int count,
java.util.List excludeTxnIds,
boolean remoteOnly)
Get all transactions in a given time range. |
java.util.List |
getTxnsByMinCommitTime(java.util.List includeTxnIds)
Get the lowest commit time for a set of transactions |
java.util.List |
getTxnsUnused(java.lang.Long minTxnId,
long maxCommitTime,
int count)
|
int |
getTxnUpdateCount(long txnId)
|
void |
getUsersWithoutUsage(StoreRef storeRef,
NodeDaoService.ObjectArrayQueryCallback resultsCallback)
Iterate over all person nodes to get users without a calculated usage |
void |
getUsersWithoutUsageProp(StoreRef storeRef,
NodeDaoService.ObjectArrayQueryCallback resultsCallback)
Iterate over all person nodes with missing usage property (for one-off patch) |
void |
getUsersWithUsage(StoreRef storeRef,
NodeDaoService.ObjectArrayQueryCallback resultsCallback)
Iterate over all person nodes to get users with a calculated usage |
boolean |
hasNodeAspect(java.lang.Long nodeId,
QName aspectQName)
|
boolean |
isDirty()
Are there any pending changes which must be synchronized with the store? |
org.alfresco.util.Pair |
moveNodeToStore(java.lang.Long nodeId,
StoreRef storeRef)
|
org.alfresco.util.Pair |
newChildAssoc(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
boolean isPrimary,
QName assocTypeQName,
QName qname,
java.lang.String name)
|
org.alfresco.util.Pair |
newNode(StoreRef storeRef,
java.lang.String uuid,
QName nodeTypeQName)
Create a new node. |
org.alfresco.util.Pair |
newNodeAssoc(java.lang.Long sourceNodeId,
java.lang.Long targetNodeId,
QName assocTypeQName)
|
void |
prependPaths(org.alfresco.util.Pair currentNodePair,
org.alfresco.util.Pair currentRootNodePair,
Path currentPath,
java.util.Collection completedPaths,
java.util.Stack assocIdStack,
boolean primaryOnly)
|
void |
purgeNode(java.lang.Long nodeId)
Remove all traces of the node. |
void |
purgeTxn(java.lang.Long txnId)
|
void |
removeNodeAspects(java.lang.Long nodeId,
java.util.Set aspectQNames)
|
void |
removeNodeProperties(java.lang.Long nodeId,
java.util.Set propertyQNames)
|
void |
setChildNameUnique(java.lang.Long assocId,
java.lang.String childName)
Change the name of the child node. |
void |
setNodeAccessControlList(java.lang.Long nodeId,
java.lang.Long aclId)
|
void |
setNodeProperties(java.lang.Long nodeId,
java.util.Map properties)
|
void |
setNodeStatus(java.lang.Long nodeId)
|
org.alfresco.util.Pair |
updateChildAssoc(java.lang.Long childAssocId,
java.lang.Long parentNodeId,
java.lang.Long childNodeId,
QName assocTypeQName,
QName qname,
int index,
java.lang.String childName)
|
void |
updateNode(java.lang.Long nodeId,
StoreRef storeRef,
java.lang.String uuid,
QName nodeTypeQName)
|
Method Detail |
---|
boolean isDirty()
void flush()
java.util.List getStores()
org.alfresco.util.Pair getRootNode(StoreRef storeRef)
org.alfresco.util.Pair createStore(StoreRef storeRef)
StoreExistsException
- if the store already existsNodeRef.Status getNodeRefStatus(NodeRef nodeRef)
org.alfresco.util.Pair newNode(StoreRef storeRef, java.lang.String uuid, QName nodeTypeQName) throws InvalidTypeException
storeRef
- the store to which the node must belonguuid
- the node store-unique identifier, or null to assign a GUIDnodeTypeQName
- the type of the node
InvalidTypeException
- if the node type is invalid or if the node type
is not a valid real nodeorg.alfresco.util.Pair moveNodeToStore(java.lang.Long nodeId, StoreRef storeRef)
org.alfresco.util.Pair getNodePair(NodeRef nodeRef)
nodeRef
- the node reference
org.alfresco.util.Pair getNodePair(java.lang.Long nodeId)
QName getNodeType(java.lang.Long nodeId)
void setNodeStatus(java.lang.Long nodeId)
java.lang.Long getNodeAccessControlList(java.lang.Long nodeId)
void setNodeAccessControlList(java.lang.Long nodeId, java.lang.Long aclId)
void updateNode(java.lang.Long nodeId, StoreRef storeRef, java.lang.String uuid, QName nodeTypeQName)
storeRef
- the new store or null to keep the existing oneuuid
- the new UUID for the node or null to keep it the samenodeTypeQName
- the new type QName for the node or null to keep the existing onejava.io.Serializable getNodeProperty(java.lang.Long nodeId, QName propertyQName)
java.util.Map getNodePropertiesRaw(java.lang.Long nodeId)
nodeId
- the node's ID
ObjectNotFoundException
- if the node ID is invalidNodeDaoService.getNodePair(NodeRef)
java.util.Map getNodeProperties(java.lang.Long nodeId)
void addNodeProperty(java.lang.Long nodeId, QName qname, java.io.Serializable value)
void addNodeProperties(java.lang.Long nodeId, java.util.Map properties)
void removeNodeProperties(java.lang.Long nodeId, java.util.Set propertyQNames)
void setNodeProperties(java.lang.Long nodeId, java.util.Map properties)
java.util.Set getNodeAspects(java.lang.Long nodeId)
void addNodeAspects(java.lang.Long nodeId, java.util.Set aspectQNames)
void removeNodeAspects(java.lang.Long nodeId, java.util.Set aspectQNames)
boolean hasNodeAspect(java.lang.Long nodeId, QName aspectQName)
void deleteNode(java.lang.Long nodeId)
void purgeNode(java.lang.Long nodeId)
NodeDaoService.deleteNode(Long)
.
org.alfresco.util.Pair newChildAssoc(java.lang.Long parentNodeId, java.lang.Long childNodeId, boolean isPrimary, QName assocTypeQName, QName qname, java.lang.String name)
name
- the cm:name to apply to the association
ChildAssoc
void setChildNameUnique(java.lang.Long assocId, java.lang.String childName)
childId
- the child association to changechildName
- the name to put on the associationorg.alfresco.util.Pair updateChildAssoc(java.lang.Long childAssocId, java.lang.Long parentNodeId, java.lang.Long childNodeId, QName assocTypeQName, QName qname, int index, java.lang.String childName)
index
- the association index. -1 to keep the existing valuevoid getChildAssocs(java.lang.Long parentNodeId, NodeDaoService.ChildAssocRefQueryCallback resultsCallback, boolean recurse)
WARNING: Be sure selective when doing this call recursively.
parentNodeId
- the parent noderesultsCallback
- the callback that will be called with the resultsrecurse
- if true then iterate over the entire tree of nodes.
Resursion is done top-down i.e. the first level children are all
enumerated first, followed by all second level children and so on.void getChildAssocs(java.lang.Long parentNodeId, QName assocQName, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
parentNodeId
- the parent noderesultsCallback
- the callback that will be called with the resultsvoid getChildAssocs(java.lang.Long parentNodeId, QName assocTypeQName, java.util.Collection childNames, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
parentNodeId
- the parent nodeassocTypeQName
- the type of the association to check.childNames
- the names of the child nodes (cm:name). These will be matched exactly.resultsCallback
- the callback that will be called with the resultsvoid getChildAssocsByTypeQNames(java.lang.Long parentNodeId, java.util.List assocTypeQNames, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
void getChildAssocsByTypeQNameAndQName(java.lang.Long parentNodeId, QName assocTypeQName, QName assocQName, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
void getChildAssocsByChildTypes(java.lang.Long parentNodeId, java.util.Set childNodeTypeQNames, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
void getPrimaryChildAssocs(java.lang.Long parentNodeId, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
void getPrimaryChildAssocsNotInSameStore(java.lang.Long parentNodeId, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
void getNodesWithChildrenInDifferentStore(java.lang.Long storeId, java.lang.Long minNodeId, int count, NodeDaoService.NodeRefQueryCallback resultsCallback)
storeId
- the store of the parent nodesminNodeId
- the min node ID to returncount
- the maximum number of resultsresultsCallback
- the node callbackvoid getNodesWithAspect(QName aspectQName, java.lang.Long minNodeId, int count, NodeDaoService.NodeRefQueryCallback resultsCallback)
void getChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId, QName assocTypeQName, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
parentNodeId
- the parent node IDassocTypeQName
- the association type QNameresultsCallback
- the callback that will be called with the resultsorg.alfresco.util.Pair getChildAssoc(java.lang.Long parentNodeId, QName assocTypeQName, java.lang.String childName)
org.alfresco.util.Pair getChildAssoc(java.lang.Long parentNodeId, java.lang.Long childNodeId, QName assocTypeQName, QName qname)
ChildAssoc
boolean deleteChildAssoc(java.lang.Long parentNodeId, java.lang.Long childNodeId, QName assocTypeQName, QName qname)
void deleteChildAssoc(java.lang.Long childAssocId)
assoc
- the child association to removeorg.alfresco.util.Pair getPrimaryParentAssoc(java.lang.Long childNodeId)
java.util.Collection getParentAssocs(java.lang.Long childNodeId)
childNode
- the child node
org.alfresco.util.Pair newNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, QName assocTypeQName)
NodeAssoc
java.util.Collection getNodeAssocsToAndFrom(java.lang.Long nodeId)
org.alfresco.util.Pair getNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, QName assocTypeQName)
AssociationRef getNodeAssocOrNull(java.lang.Long assocId)
assocId
- the association id
null
if it does not existjava.util.Collection getTargetNodeAssocs(java.lang.Long sourceNodeId)
java.util.Collection getSourceNodeAssocs(java.lang.Long targetNodeId)
void deleteNodeAssoc(java.lang.Long assocId)
assoc
- the node association to removevoid getPropertyValuesByPropertyAndValue(StoreRef storeRef, QName propertyQName, java.lang.String value, NodeDaoService.NodePropertyHandler handler)
storeRef
- the store to search inpropertyQName
- the qualified name of the propertyvalue
- the string value to matchhandler
- the callback to use while iterating over the URLsvoid getContentUrlsForStore(StoreRef storeRef, NodeDaoService.ObjectArrayQueryCallback resultsCallback)
storeRef
- the store to search inhandler
- the callback to use while iterating over the URLsvoid getUsersWithoutUsageProp(StoreRef storeRef, NodeDaoService.ObjectArrayQueryCallback resultsCallback)
storeRef
- the store to search inhandler
- the callback to use while iterating over the peoplevoid getUsersWithoutUsage(StoreRef storeRef, NodeDaoService.ObjectArrayQueryCallback resultsCallback)
storeRef
- the store to search inhandler
- the callback to use while iterating over the peoplevoid getUsersWithUsage(StoreRef storeRef, NodeDaoService.ObjectArrayQueryCallback resultsCallback)
storeRef
- the store to search inhandler
- the callback to use while iterating over the peoplevoid getPropertyValuesByActualType(DataTypeDefinition actualDataTypeDefinition, NodeDaoService.NodePropertyHandler handler)
actualDataTypeDefinition
- the persisted type to retrievehandler
- the callback to use while iterating over the URLsvoid getNodesDeletedInOldTxns(java.lang.Long minNodeId, long maxCommitTime, int count, NodeDaoService.NodeRefQueryCallback resultsCallback)
minNodeId
- the minimum node IDmaxCommitTime
- the maximum commit time (to set a minimum transaction age)count
- the maximum number of results (for batching)resultsCallback
- the callback to pass results backjava.lang.Long getMaxTxnIdByCommitTime(long maxCommitTime)
maxCommitTime
- the max commit time (ms)
Transaction getTxnById(long txnId)
txnId
- the unique transaction ID.
java.util.List getTxnsByCommitTimeAscending(long fromTimeInclusive, long toTimeExclusive, int count, java.util.List excludeTxnIds, boolean remoteOnly)
excludeTxnIds
- a list of txn IDs to ignore. null is allowed.remoteOnly
- true if locally-written transactions must be ignoredjava.util.List getTxnsByCommitTimeDescending(long fromTimeInclusive, long toTimeExclusive, int count, java.util.List excludeTxnIds, boolean remoteOnly)
excludeTxnIds
- a list of txn IDs to ignore. null is allowed.remoteOnly
- true if locally-written transactions must be ignoredjava.util.List getTxnsByMinCommitTime(java.util.List includeTxnIds)
includeTxnIds
- a list of transaction IDs to search for
int getTxnUpdateCount(long txnId)
int getTxnDeleteCount(long txnId)
int getTransactionCount()
java.util.List getTxnChangesForStore(StoreRef storeRef, long txnId)
java.util.List getTxnChanges(long txnId)
java.util.List getTxnsUnused(java.lang.Long minTxnId, long maxCommitTime, int count)
void purgeTxn(java.lang.Long txnId)
java.lang.Long getMinTxnCommitTime()
java.lang.Long getMaxTxnCommitTime()
void prependPaths(org.alfresco.util.Pair currentNodePair, org.alfresco.util.Pair currentRootNodePair, Path currentPath, java.util.Collection completedPaths, java.util.Stack assocIdStack, boolean primaryOnly) throws CyclicChildRelationshipException
CyclicChildRelationshipException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |