Class AbstractEventsService

    • Constructor Detail

      • AbstractEventsService

        public AbstractEventsService()
    • Method Detail

      • setHiddenAspect

        public void setHiddenAspect​(HiddenAspect hiddenAspect)
      • setSendEventsBeforeCommit

        public void setSendEventsBeforeCommit​(boolean sendEventsBeforeCommit)
      • setTransactionService

        public void setTransactionService​(TransactionService transactionService)
      • setIncludeEventTypes

        public void setIncludeEventTypes​(String includeEventTypesStr)
      • setFileFolderService

        public void setFileFolderService​(FileFolderService fileFolderService)
      • setEventRegistry

        public void setEventRegistry​(org.alfresco.sync.events.EventRegistry eventRegistry)
      • setNamespaceService

        public void setNamespaceService​(NamespaceService namespaceService)
      • setPermissionService

        public void setPermissionService​(PermissionService permissionService)
      • setMessageProducer

        public void setMessageProducer​(org.gytheio.messaging.MessageProducer messageProducer)
      • setDictionaryService

        public void setDictionaryService​(DictionaryService dictionaryService)
      • setNodeService

        public void setNodeService​(NodeService nodeService)
      • setSiteService

        public void setSiteService​(SiteService siteService)
      • init

        public void init()
      • nextSequenceNumber

        protected long nextSequenceNumber()
      • getAlfrescoClient

        protected org.alfresco.sync.repo.Client getAlfrescoClient​(org.alfresco.sync.repo.Client knownClientType)
      • shouldSendCommitEvent

        protected boolean shouldSendCommitEvent()
        Determines whether it still makes sense to create and send a TransactionCommittedEvent after the transaction is committed. (e.g. if there are no events for the specific transaction makes no sense to signal the end of transaction with TransactionCommittedEvent)
        Returns:
        whether the TransactionCommitted event should be sent
      • filterEventsBeforeSend

        protected List<org.alfresco.sync.events.types.Event> filterEventsBeforeSend​(List<org.alfresco.sync.events.types.Event> events)
        Filter out event before sending them to MessageProducer
        Parameters:
        events - the events to be filtered
        Returns:
        a filtered list of events
      • includeEventType

        protected boolean includeEventType​(String eventType)
      • retrieveAdditionalProps

        protected void retrieveAdditionalProps​(Map<String,​Serializable> properties,
                                               NodeRef nodeRef)
        Extract additional information for the provided node
        Parameters:
        properties - the properties map to add the new info to
        nodeRef - the node to extract the property from
      • getNodeIdsFromParent

        protected List<List<String>> getNodeIdsFromParent​(List<Path> nodePaths)
        For each path, construct a list of ancestor node ids starting with the parent node id first.
        Parameters:
        nodePaths -
        Returns:
      • getNodeIds

        protected List<List<String>> getNodeIds​(List<Path> nodePaths)
        For each path, construct a list of ancestor node ids starting with the leaf path element node id first.
        Parameters:
        nodePaths -
        Returns:
      • getTxnEvents

        protected org.alfresco.repo.events.AbstractEventsService.TxnEvents getTxnEvents()
      • sendEvent

        public void sendEvent​(org.alfresco.sync.events.types.Event event)
        Register the event to be sent to a message producer once the transaction is over
        Parameters:
        event - event to be sent