|
|||||||||
| 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
|
| Constructor Summary | |
|---|---|
protected |
AbstractNodeServiceImpl()
|
| Method Summary | |
|---|---|
protected void |
addDefaultPropertyValues(ClassDefinition classDefinition,
java.util.Map properties)
Sets the default property values |
boolean |
equals(java.lang.Object obj)
Checks equality by type and uuid |
protected java.lang.String |
generateGuid(java.util.Map preCreationProperties)
Generates a GUID for the node using either the creation properties or just by generating a value randomly. |
java.util.List |
getChildAssocs(NodeRef nodeRef)
Defers to the pattern matching overload |
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)
|
protected PropertyValue |
makePropertyValue(PropertyDefinition propertyDef,
java.io.Serializable value)
Helper method to convert the Serializable value into a full,
persistable PropertyValue. |
protected java.io.Serializable |
makeSerializableValue(PropertyDefinition propertyDef,
PropertyValue propertyValue)
Extracts the externally-visible property from the propertyValue. |
void |
setDictionaryService(DictionaryService dictionaryService)
|
void |
setPolicyComponent(PolicyComponent policyComponent)
|
| 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, createAssociation, createNode, createNode, createStore, deleteNode, exists, exists, getAspects, getChildAssocs, getChildByName, 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
| Constructor Detail |
|---|
protected AbstractNodeServiceImpl()
| Method Detail |
|---|
public void setPolicyComponent(PolicyComponent policyComponent)
public void setDictionaryService(DictionaryService dictionaryService)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectAbstractNodeServiceImpl.uuidpublic 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 NodeServicenodeRef - 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 NodeServicenodeRef - 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 PropertyValue makePropertyValue(PropertyDefinition propertyDef,
java.io.Serializable value)
Serializable value into a full,
persistable PropertyValue.
Where the property definition is null, the value will take on the
generic ANY value.
Where the property definition specifies a multi-valued property but the value provided is not a collection, the value will be wrapped in a collection.
propertyDef - the property dictionary definition, may be nullvalue - the value, which will be converted according to the definition -
may be null
protected java.io.Serializable makeSerializableValue(PropertyDefinition propertyDef,
PropertyValue propertyValue)
propertyValue.
propertyDef - the model property definition - may be nullpropertyValue - the persisted property
protected void addDefaultPropertyValues(ClassDefinition classDefinition,
java.util.Map properties)
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 | ||||||||