Package org.alfresco.repo.node
Class AbstractNodeServiceImpl
java.lang.Object
org.alfresco.repo.node.AbstractNodeServiceImpl
- All Implemented Interfaces:
NodeService
- Direct Known Subclasses:
DbNodeServiceImpl
Provides common functionality for
NodeService implementations.
Some of the overloaded simpler versions of methods are implemented by passing through the defaults as required.
The callback handling is also provided as a convenience for implementations.
- Author:
- Derek Hulley
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.alfresco.service.cmr.repository.NodeService
NodeService.FindNodeParameters -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DictionaryServiceprotected TenantServiceprotected TransactionService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks equality by type and uuidprotected StringgenerateGuid(Map<QName, Serializable> preCreationProperties) Fetches any pre-defined node uuid from the properties, but does not generate a new uuid.getChildAssocs(NodeRef nodeRef) Defers to the pattern matching overloadprotected Map<QName,Serializable> getDefaultProperties(ClassDefinition classDefinition) Sets the default property valuesprotected Map<QName,Serializable> getDefaultProperties(QName typeQName) getParentAssocs(NodeRef nodeRef) Defers to the pattern matching overloadgetTypeAndAspectQNames(NodeRef nodeRef) Get all aspect and node type qualified namesinthashCode()voidinit()Registers the node policies as well as node indexing behaviourprotected voidinvokeBeforeAddAspect(NodeRef nodeRef, QName aspectTypeQName) protected voidinvokeBeforeArchiveNode(NodeRef nodeRef) protected voidinvokeBeforeCreateNode(NodeRef parentNodeRef, QName assocTypeQName, QName assocQName, QName childNodeTypeQName) protected voidinvokeBeforeCreateStore(QName nodeTypeQName, StoreRef storeRef) protected voidinvokeBeforeDeleteAssociation(AssociationRef nodeAssocRef) protected voidinvokeBeforeDeleteChildAssociation(ChildAssociationRef childAssocRef) protected voidinvokeBeforeDeleteNode(NodeRef nodeRef) protected voidinvokeBeforeMoveNode(ChildAssociationRef oldChildAssocRef, NodeRef newParentRef) protected voidinvokeBeforeRemoveAspect(NodeRef nodeRef, QName aspectTypeQName) protected voidinvokeBeforeSetType(NodeRef nodeRef, QName oldType, QName newType) protected voidinvokeBeforeUpdateNode(NodeRef nodeRef) protected voidinvokeOnAddAspect(NodeRef nodeRef, QName aspectTypeQName) protected voidinvokeOnCreateAssociation(AssociationRef nodeAssocRef) protected voidinvokeOnCreateChildAssociation(ChildAssociationRef childAssocRef, boolean isNewNode) protected voidinvokeOnCreateNode(ChildAssociationRef childAssocRef) protected voidinvokeOnCreateStore(NodeRef rootNodeRef) protected voidinvokeOnDeleteAssociation(AssociationRef nodeAssocRef) protected voidinvokeOnDeleteChildAssociation(ChildAssociationRef childAssocRef) protected voidinvokeOnDeleteNode(ChildAssociationRef childAssocRef, QName childNodeTypeQName, Set<QName> childAspectQnames, boolean isArchivedNode) protected voidinvokeOnMoveNode(ChildAssociationRef oldChildAssocRef, ChildAssociationRef newChildAssocRef) protected voidinvokeOnRemoveAspect(NodeRef nodeRef, QName aspectTypeQName) protected voidinvokeOnRestoreNode(ChildAssociationRef childAssocRef) protected voidinvokeOnSetType(NodeRef nodeRef, QName oldType, QName newType) protected voidinvokeOnUpdateNode(NodeRef nodeRef) protected voidinvokeOnUpdateProperties(NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after) final booleanremoveSeconaryChildAssociation(ChildAssociationRef childAssocRef) voidsetDictionaryService(DictionaryService dictionaryService) voidsetPolicyComponent(PolicyComponent policyComponent) voidsetStoresToIgnorePolicies(Set<String> storesToIgnorePolicies) voidsetTenantService(TenantService tenantService) voidsetTransactionService(TransactionService transactionService) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.service.cmr.repository.NodeService
addAspect, addChild, addChild, addProperties, countChildAssocs, createAssociation, createNode, createNode, createStore, deleteNode, deleteStore, exists, exists, findAssocsNotLinkedByTwoOtherAssocs, getAllRootNodes, getAspects, getAssoc, getChildAssocs, getChildAssocs, getChildAssocs, getChildAssocs, getChildAssocsByPropertyValue, getChildAssocsWithoutParentAssocsOfType, getChildByName, getChildrenByName, getNodeAclId, getNodeRef, getNodeStatus, getParentAssocs, getPath, getPaths, getPrimaryParent, getProperties, getProperty, getRootNode, getSourceAssocs, getStoreArchiveNode, getStores, getTargetAssocs, getTargetAssocsByPropertyValue, getType, hasAspect, moveNode, removeAspect, removeAssociation, removeChild, removeChildAssociation, removeProperty, removeSecondaryChildAssociation, restoreNode, setAssociations, setChildAssociationIndex, setProperties, setProperty, setType
-
Field Details
-
dictionaryService
-
transactionService
-
tenantService
-
storesToIgnorePolicies
-
-
Constructor Details
-
AbstractNodeServiceImpl
protected AbstractNodeServiceImpl()
-
-
Method Details
-
setPolicyComponent
-
setDictionaryService
-
setTransactionService
-
setTenantService
-
setStoresToIgnorePolicies
-
equals
Checks equality by type and uuid -
hashCode
public int hashCode() -
init
public void init()Registers the node policies as well as node indexing behaviour -
invokeBeforeCreateStore
-
invokeOnCreateStore
-
invokeBeforeCreateNode
-
invokeOnCreateNode
-
invokeBeforeMoveNode
-
invokeOnMoveNode
protected void invokeOnMoveNode(ChildAssociationRef oldChildAssocRef, ChildAssociationRef newChildAssocRef) -
invokeBeforeUpdateNode
-
invokeOnUpdateNode
-
invokeOnSetType
-
invokeBeforeSetType
-
invokeOnUpdateProperties
protected void invokeOnUpdateProperties(NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after) -
invokeBeforeDeleteNode
-
invokeBeforeArchiveNode
-
invokeOnDeleteNode
protected void invokeOnDeleteNode(ChildAssociationRef childAssocRef, QName childNodeTypeQName, Set<QName> childAspectQnames, boolean isArchivedNode) -
invokeOnRestoreNode
-
invokeBeforeAddAspect
-
invokeOnAddAspect
-
invokeBeforeRemoveAspect
-
invokeOnRemoveAspect
-
invokeOnCreateChildAssociation
-
invokeBeforeDeleteChildAssociation
-
invokeOnDeleteChildAssociation
-
invokeOnCreateAssociation
-
invokeBeforeDeleteAssociation
-
invokeOnDeleteAssociation
-
getTypeAndAspectQNames
Get all aspect and node type qualified names- Parameters:
nodeRef- the node we are interested in- Returns:
- Returns a set of qualified names containing the node type and all the node aspects, or null if the node no longer exists
-
generateGuid
Fetches any pre-defined node uuid from the properties, but does not generate a new uuid.- Parameters:
preCreationProperties- the properties that will be applied to the node- Returns:
- Returns the ID to create the node with, or null if a standard GUID should be used
-
getParentAssocs
Defers to the pattern matching overload- Specified by:
getParentAssocsin interfaceNodeService- Throws:
InvalidNodeRefException- See Also:
-
getChildAssocs
Defers to the pattern matching overload- Specified by:
getChildAssocsin interfaceNodeService- Throws:
InvalidNodeRefException- See Also:
-
getDefaultProperties
-
getDefaultProperties
Sets the default property values- Parameters:
classDefinition- the model type definition for which to get defaults
-
findNodes
- Specified by:
findNodesin interfaceNodeService
-
removeSeconaryChildAssociation
- Specified by:
removeSeconaryChildAssociationin interfaceNodeService
-