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 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
FieldsFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy
QNAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeDeleteLinkNode(NodeRef linkNodeRef) voidbeforeDeleteNode(NodeRef nodeRef) Called before a node is deleted.createDocumentLink(NodeRef source, NodeRef destination) Creates a link node as child of the destination nodedeleteLinksToDocument(NodeRef document) Deletes all links having the provided node as destination.getLinkDestination(NodeRef linkNodeRef) Returns the destination node of the provided linkgetNodeLinksIds(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(DictionaryService dictionaryService) voidsetNamespaceService(NamespaceService namespaceService) voidsetNodeService(NodeService nodeService) voidsetPermissionService(PermissionService permissionService) voidsetPolicyComponent(PolicyComponent policyComponent) voidsetQnameDAO(QNameDAO qnameDAO) voidsetSearchService(SearchService searchService)
-
Field Details
-
CANNED_QUERY_GET_DOC_LINKS
- See Also:
-
-
Constructor Details
-
DocumentLinkServiceImpl
public DocumentLinkServiceImpl()
-
-
Method Details
-
init
public void init()The initialise method. Register our policies. -
createDocumentLink
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
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
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
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
Description copied from interface:NodeServicePolicies.BeforeDeleteNodePolicyCalled before a node is deleted.- Specified by:
beforeDeleteNodein interfaceNodeServicePolicies.BeforeDeleteNodePolicy- Parameters:
nodeRef- the node reference
-
beforeDeleteLinkNode
-
setNodeService
-
setDictionaryService
-
setSearchService
-
setNamespaceService
-
setCheckOutCheckInService
-
setPolicyComponent
-
setBehaviourFilter
-
setPermissionService
-
setCannedQueryDAO
-
setQnameDAO
-