Class AbstractTransferProgressMonitor

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract java.io.Writer createUnderlyingLogWriter​(java.lang.String transferId)  
      TransferProgress getProgress​(java.lang.String transferId)
      Read the progress of the
      protected abstract TransferProgress getProgressInternal​(java.lang.String transferId)  
      void logComment​(java.lang.String transferId, java.lang.Object obj)
      log an ad-hoc message
      void logCreated​(java.lang.String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, org.alfresco.service.cmr.repository.NodeRef parentNodeRef, java.lang.String parentPath, boolean orphan)
      Log the creation of a new node
      void logDeleted​(java.lang.String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, org.alfresco.service.cmr.repository.NodeRef destNodeRef, java.lang.String oldPath)
      Log the deletion of a node
      void logException​(java.lang.String transferId, java.lang.Object obj, java.lang.Throwable ex)
      log an ad-hoc message and an exception
      void logMoved​(java.lang.String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, org.alfresco.service.cmr.repository.NodeRef destNodeRef, java.lang.String oldPath, org.alfresco.service.cmr.repository.NodeRef newParentNodeRef, java.lang.String newPath)
      After the transfer has completed this method reads the log.
      void logUpdated​(java.lang.String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, org.alfresco.service.cmr.repository.NodeRef destNodeRef, java.lang.String path)
      Log the creation of a new node
      void setTransactionService​(TransactionService transactionService)  
      protected abstract void storeError​(java.lang.String transferId, java.lang.Throwable error)  
      void updateProgress​(java.lang.String transferId, int currPos)
      update the progress of the specified transfer
      void updateProgress​(java.lang.String transferId, int currPos, int endPos)
      update the progress of the specified transfer and possibly change the end position.
      protected abstract void updateProgressInternal​(java.lang.String transferId, int currPos)  
      protected abstract void updateProgressInternal​(java.lang.String transferId, int currPos, int endPos)  
      void updateStatus​(java.lang.String transferId, TransferProgress.Status status)
      update the startus of the transfer
      protected abstract void updateStatusInternal​(java.lang.String transferId, TransferProgress.Status status)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MSG_TRANSFER_NOT_FOUND

        protected static final java.lang.String MSG_TRANSFER_NOT_FOUND
        See Also:
        Constant Field Values
      • MSG_TRANSFER_CANCELLED

        protected static final java.lang.String MSG_TRANSFER_CANCELLED
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractTransferProgressMonitor

        public AbstractTransferProgressMonitor()
    • Method Detail

      • setTransactionService

        public void setTransactionService​(TransactionService transactionService)
      • getProgressInternal

        protected abstract TransferProgress getProgressInternal​(java.lang.String transferId)
      • updateProgressInternal

        protected abstract void updateProgressInternal​(java.lang.String transferId,
                                                       int currPos,
                                                       int endPos)
      • updateProgressInternal

        protected abstract void updateProgressInternal​(java.lang.String transferId,
                                                       int currPos)
      • updateStatusInternal

        protected abstract void updateStatusInternal​(java.lang.String transferId,
                                                     TransferProgress.Status status)
      • logComment

        public void logComment​(java.lang.String transferId,
                               java.lang.Object obj)
        Description copied from interface: TransferProgressMonitor
        log an ad-hoc message
        Specified by:
        logComment in interface TransferProgressMonitor
        Parameters:
        transferId - String
        obj - Object
      • logException

        public void logException​(java.lang.String transferId,
                                 java.lang.Object obj,
                                 java.lang.Throwable ex)
        Description copied from interface: TransferProgressMonitor
        log an ad-hoc message and an exception
        Specified by:
        logException in interface TransferProgressMonitor
        Parameters:
        transferId - String
        obj - Object
        ex - Throwable
      • storeError

        protected abstract void storeError​(java.lang.String transferId,
                                           java.lang.Throwable error)
      • logCreated

        public void logCreated​(java.lang.String transferId,
                               org.alfresco.service.cmr.repository.NodeRef sourceNode,
                               org.alfresco.service.cmr.repository.NodeRef destNode,
                               org.alfresco.service.cmr.repository.NodeRef parentNodeRef,
                               java.lang.String parentPath,
                               boolean orphan)
        Description copied from interface: TransferProgressMonitor
        Log the creation of a new node
        Specified by:
        logCreated in interface TransferProgressMonitor
        Parameters:
        transferId - String
        sourceNode - NodeRef
        destNode - NodeRef
        parentPath - String
        orphan - boolean
      • logUpdated

        public void logUpdated​(java.lang.String transferId,
                               org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
                               org.alfresco.service.cmr.repository.NodeRef destNodeRef,
                               java.lang.String path)
        Description copied from interface: TransferProgressMonitor
        Log the creation of a new node
        Specified by:
        logUpdated in interface TransferProgressMonitor
        Parameters:
        transferId - String
        sourceNodeRef - NodeRef
        destNodeRef - NodeRef
        path - The path of the updated node
      • logMoved

        public void logMoved​(java.lang.String transferId,
                             org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
                             org.alfresco.service.cmr.repository.NodeRef destNodeRef,
                             java.lang.String oldPath,
                             org.alfresco.service.cmr.repository.NodeRef newParentNodeRef,
                             java.lang.String newPath)
        Description copied from interface: TransferProgressMonitor
        After the transfer has completed this method reads the log.
        Specified by:
        logMoved in interface TransferProgressMonitor
        Parameters:
        transferId - String
        sourceNodeRef - NodeRef
        destNodeRef - NodeRef
        oldPath - String
        newParentNodeRef - NodeRef
        newPath - String
      • logDeleted

        public void logDeleted​(java.lang.String transferId,
                               org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
                               org.alfresco.service.cmr.repository.NodeRef destNodeRef,
                               java.lang.String oldPath)
        Description copied from interface: TransferProgressMonitor
        Log the deletion of a node
        Specified by:
        logDeleted in interface TransferProgressMonitor
        Parameters:
        transferId - String
        sourceNodeRef - NodeRef
        destNodeRef - NodeRef
        oldPath - The path of the deleted node
      • createUnderlyingLogWriter

        protected abstract java.io.Writer createUnderlyingLogWriter​(java.lang.String transferId)