|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.node.AbstractNodeServiceImpl
public abstract class AbstractNodeServiceImpl
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.
Field Summary | |
---|---|
protected DictionaryService |
dictionaryService
|
protected java.util.List |
storesToIgnorePolicies
|
protected TenantService |
tenantService
|
protected TransactionService |
transactionService
|
Constructor Summary | |
---|---|
protected |
AbstractNodeServiceImpl()
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Checks equality by type and uuid |
protected java.lang.String |
generateGuid(java.util.Map preCreationProperties)
Fetches any pre-defined node uuid from the properties, but does not generate a new uuid. |
java.util.List |
getChildAssocs(NodeRef nodeRef)
Defers to the pattern matching overload |
protected java.util.Map |
getDefaultProperties(ClassDefinition classDefinition)
Sets the default property values |
protected java.util.Map |
getDefaultProperties(QName typeQName)
|
java.util.List |
getParentAssocs(NodeRef nodeRef)
Defers to the pattern matching overload |
protected java.util.Set |
getTypeAndAspectQNames(NodeRef nodeRef)
Get all aspect and node type qualified names |
int |
hashCode()
|
void |
init()
Registers the node policies as well as node indexing behaviour if the indexer is present. |
protected void |
invokeBeforeAddAspect(NodeRef nodeRef,
QName aspectTypeQName)
|
protected void |
invokeBeforeCreateChildAssociation(NodeRef parentNodeRef,
NodeRef childNodeRef,
QName assocTypeQName,
QName assocQName,
boolean isNewNode)
|
protected void |
invokeBeforeCreateNode(NodeRef parentNodeRef,
QName assocTypeQName,
QName assocQName,
QName childNodeTypeQName)
|
protected void |
invokeBeforeCreateNodeAssociation(NodeRef parentNodeRef,
QName assocTypeQName,
QName assocQName)
|
protected void |
invokeBeforeCreateStore(QName nodeTypeQName,
StoreRef storeRef)
|
protected void |
invokeBeforeDeleteChildAssociation(ChildAssociationRef childAssocRef)
|
protected void |
invokeBeforeDeleteNode(NodeRef nodeRef)
|
protected void |
invokeBeforeRemoveAspect(NodeRef nodeRef,
QName aspectTypeQName)
|
protected void |
invokeBeforeUpdateNode(NodeRef nodeRef)
|
protected void |
invokeOnAddAspect(NodeRef nodeRef,
QName aspectTypeQName)
|
protected void |
invokeOnCreateAssociation(AssociationRef nodeAssocRef)
|
protected void |
invokeOnCreateChildAssociation(ChildAssociationRef childAssocRef,
boolean isNewNode)
|
protected void |
invokeOnCreateNode(ChildAssociationRef childAssocRef)
|
protected void |
invokeOnCreateNodeAssociation(ChildAssociationRef childAssocRef)
|
protected void |
invokeOnCreateStore(NodeRef rootNodeRef)
|
protected void |
invokeOnDeleteAssociation(AssociationRef nodeAssocRef)
|
protected void |
invokeOnDeleteChildAssociation(ChildAssociationRef childAssocRef)
|
protected void |
invokeOnDeleteNode(ChildAssociationRef childAssocRef,
QName childNodeTypeQName,
java.util.Set childAspectQnames,
boolean isArchivedNode)
|
protected void |
invokeOnMoveNode(ChildAssociationRef oldChildAssocRef,
ChildAssociationRef newChildAssocRef)
|
protected void |
invokeOnRemoveAspect(NodeRef nodeRef,
QName aspectTypeQName)
|
protected void |
invokeOnUpdateNode(NodeRef nodeRef)
|
protected void |
invokeOnUpdateProperties(NodeRef nodeRef,
java.util.Map before,
java.util.Map after)
|
void |
setDictionaryService(DictionaryService dictionaryService)
|
void |
setPolicyComponent(PolicyComponent policyComponent)
|
void |
setStoresToIgnorePolicies(java.util.List storesToIgnorePolicies)
|
void |
setTenantService(TenantService tenantService)
|
void |
setTransactionService(TransactionService transactionService)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.alfresco.service.cmr.repository.NodeService |
---|
addAspect, addChild, addChild, addProperties, createAssociation, createNode, createNode, createStore, deleteNode, deleteStore, exists, exists, getAspects, getAssoc, getChildAssocs, getChildAssocs, getChildAssocs, getChildAssocsWithoutParentAssocsOfType, getChildByName, getChildrenByName, getNodeStatus, getParentAssocs, getPath, getPaths, getPrimaryParent, getProperties, getProperty, getRootNode, getSourceAssocs, getStoreArchiveNode, getStores, getTargetAssocs, getType, hasAspect, moveNode, removeAspect, removeAssociation, removeChild, removeChildAssociation, removeProperty, removeSeconaryChildAssociation, restoreNode, setChildAssociationIndex, setProperties, setProperty, setType |
Field Detail |
---|
protected DictionaryService dictionaryService
protected TransactionService transactionService
protected TenantService tenantService
protected java.util.List storesToIgnorePolicies
Constructor Detail |
---|
protected AbstractNodeServiceImpl()
Method Detail |
---|
public void setPolicyComponent(PolicyComponent policyComponent)
public void setDictionaryService(DictionaryService dictionaryService)
public void setTransactionService(TransactionService transactionService)
public void setTenantService(TenantService tenantService)
public void setStoresToIgnorePolicies(java.util.List storesToIgnorePolicies)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
AbstractNodeServiceImpl.uuid
public void init()
indexer
is present.
protected void invokeBeforeCreateStore(QName nodeTypeQName, StoreRef storeRef)
NodeServicePolicies.BeforeCreateStorePolicy.beforeCreateStore(QName,
StoreRef)
protected void invokeOnCreateStore(NodeRef rootNodeRef)
NodeServicePolicies.OnCreateStorePolicy.onCreateStore(NodeRef)
protected void invokeBeforeCreateNode(NodeRef parentNodeRef, QName assocTypeQName, QName assocQName, QName childNodeTypeQName)
NodeServicePolicies.BeforeCreateNodePolicy.beforeCreateNode(NodeRef,
QName, QName, QName)
protected void invokeOnCreateNode(ChildAssociationRef childAssocRef)
NodeServicePolicies.OnCreateNodePolicy.onCreateNode(ChildAssociationRef)
protected void invokeOnMoveNode(ChildAssociationRef oldChildAssocRef, ChildAssociationRef newChildAssocRef)
NodeServicePolicies.OnMoveNodePolicy.onMoveNode(ChildAssociationRef, ChildAssociationRef)
protected void invokeBeforeUpdateNode(NodeRef nodeRef)
NodeServicePolicies.BeforeUpdateNodePolicy.beforeUpdateNode(NodeRef)
protected void invokeOnUpdateNode(NodeRef nodeRef)
NodeServicePolicies.OnUpdateNodePolicy.onUpdateNode(NodeRef)
protected void invokeOnUpdateProperties(NodeRef nodeRef, java.util.Map before, java.util.Map after)
NodeServicePolicies.OnUpdateProperties#onUpdatePropertiesPolicy(NodeRef, Map, Map)
protected void invokeBeforeDeleteNode(NodeRef nodeRef)
NodeServicePolicies.BeforeDeleteNodePolicy.beforeDeleteNode(NodeRef)
protected void invokeOnDeleteNode(ChildAssociationRef childAssocRef, QName childNodeTypeQName, java.util.Set childAspectQnames, boolean isArchivedNode)
NodeServicePolicies.OnDeleteNodePolicy#onDeleteNode(ChildAssociationRef)
protected void invokeBeforeAddAspect(NodeRef nodeRef, QName aspectTypeQName)
NodeServicePolicies.BeforeAddAspectPolicy.beforeAddAspect(NodeRef,
QName)
protected void invokeOnAddAspect(NodeRef nodeRef, QName aspectTypeQName)
NodeServicePolicies.OnAddAspectPolicy.onAddAspect(NodeRef, QName)
protected void invokeBeforeRemoveAspect(NodeRef nodeRef, QName aspectTypeQName)
NodeServicePolicies.BeforeRemoveAspectPolicy#BeforeRemoveAspect(NodeRef,
QName)
protected void invokeOnRemoveAspect(NodeRef nodeRef, QName aspectTypeQName)
NodeServicePolicies.OnRemoveAspectPolicy.onRemoveAspect(NodeRef,
QName)
protected void invokeBeforeCreateNodeAssociation(NodeRef parentNodeRef, QName assocTypeQName, QName assocQName)
NodeServicePolicies.BeforeCreateNodeAssociationPolicy#beforeCreateChildAssociation(NodeRef,
NodeRef, QName, QName)
protected void invokeOnCreateNodeAssociation(ChildAssociationRef childAssocRef)
NodeServicePolicies.OnCreateNodeAssociationPolicy#onCreateChildAssociation(ChildAssociationRef)
protected void invokeBeforeCreateChildAssociation(NodeRef parentNodeRef, NodeRef childNodeRef, QName assocTypeQName, QName assocQName, boolean isNewNode)
NodeServicePolicies.BeforeCreateChildAssociationPolicy#beforeCreateChildAssociation(NodeRef,
NodeRef, QName, QName)
protected void invokeOnCreateChildAssociation(ChildAssociationRef childAssocRef, boolean isNewNode)
NodeServicePolicies.OnCreateChildAssociationPolicy#onCreateChildAssociation(ChildAssociationRef)
protected void invokeBeforeDeleteChildAssociation(ChildAssociationRef childAssocRef)
NodeServicePolicies.BeforeDeleteChildAssociationPolicy.beforeDeleteChildAssociation(ChildAssociationRef)
protected void invokeOnDeleteChildAssociation(ChildAssociationRef childAssocRef)
NodeServicePolicies.OnDeleteChildAssociationPolicy.onDeleteChildAssociation(ChildAssociationRef)
protected void invokeOnCreateAssociation(AssociationRef nodeAssocRef)
NodeServicePolicies.OnCreateAssociationPolicy#onCreateAssociation(NodeRef, NodeRef, QName)
protected void invokeOnDeleteAssociation(AssociationRef nodeAssocRef)
NodeServicePolicies.OnDeleteAssociationPolicy.onDeleteAssociation(AssociationRef)
protected java.util.Set getTypeAndAspectQNames(NodeRef nodeRef)
nodeRef
- the node we are interested in
protected java.lang.String generateGuid(java.util.Map preCreationProperties)
preCreationProperties
- the properties that will be applied to the node
public java.util.List getParentAssocs(NodeRef nodeRef) throws InvalidNodeRefException
getParentAssocs
in interface NodeService
nodeRef
- the child node
InvalidNodeRefException
- if the node could not be foundRegexQNamePattern.MATCH_ALL
,
NodeService.getParentAssocs(NodeRef, QNamePattern, QNamePattern)
public java.util.List getChildAssocs(NodeRef nodeRef) throws InvalidNodeRefException
getChildAssocs
in interface NodeService
nodeRef
- the parent node - usually a container
ChildAssocRef
instances. If the
node is not a container then the result will be empty.
InvalidNodeRefException
- if the node could not be foundRegexQNamePattern.MATCH_ALL
,
NodeService.getChildAssocs(NodeRef, QNamePattern, QNamePattern)
protected java.util.Map getDefaultProperties(QName typeQName)
protected java.util.Map getDefaultProperties(ClassDefinition classDefinition)
classDefinition
- the model type definition for which to get defaultsproperties
- the properties of the node
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |