public class NodeServiceImpl extends Object implements NodeService, VersionModel
NodeService.FindNodeParameters| Modifier and Type | Field and Description |
|---|---|
protected ContentDataDAO |
contentDataDAO |
protected NodeService |
dbNodeService |
protected DictionaryService |
dicitionaryService |
protected static String |
MSG_UNSUPPORTED
Error messages
|
ASPECT_VERSION_STORE_ROOT, ASSOC_ROOT_VERSION, ASSOC_SUCCESSOR, CHILD_QNAME_VERSION_HISTORIES, CHILD_QNAME_VERSION_META_DATA, CHILD_QNAME_VERSIONED_ASSOCS, CHILD_QNAME_VERSIONED_ATTRIBUTES, CHILD_QNAME_VERSIONED_CHILD_ASSOCS, CHILD_QNAME_VERSIONS, CHILD_VERSION_META_DATA, CHILD_VERSIONED_ATTRIBUTES, CHILD_VERSIONED_CHILD_ASSOCS, NAMESPACE_URI, PROP_ASSOC_QNAME, PROP_ASSOC_TYPE_QNAME, PROP_FROZEN_ASPECTS, PROP_FROZEN_NODE_ID, PROP_FROZEN_NODE_STORE_ID, PROP_FROZEN_NODE_STORE_PROTOCOL, PROP_FROZEN_NODE_TYPE, PROP_IS_MULTI_VALUE, PROP_IS_PRIMARY, PROP_META_DATA_NAME, PROP_META_DATA_VALUE, PROP_MULTI_VALUE, PROP_NTH_SIBLING, PROP_QNAME, PROP_QNAME_ASSOC_QNAME, PROP_QNAME_ASSOC_TYPE_QNAME, PROP_QNAME_FROZEN_ASPECTS, PROP_QNAME_FROZEN_NODE_ID, PROP_QNAME_FROZEN_NODE_STORE_ID, PROP_QNAME_FROZEN_NODE_STORE_PROTOCOL, PROP_QNAME_FROZEN_NODE_TYPE, PROP_QNAME_IS_MULTI_VALUE, PROP_QNAME_IS_PRIMARY, PROP_QNAME_META_DATA_NAME, PROP_QNAME_META_DATA_VALUE, PROP_QNAME_MULTI_VALUE, PROP_QNAME_NTH_SIBLING, PROP_QNAME_QNAME, PROP_QNAME_TRANSLATION_VERSIONS, PROP_QNAME_VALUE, PROP_QNAME_VERSION_LABEL, PROP_QNAME_VERSION_NUMBER, PROP_QNAME_VERSIONED_NODE_ID, PROP_VALUE, STORE_ID, TYPE_QNAME_VERSION, TYPE_QNAME_VERSION_HISTORY, TYPE_QNAME_VERSION_META_DATA_VALUE, TYPE_QNAME_VERSIONED_ASSOC, TYPE_QNAME_VERSIONED_CHILD_ASSOC, TYPE_QNAME_VERSIONED_PROPERTY, TYPE_VERSION, TYPE_VERSION_META_DATA_VALUE, TYPE_VERSIONED_CHILD_ASSOC, TYPE_VERSIONED_PROPERTYASPECT_LOCALNAME_VERSION_STORE_ROOT, ASSOC_LOCALNAME_ROOT_VERSION, CHILD_VERSION_HISTORIES, CHILD_VERSIONED_ASSOCS, CHILD_VERSIONS, PROP_CREATED_DATE, PROP_CREATOR, PROP_DESCRIPTION, PROP_TRANSLATION_VERSIONS, PROP_VERSION_DESCRIPTION, PROP_VERSION_LABEL, PROP_VERSION_NUMBER, PROP_VERSION_TYPE, PROP_VERSIONED_NODE_ID, STORE_PROTOCOL, TYPE_VERSION_HISTORY, TYPE_VERSIONED_ASSOC| Constructor and Description |
|---|
NodeServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAspect(NodeRef nodeRef,
QName aspectRef,
Map<QName,Serializable> aspectProperties) |
List<ChildAssociationRef> |
addChild(Collection<NodeRef> parentRefs,
NodeRef childRef,
QName assocTypeQName,
QName qname) |
ChildAssociationRef |
addChild(NodeRef parentRef,
NodeRef childRef,
QName assocTypeQName,
QName qname) |
void |
addProperties(NodeRef nodeRef,
Map<QName,Serializable> properties) |
List<String> |
cleanup()
No-op
|
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)
Delegates to the
NodeService used as the version store implementation |
void |
deleteNode(NodeRef nodeRef) |
void |
deleteStore(StoreRef storeRef) |
boolean |
exists(NodeRef nodeRef)
Delegates to the
NodeService used as the version store implementation |
boolean |
exists(StoreRef storeRef)
Delegates to the
NodeService used as the version store implementation |
List<NodeRef> |
findNodes(NodeService.FindNodeParameters params) |
Set<NodeRef> |
getAllRootNodes(StoreRef storeRef)
Delegates to the
NodeService used as the version store implementation |
Set<QName> |
getAspects(NodeRef nodeRef)
Translation for version store
|
AssociationRef |
getAssoc(Long id)
Gets an association by ID.
|
List<ChildAssociationRef> |
getChildAssocs(NodeRef nodeRef) |
List<ChildAssociationRef> |
getChildAssocs(NodeRef nodeRef,
QNamePattern typeQNamePattern,
QNamePattern qnamePattern)
Performs conversion from version store properties to real associations
|
List<ChildAssociationRef> |
getChildAssocs(NodeRef nodeRef,
QNamePattern typeQNamePattern,
QNamePattern qnamePattern,
boolean preload) |
List<ChildAssociationRef> |
getChildAssocs(NodeRef nodeRef,
QNamePattern typeQName,
QNamePattern qname,
int maxResults,
boolean preload) |
List<ChildAssociationRef> |
getChildAssocs(NodeRef nodeRef,
Set<QName> childNodeTypes) |
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)
Gets, converts and adds the intrinsic properties to the current node's properties
|
NodeRef |
getNodeRef(Long nodeId)
Delegates to the
NodeService used as the version store implementation |
NodeRef.Status |
getNodeStatus(NodeRef nodeRef)
Delegates to the
NodeService used as the version store implementation |
List<ChildAssociationRef> |
getParentAssocs(NodeRef nodeRef)
The node will appear to be attached to the root of the version store
|
List<ChildAssociationRef> |
getParentAssocs(NodeRef nodeRef,
QNamePattern typeQNamePattern,
QNamePattern qnamePattern)
The node will apprear to be attached to the root of the version store
|
Path |
getPath(NodeRef nodeRef) |
List<Path> |
getPaths(NodeRef nodeRef,
boolean primaryOnly) |
ChildAssociationRef |
getPrimaryParent(NodeRef nodeRef)
Simulates the node begin attached ot the root node of the version store.
|
Map<QName,Serializable> |
getProperties(NodeRef nodeRef)
Property translation for version store
|
Serializable |
getProperty(NodeRef nodeRef,
QName qname)
Property translation for version store
|
NodeRef |
getRootNode(StoreRef storeRef)
Delegates to the
NodeService used as the version store implementation |
List<AssociationRef> |
getSourceAssocs(NodeRef sourceRef,
QNamePattern qnamePattern) |
NodeRef |
getStoreArchiveNode(StoreRef storeRef) |
List<StoreRef> |
getStores()
Delegates to the
NodeService used as the version store implementation |
List<AssociationRef> |
getTargetAssocs(NodeRef sourceRef,
QNamePattern qnamePattern) |
List<AssociationRef> |
getTargetAssocsByPropertyValue(NodeRef sourceRef,
QNamePattern qnamePattern,
QName propertyQName,
Serializable propertyValue) |
QName |
getType(NodeRef nodeRef)
Type translation for version store
|
boolean |
hasAspect(NodeRef nodeRef,
QName aspectRef)
Translation for version store
|
ChildAssociationRef |
moveNode(NodeRef nodeToMoveRef,
NodeRef newParentRef,
QName assocTypeQName,
QName assocQName) |
void |
removeAspect(NodeRef nodeRef,
QName aspectRef) |
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 |
removeSeconaryChildAssociation(ChildAssociationRef childAssocRef) |
boolean |
removeSecondaryChildAssociation(ChildAssociationRef childAssocRef) |
NodeRef |
restoreNode(NodeRef archivedNodeRef,
NodeRef targetParentNodeRef,
QName assocTypeQName,
QName assocQName) |
void |
setAssociations(NodeRef sourceRef,
QName assocTypeQName,
List<NodeRef> targetRefs) |
void |
setChildAssociationIndex(ChildAssociationRef childAssocRef,
int index) |
void |
setContentDataDAO(ContentDataDAO contentDataDAO)
Set the DAO to resolved content data reference IDs into ContentData instances
|
void |
setDbNodeService(NodeService nodeService)
Sets the db node service, used as the version store implementation
|
void |
setDictionaryService(DictionaryService dictionaryService)
Sets the dictionary service
|
void |
setProperties(NodeRef nodeRef,
Map<QName,Serializable> properties) |
void |
setProperty(NodeRef nodeRef,
QName qame,
Serializable value) |
void |
setSearcher(SearchService searcher)
Sets the searcher
|
void |
setType(NodeRef nodeRef,
QName typeQName) |
protected static final String MSG_UNSUPPORTED
protected NodeService dbNodeService
protected DictionaryService dicitionaryService
protected ContentDataDAO contentDataDAO
public void setDbNodeService(NodeService nodeService)
nodeService - the node servicepublic void setSearcher(SearchService searcher)
public void setDictionaryService(DictionaryService dictionaryService)
public void setContentDataDAO(ContentDataDAO contentDataDAO)
public List<StoreRef> getStores()
NodeService used as the version store implementationgetStores in interface NodeServicepublic StoreRef createStore(String protocol, String identifier)
NodeService used as the version store implementationcreateStore in interface NodeServicepublic void deleteStore(StoreRef storeRef)
deleteStore in interface NodeServiceUnsupportedOperationException - alwayspublic boolean exists(StoreRef storeRef)
NodeService used as the version store implementationexists in interface NodeServicepublic boolean exists(NodeRef nodeRef)
NodeService used as the version store implementationexists in interface NodeServicepublic NodeRef.Status getNodeStatus(NodeRef nodeRef)
NodeService used as the version store implementationgetNodeStatus in interface NodeServicepublic NodeRef getNodeRef(Long nodeId)
NodeService used as the version store implementationgetNodeRef in interface NodeServicepublic NodeRef getRootNode(StoreRef storeRef)
NodeService used as the version store implementationgetRootNode in interface NodeServicepublic Set<NodeRef> getAllRootNodes(StoreRef storeRef)
NodeService used as the version store implementationgetAllRootNodes in interface NodeServicepublic ChildAssociationRef createNode(NodeRef parentRef, QName assocTypeQName, QName assocQName, QName nodeTypeQName) throws InvalidNodeRefException
createNode in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionpublic ChildAssociationRef createNode(NodeRef parentRef, QName assocTypeQName, QName assocQName, QName nodeTypeQName, Map<QName,Serializable> properties) throws InvalidNodeRefException
createNode in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionpublic void deleteNode(NodeRef nodeRef) throws InvalidNodeRefException
deleteNode in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionpublic ChildAssociationRef addChild(NodeRef parentRef, NodeRef childRef, QName assocTypeQName, QName qname) throws InvalidNodeRefException
addChild in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionpublic List<ChildAssociationRef> addChild(Collection<NodeRef> parentRefs, NodeRef childRef, QName assocTypeQName, QName qname) throws InvalidNodeRefException
addChild in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionpublic void removeChild(NodeRef parentRef, NodeRef childRef) throws InvalidNodeRefException
removeChild in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionpublic boolean removeChildAssociation(ChildAssociationRef childAssocRef)
removeChildAssociation in interface NodeServiceUnsupportedOperationException - alwayspublic boolean removeSeconaryChildAssociation(ChildAssociationRef childAssocRef)
removeSeconaryChildAssociation in interface NodeServiceUnsupportedOperationException - alwayspublic boolean removeSecondaryChildAssociation(ChildAssociationRef childAssocRef)
removeSecondaryChildAssociation in interface NodeServiceUnsupportedOperationException - alwayspublic ChildAssociationRef moveNode(NodeRef nodeToMoveRef, NodeRef newParentRef, QName assocTypeQName, QName assocQName) throws InvalidNodeRefException
moveNode in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionpublic void setChildAssociationIndex(ChildAssociationRef childAssocRef, int index) throws InvalidChildAssociationRefException
setChildAssociationIndex in interface NodeServiceUnsupportedOperationException - alwaysInvalidChildAssociationRefExceptionpublic 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 aspectRef, Map<QName,Serializable> aspectProperties) throws InvalidNodeRefException, InvalidAspectException
addAspect in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionInvalidAspectExceptionpublic boolean hasAspect(NodeRef nodeRef, QName aspectRef) throws InvalidNodeRefException, InvalidAspectException
hasAspect in interface NodeServiceInvalidNodeRefExceptionInvalidAspectExceptionpublic void removeAspect(NodeRef nodeRef, QName aspectRef) throws InvalidNodeRefException, InvalidAspectException
removeAspect in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionInvalidAspectExceptionpublic Set<QName> getAspects(NodeRef nodeRef) throws InvalidNodeRefException
getAspects in interface NodeServiceInvalidNodeRefExceptionpublic Map<QName,Serializable> getProperties(NodeRef nodeRef) throws InvalidNodeRefException
getProperties in interface NodeServiceInvalidNodeRefExceptionpublic Serializable getProperty(NodeRef nodeRef, QName qname) throws InvalidNodeRefException
getProperty in interface NodeServiceInvalidNodeRefExceptionpublic void setProperties(NodeRef nodeRef, Map<QName,Serializable> properties) throws InvalidNodeRefException
setProperties in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionpublic void addProperties(NodeRef nodeRef, Map<QName,Serializable> properties) throws InvalidNodeRefException
addProperties in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionpublic void setProperty(NodeRef nodeRef, QName qame, Serializable value) throws InvalidNodeRefException
setProperty in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionpublic void removeProperty(NodeRef nodeRef, QName qname) throws InvalidNodeRefException
removeProperty in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionpublic List<ChildAssociationRef> getParentAssocs(NodeRef nodeRef)
getParentAssocs in interface NodeServiceNodeService.getParentAssocs(NodeRef)public List<ChildAssociationRef> getParentAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern)
getParentAssocs in interface NodeServiceNodeService.getParentAssocs(NodeRef, QNamePattern, QNamePattern)public List<ChildAssociationRef> getChildAssocs(NodeRef nodeRef) throws InvalidNodeRefException
getChildAssocs in interface NodeServiceInvalidNodeRefExceptionRegexQNamePattern.MATCH_ALL,
getChildAssocs(NodeRef, QNamePattern, QNamePattern)public List<ChildAssociationRef> getChildAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern, boolean preload) throws InvalidNodeRefException
getChildAssocs in interface NodeServiceInvalidNodeRefExceptionpublic List<ChildAssociationRef> getChildAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern) throws InvalidNodeRefException
getChildAssocs in interface NodeServiceInvalidNodeRefExceptionpublic List<ChildAssociationRef> getChildAssocs(NodeRef nodeRef, QNamePattern typeQName, QNamePattern qname, int maxResults, boolean preload) throws InvalidNodeRefException
getChildAssocs in interface NodeServiceInvalidNodeRefExceptionpublic List<ChildAssociationRef> getChildAssocs(NodeRef nodeRef, Set<QName> childNodeTypes)
getChildAssocs in interface NodeServiceUnsupportedOperationException - alwayspublic List<ChildAssociationRef> getChildrenByName(NodeRef nodeRef, QName assocTypeQName, Collection<String> childNames)
getChildrenByName in interface NodeServiceUnsupportedOperationException - alwayspublic NodeRef getChildByName(NodeRef nodeRef, QName assocTypeQName, String childName)
getChildByName in interface NodeServiceUnsupportedOperationException - alwayspublic ChildAssociationRef getPrimaryParent(NodeRef nodeRef) throws InvalidNodeRefException
getPrimaryParent in interface NodeServiceInvalidNodeRefExceptionpublic AssociationRef createAssociation(NodeRef sourceRef, NodeRef targetRef, QName assocTypeQName) throws InvalidNodeRefException, AssociationExistsException
createAssociation in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionAssociationExistsExceptionpublic void setAssociations(NodeRef sourceRef, QName assocTypeQName, List<NodeRef> targetRefs)
setAssociations in interface NodeServiceUnsupportedOperationException - alwayspublic void removeAssociation(NodeRef sourceRef, NodeRef targetRef, QName assocTypeQName)
removeAssociation in interface NodeServiceUnsupportedOperationException - alwayspublic AssociationRef getAssoc(Long id)
getAssoc in interface NodeServiceid - the association idnull if it does not existpublic List<AssociationRef> getTargetAssocs(NodeRef sourceRef, QNamePattern qnamePattern)
getTargetAssocs in interface NodeServiceUnsupportedOperationException - alwayspublic List<AssociationRef> getTargetAssocsByPropertyValue(NodeRef sourceRef, QNamePattern qnamePattern, QName propertyQName, Serializable propertyValue)
getTargetAssocsByPropertyValue in interface NodeServiceUnsupportedOperationException - alwayspublic List<AssociationRef> getSourceAssocs(NodeRef sourceRef, QNamePattern qnamePattern)
getSourceAssocs in interface NodeServiceUnsupportedOperationException - alwayspublic Path getPath(NodeRef nodeRef) throws InvalidNodeRefException
getPath in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionpublic List<Path> getPaths(NodeRef nodeRef, boolean primaryOnly) throws InvalidNodeRefException
getPaths in interface NodeServiceUnsupportedOperationException - alwaysInvalidNodeRefExceptionpublic NodeRef getStoreArchiveNode(StoreRef storeRef)
getStoreArchiveNode in interface NodeServiceUnsupportedOperationException - alwayspublic NodeRef restoreNode(NodeRef archivedNodeRef, NodeRef targetParentNodeRef, QName assocTypeQName, QName assocQName)
restoreNode in interface NodeServiceUnsupportedOperationException - alwayspublic Collection<ChildAssociationRef> getChildAssocsWithoutParentAssocsOfType(NodeRef parent, QName assocTypeQName)
getChildAssocsWithoutParentAssocsOfType in interface NodeServiceUnsupportedOperationException - alwayspublic Long getNodeAclId(NodeRef nodeRef) throws InvalidNodeRefException
getNodeAclId in interface NodeServiceInvalidNodeRefExceptionpublic List<ChildAssociationRef> getChildAssocsByPropertyValue(NodeRef nodeRef, QName propertyQName, Serializable value)
getChildAssocsByPropertyValue in interface NodeServicepublic List<NodeRef> findNodes(NodeService.FindNodeParameters params)
findNodes in interface NodeServicepublic int countChildAssocs(NodeRef nodeRef, boolean isPrimary) throws InvalidNodeRefException
countChildAssocs in interface NodeServiceInvalidNodeRefExceptionCopyright © 2005–2020 Alfresco Software. All rights reserved.