|
Amongst other things, this service must enforce the unique name check as mandated by the duplicate entity in the model.
<type name="cm:folder"> ... <associations> <child-association name="cm:contains"> ... <duplicate>false</duplicate> </child-association> </associations> </type>When duplicates are not allowed, and the cm:name property of a node changes, then the DuplicateChildNodeNameException exception must be thrown. Client code can catch this exception and deal with it appropriately.
Method Summary | ||
void |
addAspect(NodeRef nodeRef, QName aspectTypeQName, Map<QName,Serializable> aspectProperties) Applies an aspect to the given node. |
|
addChild(Collection<NodeRef> parentRefs, NodeRef childRef, QName assocTypeQName, QName qname) Associates a given child node with a given collection of parents. |
||
addChild(NodeRef parentRef, NodeRef childRef, QName assocTypeQName, QName qname) Makes a parent-child association between the given nodes. |
||
void |
addProperties(NodeRef nodeRef, Map<QName,Serializable> properties) Add all given properties to the node. |
|
int |
countChildAssocs(NodeRef nodeRef, boolean isPrimary) Counts the number of child associations of nodeRef. |
|
createAssociation(NodeRef sourceRef, NodeRef targetRef, QName assocTypeQName) Create a peer association between two nodes. |
||
createNode(NodeRef parentRef, QName assocTypeQName, QName assocQName, QName nodeTypeQName) | ||
createNode(NodeRef parentRef, QName assocTypeQName, QName assocQName, QName nodeTypeQName, Map<QName,Serializable> properties) Creates a new, non-abstract, real node as a primary child of the given parent node. |
||
createStore(String protocol, String identifier) Create a new store for the given protocol and identifier. |
||
void |
deleteNode(NodeRef nodeRef) Deletes the given node. |
|
void |
deleteStore(StoreRef storeRef) Delete a store and all its contents. |
|
boolean |
exists(NodeRef nodeRef) | |
boolean |
exists(StoreRef storeRef) | |
findNodes(org.alfresco.service.cmr.repository.NodeService.FindNodeParameters params) | ||
getAllRootNodes(StoreRef storeRef) | ||
getAspects(NodeRef nodeRef) | ||
getAssoc(Long id) Gets an association by ID. |
||
getChildAssocs(NodeRef nodeRef) Get all child associations of the given node. |
||
getChildAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern) Gets all child associations where the pattern of the association qualified name is a match. |
||
getChildAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern, boolean preload) Gets all child associations where the pattern of the association qualified names match the patterns provided. |
||
getChildAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern, int maxResults, boolean preload) Gets all child associations where the pattern of the association qualified name is an exact match. |
||
getChildAssocs(NodeRef nodeRef, Set<QName> childNodeTypeQNames) Retrieve immediate children of a given node where the child nodes are in the given inclusive list. |
||
getChildAssocsByPropertyValue(NodeRef nodeRef, QName propertyQName, Serializable value) Retrieve the immediate children of a given node based on the value of a property of those children. |
||
getChildAssocsWithoutParentAssocsOfType(NodeRef parent, QName assocTypeQName) 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. |
||
getChildByName(NodeRef nodeRef, QName assocTypeQName, String childName) Get the node with the given name within the context of the parent node. |
||
getChildrenByName(NodeRef nodeRef, QName assocTypeQName, Collection<String> childNames) Get the nodes with the given names within the context of the parent node. |
||
getNodeAclId(NodeRef nodeRef) | ||
getNodeRef(Long nodeId) Get the node reference for a given node DB ID |
||
org.alfresco.service.cmr.repository.NodeRef.Status |
getNodeStatus(NodeRef nodeRef) Gets the ID of the last transaction that caused the node to change. |
|
getParentAssocs(NodeRef nodeRef) | ||
getParentAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern) Gets all parent associations where the pattern of the association qualified name is a match |
||
getPath(NodeRef nodeRef) The root node has an entry in the path(s) returned. |
||
getPaths(NodeRef nodeRef, boolean primaryOnly) The root node has an entry in the path(s) returned. |
||
getPrimaryParent(NodeRef nodeRef) Fetches the primary parent-child relationship. |
||
getProperties(NodeRef nodeRef) | ||
getProperty(NodeRef nodeRef, QName qname) | ||
getRootNode(StoreRef storeRef) | ||
getSourceAssocs(NodeRef targetRef, QNamePattern qnamePattern) Fetches all associations to the given target where the associations' qualified names match the pattern provided. |
||
getStoreArchiveNode(StoreRef storeRef) Get the node where archived items will have gone when deleted from the given store. |
||
getStores() Gets a list of all available node store references |
||
getTargetAssocs(NodeRef sourceRef, QNamePattern qnamePattern) Fetches all associations from the given source where the associations' qualified names match the pattern provided. |
||
getTargetAssocsByPropertyValue(NodeRef sourceRef, QNamePattern qnamePattern, QName propertyQName, Serializable propertyValue) Fetches all associations from the given source where the associations' qualified names match the pattern provided. |
||
getType(NodeRef nodeRef) | ||
boolean |
hasAspect(NodeRef nodeRef, QName aspectTypeQName) Determines if a given aspect is present on a node. |
|
moveNode(NodeRef nodeToMoveRef, NodeRef newParentRef, QName assocTypeQName, QName assocQName) Moves the primary location of the given node. |
||
void |
removeAspect(NodeRef nodeRef, QName aspectTypeQName) Remove an aspect and all related properties from a node |
|
void |
removeAssociation(NodeRef sourceRef, NodeRef targetRef, QName assocTypeQName) | |
void |
removeChild(NodeRef parentRef, NodeRef childRef) Severs all parent-child relationships between two nodes. |
|
boolean |
removeChildAssociation(ChildAssociationRef childAssocRef) Remove a specific child association. |
|
void |
removeProperty(NodeRef nodeRef, QName qname) Removes a property value completely. |
|
boolean |
removeSeconaryChildAssociation(ChildAssociationRef childAssocRef) | |
boolean |
removeSecondaryChildAssociation(ChildAssociationRef childAssocRef) Remove a specific secondary child association. |
|
restoreNode(NodeRef archivedNodeRef, NodeRef destinationParentNodeRef, QName assocTypeQName, QName assocQName) Restore an individual node (along with its sub-tree nodes) to the target location. |
||
void |
setAssociations(NodeRef sourceRef, QName assocTypeQName, List<NodeRef> targetRefs) Re-assign all typed target associations for a given node. |
|
void |
setChildAssociationIndex(ChildAssociationRef childAssocRef, int index) Set the ordering index of the child association. |
|
void |
setProperties(NodeRef nodeRef, Map<QName,Serializable> properties) Replace all current properties on the node with the given properties. |
|
void |
setProperty(NodeRef nodeRef, QName qname, Serializable value) Sets the value of a property to be any Serializable instance. |
|
void |
setType(NodeRef nodeRef, QName typeQName) Re-sets the type of the node. |
This involves changing the node's primary parent and possibly the name of the association referencing it.
If the new parent is in a different store from the original, then the entire node hierarchy is moved to the new store. Inter-store associations are not affected.
All associations (both children and regular node associations) will be deleted, and where the given node is the primary parent, the children will also be cascade deleted.
The child node will be cascade deleted if one of the associations was the primary association, i.e. the one with which the child node was created.
The child node will be cascade deleted if the association was the primary association, i.e. the one with which the child node was created.
NOTE: Null values are allowed.
NOTE: Null values are allowed and will replace the existing value.
Serializable
instance.
NOTE: Null values are allowed.
The resultant list is ordered by (a) explicit index and (b) association creation time.
The resultant list is ordered by (a) explicit index and (b) association creation time.
ChildAssocRef
instances. If the
node is not a container then the result will be empty.ChildAssociationRef
instances. If the
node is not a container then the result will be empty.ChildAssociationRef
instancesChildAssociationRef
instancesChildAssociationRef
instances.If the property to be searched is multi-valued then will match on any one values.
Please note, the following system maintained properties that cannot be used with this method.
ChildAssociationRef
instances.That API method getChildByName only works for associations that don't allow duplicate child names. See cm:folder and the duplicate tag. Child associations without this allow duplicate child names and therefore it is possible to have multiple children with the same name stored against the given association type.
For a root node, the parent node reference will be null.
null
if it does not existNodeAssocRef
instances for which the
given node is a sourceAssociationRef
instances for which the
given node is a sourceNodeAssocRef
instances for which the
given node is a target
|