Package org.alfresco.repo.doclink
Class DocumentLinkServiceImpl
- java.lang.Object
-
- org.alfresco.repo.doclink.DocumentLinkServiceImpl
-
- All Implemented Interfaces:
NodeServicePolicies.BeforeDeleteNodePolicy,ClassPolicy,Policy,DocumentLinkService
public class DocumentLinkServiceImpl extends java.lang.Object implements DocumentLinkService, NodeServicePolicies.BeforeDeleteNodePolicy
Implementation of the document link service In addition to the document link service, this class also provides a BeforeDeleteNodePolicy- Since:
- 5.1
- Author:
- Ana Bozianu
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
Policy.Arg
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringCANNED_QUERY_GET_DOC_LINKS-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy
QNAME
-
-
Constructor Summary
Constructors Constructor Description DocumentLinkServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeforeDeleteLinkNode(org.alfresco.service.cmr.repository.NodeRef linkNodeRef)voidbeforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)Called before a node is deleted.org.alfresco.service.cmr.repository.NodeRefcreateDocumentLink(org.alfresco.service.cmr.repository.NodeRef source, org.alfresco.service.cmr.repository.NodeRef destination)Creates a link node as child of the destination nodeDeleteLinksStatusReportdeleteLinksToDocument(org.alfresco.service.cmr.repository.NodeRef document)Deletes all links having the provided node as destination.org.alfresco.service.cmr.repository.NodeRefgetLinkDestination(org.alfresco.service.cmr.repository.NodeRef linkNodeRef)Returns the destination node of the provided linkjava.util.List<java.lang.Long>getNodeLinksIds(org.alfresco.service.cmr.repository.NodeRef nodeRef)Returns the associated link ids for a node, from all storesvoidinit()The initialise method.voidsetBehaviourFilter(BehaviourFilter behaviourFilter)voidsetCannedQueryDAO(CannedQueryDAO cannedQueryDAO)voidsetCheckOutCheckInService(CheckOutCheckInService checkOutCheckInService)voidsetDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)voidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)voidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)voidsetPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)voidsetPolicyComponent(PolicyComponent policyComponent)voidsetQnameDAO(QNameDAO qnameDAO)voidsetSearchService(org.alfresco.service.cmr.search.SearchService searchService)
-
-
-
Field Detail
-
CANNED_QUERY_GET_DOC_LINKS
protected static final java.lang.String CANNED_QUERY_GET_DOC_LINKS
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init()
The initialise method. Register our policies.
-
createDocumentLink
public org.alfresco.service.cmr.repository.NodeRef createDocumentLink(org.alfresco.service.cmr.repository.NodeRef source, org.alfresco.service.cmr.repository.NodeRef destination)Description copied from interface:DocumentLinkServiceCreates a link node as child of the destination node- Specified by:
createDocumentLinkin interfaceDocumentLinkService- Parameters:
source- Node to create a link for. Can be a file or a folder.destination- Destination to create the link in. Must be a folder.- Returns:
- A reference to the created link node
-
getLinkDestination
public org.alfresco.service.cmr.repository.NodeRef getLinkDestination(org.alfresco.service.cmr.repository.NodeRef linkNodeRef)
Description copied from interface:DocumentLinkServiceReturns the destination node of the provided link- Specified by:
getLinkDestinationin interfaceDocumentLinkService- Parameters:
linkNodeRef- The link node.- Returns:
- A reference to the destination of the provided link node
-
getNodeLinksIds
public java.util.List<java.lang.Long> getNodeLinksIds(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface:DocumentLinkServiceReturns the associated link ids for a node, from all stores- Specified by:
getNodeLinksIdsin interfaceDocumentLinkService- Returns:
- A list of link nodeIds for given node
-
deleteLinksToDocument
public DeleteLinksStatusReport deleteLinksToDocument(org.alfresco.service.cmr.repository.NodeRef document)
Description copied from interface:DocumentLinkServiceDeletes all links having the provided node as destination.- Specified by:
deleteLinksToDocumentin interfaceDocumentLinkService- Parameters:
document- The destination of the links to be deleted.
-
beforeDeleteNode
public void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface:NodeServicePolicies.BeforeDeleteNodePolicyCalled before a node is deleted.- Specified by:
beforeDeleteNodein interfaceNodeServicePolicies.BeforeDeleteNodePolicy- Parameters:
nodeRef- the node reference
-
beforeDeleteLinkNode
public void beforeDeleteLinkNode(org.alfresco.service.cmr.repository.NodeRef linkNodeRef)
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
-
setDictionaryService
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
-
setSearchService
public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
-
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
-
setCheckOutCheckInService
public void setCheckOutCheckInService(CheckOutCheckInService checkOutCheckInService)
-
setPolicyComponent
public void setPolicyComponent(PolicyComponent policyComponent)
-
setBehaviourFilter
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
-
setPermissionService
public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
-
setCannedQueryDAO
public void setCannedQueryDAO(CannedQueryDAO cannedQueryDAO)
-
setQnameDAO
public void setQnameDAO(QNameDAO qnameDAO)
-
-