public class DbNodeServiceImpl extends AbstractNodeServiceImpl implements Extensible, NodeService
NodeService.FindNodeParameters| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_PENDING_DELETE_NODES |
dictionaryService, storesToIgnorePolicies, tenantService, transactionService| Constructor and Description |
|---|
DbNodeServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAspect(NodeRef nodeRef,
QName aspectTypeQName,
Map<QName,Serializable> aspectProperties) |
List<ChildAssociationRef> |
addChild(Collection<NodeRef> parentRefs,
NodeRef childRef,
QName assocTypeQName,
QName assocQName) |
ChildAssociationRef |
addChild(NodeRef parentRef,
NodeRef childRef,
QName assocTypeQName,
QName assocQName) |
void |
addProperties(NodeRef nodeRef,
Map<QName,Serializable> properties) |
int |
countChildAssocs(NodeRef nodeRef,
boolean isPrimary) |
AssociationRef |
createAssociation(NodeRef sourceRef,
NodeRef targetRef,
QName assocTypeQName) |
ChildAssociationRef |
createNode(NodeRef parentRef,
QName assocTypeQName,
QName assocQName,
QName nodeTypeQName) |
ChildAssociationRef |
createNode(NodeRef parentRef,
QName assocTypeQName,
QName assocQName,
QName nodeTypeQName,
Map<QName,Serializable> properties) |
StoreRef |
createStore(String protocol,
String identifier)
Defers to the typed service
|
void |
deleteNode(NodeRef nodeRef)
Delete Node
|
void |
deleteStore(StoreRef storeRef) |
boolean |
exists(NodeRef nodeRef) |
boolean |
exists(StoreRef storeRef) |
List<NodeRef> |
findNodes(NodeService.FindNodeParameters params) |
Set<NodeRef> |
getAllRootNodes(StoreRef storeRef) |
Set<QName> |
getAspects(NodeRef nodeRef) |
AssociationRef |
getAssoc(Long id) |
List<ChildAssociationRef> |
getChildAssocs(NodeRef nodeRef)
Defers to the pattern matching overload
|
List<ChildAssociationRef> |
getChildAssocs(NodeRef nodeRef,
QNamePattern typeQNamePattern,
QNamePattern qnamePattern)
Filters out any associations if their qname is not a match to the given pattern.
|
List<ChildAssociationRef> |
getChildAssocs(NodeRef nodeRef,
QNamePattern typeQNamePattern,
QNamePattern qnamePattern,
boolean preload)
Filters out any associations if their qname is not a match to the given pattern.
|
List<ChildAssociationRef> |
getChildAssocs(NodeRef nodeRef,
QNamePattern typeQNamePattern,
QNamePattern qnamePattern,
int maxResults,
boolean preload)
Fetches the first n child associations in an efficient manner
|
List<ChildAssociationRef> |
getChildAssocs(NodeRef nodeRef,
Set<QName> childNodeTypeQNames) |
List<ChildAssociationRef> |
getChildAssocsByPropertyValue(NodeRef nodeRef,
QName propertyQName,
Serializable value) |
Collection<ChildAssociationRef> |
getChildAssocsWithoutParentAssocsOfType(NodeRef parent,
QName assocTypeQName) |
NodeRef |
getChildByName(NodeRef nodeRef,
QName assocTypeQName,
String childName) |
List<ChildAssociationRef> |
getChildrenByName(NodeRef nodeRef,
QName assocTypeQName,
Collection<String> childNames) |
Long |
getNodeAclId(NodeRef nodeRef) |
NodeRef |
getNodeRef(Long nodeId) |
NodeRef.Status |
getNodeStatus(NodeRef nodeRef) |
List<ChildAssociationRef> |
getParentAssocs(NodeRef nodeRef)
Defers to the pattern matching overload
|
List<ChildAssociationRef> |
getParentAssocs(NodeRef nodeRef,
QNamePattern typeQNamePattern,
QNamePattern qnamePattern)
Filters out any associations if their qname is not a match to the given pattern.
|
Collection<NodeRef> |
getParents(NodeRef nodeRef) |
Path |
getPath(NodeRef nodeRef) |
List<Path> |
getPaths(NodeRef nodeRef,
boolean primaryOnly)
When searching for
primaryOnly == true, checks that there is exactly
one path. |
ChildAssociationRef |
getPrimaryParent(NodeRef nodeRef) |
Map<QName,Serializable> |
getProperties(NodeRef nodeRef) |
Serializable |
getProperty(NodeRef nodeRef,
QName qname) |
NodeRef |
getRootNode(StoreRef storeRef) |
List<AssociationRef> |
getSourceAssocs(NodeRef targetRef,
QNamePattern qnamePattern) |
NodeRef |
getStoreArchiveNode(StoreRef storeRef) |
List<StoreRef> |
getStores() |
List<AssociationRef> |
getTargetAssocs(NodeRef sourceRef,
QNamePattern qnamePattern) |
List<AssociationRef> |
getTargetAssocsByPropertyValue(NodeRef sourceRef,
QNamePattern qnamePattern,
QName propertyQName,
Serializable propertyValue) |
<M extends Trait> |
getTrait(Class<? extends M> traitAPI) |
QName |
getType(NodeRef nodeRef) |
boolean |
hasAspect(NodeRef nodeRef,
QName aspectQName)
Performs a check on the set of node aspects
|
ChildAssociationRef |
moveNode(NodeRef nodeToMoveRef,
NodeRef newParentRef,
QName assocTypeQName,
QName assocQName)
Move Node
Drops the old primary association and creates a new one
|
void |
removeAspect(NodeRef nodeRef,
QName aspectTypeQName) |
void |
removeAssociation(NodeRef sourceRef,
NodeRef targetRef,
QName assocTypeQName) |
void |
removeChild(NodeRef parentRef,
NodeRef childRef) |
boolean |
removeChildAssociation(ChildAssociationRef childAssocRef) |
void |
removeProperty(NodeRef nodeRef,
QName qname) |
boolean |
removeSecondaryChildAssociation(ChildAssociationRef childAssocRef) |
NodeRef |
restoreNode(NodeRef archivedNodeRef,
NodeRef destinationParentNodeRef,
QName assocTypeQName,
QName assocQName)
Archives the node without the cm:auditable aspect behaviour
|
void |
setAssociations(NodeRef sourceRef,
QName assocTypeQName,
List<NodeRef> targetRefs) |
void |
setChildAssociationIndex(ChildAssociationRef childAssocRef,
int index) |
void |
setEnableTimestampPropagation(boolean enableTimestampPropagation)
Set whether cm:auditable timestamps should be propagated to parent nodes
where the parent-child relationship has been marked using propagateTimestamps.
|
void |
setNodeDAO(NodeDAO nodeDAO) |
void |
setPermissionService(PermissionService permissionService) |
void |
setPolicyBehaviourFilter(BehaviourFilter policyBehaviourFilter) |
void |
setProperties(NodeRef nodeRef,
Map<QName,Serializable> properties)
Ensures that all required properties are present on the node and copies the
property values to the
Node. |
void |
setProperty(NodeRef nodeRef,
QName qname,
Serializable value)
Gets the properties map, sets the value (null is allowed) and checks that the new set
of properties is valid.
|
void |
setQnameDAO(QNameDAO qnameDAO) |
void |
setStoreArchiveMap(StoreArchiveMap storeArchiveMap) |
void |
setType(NodeRef nodeRef,
QName typeQName) |
equals, generateGuid, getDefaultProperties, getDefaultProperties, getTypeAndAspectQNames, hashCode, init, invokeBeforeAddAspect, invokeBeforeArchiveNode, invokeBeforeCreateNode, invokeBeforeCreateStore, invokeBeforeDeleteAssociation, invokeBeforeDeleteChildAssociation, invokeBeforeDeleteNode, invokeBeforeMoveNode, invokeBeforeRemoveAspect, invokeBeforeSetType, invokeBeforeUpdateNode, invokeOnAddAspect, invokeOnCreateAssociation, invokeOnCreateChildAssociation, invokeOnCreateNode, invokeOnCreateStore, invokeOnDeleteAssociation, invokeOnDeleteChildAssociation, invokeOnDeleteNode, invokeOnMoveNode, invokeOnRemoveAspect, invokeOnRestoreNode, invokeOnSetType, invokeOnUpdateNode, invokeOnUpdateProperties, removeSeconaryChildAssociation, setDictionaryService, setPolicyComponent, setStoresToIgnorePolicies, setTenantService, setTransactionServiceclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitremoveSeconaryChildAssociationpublic static final String KEY_PENDING_DELETE_NODES
public void setQnameDAO(QNameDAO qnameDAO)
public void setNodeDAO(NodeDAO nodeDAO)
public void setPermissionService(PermissionService permissionService)
public void setStoreArchiveMap(StoreArchiveMap storeArchiveMap)
public void setPolicyBehaviourFilter(BehaviourFilter policyBehaviourFilter)
policyBehaviourFilter - component used to enable and disable behaviourspublic void setEnableTimestampPropagation(boolean enableTimestampPropagation)
enableTimestampPropagation - true to propagate timestamps to the parent
node where appropriatepublic boolean exists(StoreRef storeRef)
exists in interface NodeServicepublic boolean exists(NodeRef nodeRef)
exists in interface NodeServicepublic NodeRef.Status getNodeStatus(NodeRef nodeRef)
getNodeStatus in interface NodeServicepublic NodeRef getNodeRef(Long nodeId)
getNodeRef in interface NodeServicepublic List<StoreRef> getStores()
getStores in interface NodeServicepublic StoreRef createStore(String protocol, String identifier)
createStore in interface NodeServicepublic void deleteStore(StoreRef storeRef) throws InvalidStoreRefException
deleteStore in interface NodeServiceUnsupportedOperationException - AlwaysInvalidStoreRefExceptionpublic NodeRef getRootNode(StoreRef storeRef) throws InvalidStoreRefException
getRootNode in interface NodeServiceInvalidStoreRefExceptionpublic Set<NodeRef> getAllRootNodes(StoreRef storeRef)
getAllRootNodes in interface NodeServicepublic ChildAssociationRef createNode(NodeRef parentRef, QName assocTypeQName, QName assocQName, QName nodeTypeQName)
createNode in interface NodeServicecreateNode(NodeRef, QName, QName, QName, Map)public List<ChildAssociationRef> getChildAssocs(NodeRef nodeRef) throws InvalidNodeRefException
AbstractNodeServiceImplgetChildAssocs in interface NodeServicegetChildAssocs in class AbstractNodeServiceImplInvalidNodeRefExceptionRegexQNamePattern.MATCH_ALL,
NodeService.getChildAssocs(NodeRef, QNamePattern, QNamePattern)public List<NodeRef> findNodes(NodeService.FindNodeParameters params)
findNodes in interface NodeServicefindNodes in class AbstractNodeServiceImplpublic ChildAssociationRef createNode(NodeRef parentRef, QName assocTypeQName, QName assocQName, QName nodeTypeQName, Map<QName,Serializable> properties)
createNode in interface NodeServicepublic void setChildAssociationIndex(ChildAssociationRef childAssocRef, int index)
setChildAssociationIndex in interface NodeServicepublic QName getType(NodeRef nodeRef) throws InvalidNodeRefException
getType in interface NodeServiceInvalidNodeRefExceptionpublic void setType(NodeRef nodeRef, QName typeQName) throws InvalidNodeRefException
setType in interface NodeServiceInvalidNodeRefExceptionNodeService.setType(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName)public void addAspect(NodeRef nodeRef, QName aspectTypeQName, Map<QName,Serializable> aspectProperties) throws InvalidNodeRefException, InvalidAspectException
addAspect in interface NodeServiceInvalidNodeRefExceptionInvalidAspectExceptionpublic int countChildAssocs(NodeRef nodeRef, boolean isPrimary) throws InvalidNodeRefException
countChildAssocs in interface NodeServiceInvalidNodeRefExceptionpublic void removeAspect(NodeRef nodeRef, QName aspectTypeQName) throws InvalidNodeRefException, InvalidAspectException
removeAspect in interface NodeServiceInvalidNodeRefExceptionInvalidAspectExceptionpublic boolean hasAspect(NodeRef nodeRef, QName aspectQName) throws InvalidNodeRefException, InvalidAspectException
hasAspect in interface NodeServiceInvalidNodeRefExceptionInvalidAspectExceptionpublic Set<QName> getAspects(NodeRef nodeRef) throws InvalidNodeRefException
getAspects in interface NodeServiceInvalidNodeRefExceptionpublic void deleteNode(NodeRef nodeRef)
deleteNode in interface NodeServicepublic ChildAssociationRef addChild(NodeRef parentRef, NodeRef childRef, QName assocTypeQName, QName assocQName)
addChild in interface NodeServicepublic List<ChildAssociationRef> addChild(Collection<NodeRef> parentRefs, NodeRef childRef, QName assocTypeQName, QName assocQName)
addChild in interface NodeServicepublic void removeChild(NodeRef parentRef, NodeRef childRef) throws InvalidNodeRefException
removeChild in interface NodeServiceInvalidNodeRefExceptionpublic boolean removeChildAssociation(ChildAssociationRef childAssocRef)
removeChildAssociation in interface NodeServicepublic boolean removeSecondaryChildAssociation(ChildAssociationRef childAssocRef)
removeSecondaryChildAssociation in interface NodeServicepublic Serializable getProperty(NodeRef nodeRef, QName qname) throws InvalidNodeRefException
getProperty in interface NodeServiceInvalidNodeRefExceptionpublic Map<QName,Serializable> getProperties(NodeRef nodeRef) throws InvalidNodeRefException
getProperties in interface NodeServiceInvalidNodeRefExceptionpublic Long getNodeAclId(NodeRef nodeRef) throws InvalidNodeRefException
getNodeAclId in interface NodeServiceInvalidNodeRefExceptionpublic void setProperty(NodeRef nodeRef, QName qname, Serializable value) throws InvalidNodeRefException
setProperty in interface NodeServiceInvalidNodeRefExceptionpublic void setProperties(NodeRef nodeRef, Map<QName,Serializable> properties) throws InvalidNodeRefException
Node.
To remove a property, remove it from the map before calling this method. Null-valued properties are allowed.
If any of the values are null, a marker object is put in to mimic nulls. They will be turned back into a real nulls when the properties are requested again.
setProperties in interface NodeServiceInvalidNodeRefExceptionpublic void addProperties(NodeRef nodeRef, Map<QName,Serializable> properties) throws InvalidNodeRefException
addProperties in interface NodeServiceInvalidNodeRefExceptionpublic void removeProperty(NodeRef nodeRef, QName qname) throws InvalidNodeRefException
removeProperty in interface NodeServiceInvalidNodeRefExceptionpublic Collection<NodeRef> getParents(NodeRef nodeRef) throws InvalidNodeRefException
InvalidNodeRefExceptionpublic List<ChildAssociationRef> getParentAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern)
getParentAssocs in interface NodeServicepublic List<ChildAssociationRef> getParentAssocs(NodeRef nodeRef) throws InvalidNodeRefException
AbstractNodeServiceImplgetParentAssocs in interface NodeServicegetParentAssocs in class AbstractNodeServiceImplInvalidNodeRefExceptionRegexQNamePattern.MATCH_ALL,
NodeService.getParentAssocs(NodeRef, QNamePattern, QNamePattern)public List<ChildAssociationRef> getChildAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern)
getChildAssocs in interface NodeServicepublic List<ChildAssociationRef> getChildAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern, boolean preload)
getChildAssocs in interface NodeServicepublic List<ChildAssociationRef> getChildAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern, int maxResults, boolean preload)
getChildAssocs in interface NodeServicepublic List<ChildAssociationRef> getChildAssocs(NodeRef nodeRef, Set<QName> childNodeTypeQNames)
getChildAssocs in interface NodeServicepublic NodeRef getChildByName(NodeRef nodeRef, QName assocTypeQName, String childName)
getChildByName in interface NodeServicepublic List<ChildAssociationRef> getChildrenByName(NodeRef nodeRef, QName assocTypeQName, Collection<String> childNames)
getChildrenByName in interface NodeServicepublic ChildAssociationRef getPrimaryParent(NodeRef nodeRef) throws InvalidNodeRefException
getPrimaryParent in interface NodeServiceInvalidNodeRefExceptionpublic AssociationRef createAssociation(NodeRef sourceRef, NodeRef targetRef, QName assocTypeQName) throws InvalidNodeRefException, AssociationExistsException
createAssociation in interface NodeServiceInvalidNodeRefExceptionAssociationExistsExceptionpublic void setAssociations(NodeRef sourceRef, QName assocTypeQName, List<NodeRef> targetRefs)
setAssociations in interface NodeServicepublic Collection<ChildAssociationRef> getChildAssocsWithoutParentAssocsOfType(NodeRef parent, QName assocTypeQName)
getChildAssocsWithoutParentAssocsOfType in interface NodeServicepublic List<ChildAssociationRef> getChildAssocsByPropertyValue(NodeRef nodeRef, QName propertyQName, Serializable value)
getChildAssocsByPropertyValue in interface NodeServicepublic void removeAssociation(NodeRef sourceRef, NodeRef targetRef, QName assocTypeQName) throws InvalidNodeRefException
removeAssociation in interface NodeServiceInvalidNodeRefExceptionpublic AssociationRef getAssoc(Long id)
getAssoc in interface NodeServicepublic List<AssociationRef> getTargetAssocs(NodeRef sourceRef, QNamePattern qnamePattern)
getTargetAssocs in interface NodeServicepublic List<AssociationRef> getTargetAssocsByPropertyValue(NodeRef sourceRef, QNamePattern qnamePattern, QName propertyQName, Serializable propertyValue)
getTargetAssocsByPropertyValue in interface NodeServicepublic List<AssociationRef> getSourceAssocs(NodeRef targetRef, QNamePattern qnamePattern)
getSourceAssocs in interface NodeServicepublic Path getPath(NodeRef nodeRef) throws InvalidNodeRefException
getPath in interface NodeServiceInvalidNodeRefExceptiongetPaths(NodeRef, boolean)public List<Path> getPaths(NodeRef nodeRef, boolean primaryOnly) throws InvalidNodeRefException
primaryOnly == true, checks that there is exactly
one path.getPaths in interface NodeServiceInvalidNodeRefExceptionpublic NodeRef restoreNode(NodeRef archivedNodeRef, NodeRef destinationParentNodeRef, QName assocTypeQName, QName assocQName)
restoreNode in interface NodeServicepublic ChildAssociationRef moveNode(NodeRef nodeToMoveRef, NodeRef newParentRef, QName assocTypeQName, QName assocQName)
moveNode in interface NodeServicepublic NodeRef getStoreArchiveNode(StoreRef storeRef)
getStoreArchiveNode in interface NodeServicepublic <M extends Trait> ExtendedTrait<M> getTrait(Class<? extends M> traitAPI)
getTrait in interface ExtensibleCopyright © 2005–2020 Alfresco Software. All rights reserved.