Package org.alfresco.repo.transfer
Class AbstractTransferProgressMonitor
java.lang.Object
org.alfresco.repo.transfer.AbstractTransferProgressMonitor
- All Implemented Interfaces:
TransferProgressMonitor
- Direct Known Subclasses:
RepoTransferProgressMonitorImpl
public abstract class AbstractTransferProgressMonitor
extends Object
implements TransferProgressMonitor
- Author:
- brian
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract WritercreateUnderlyingLogWriter(String transferId) getProgress(String transferId) Read the progress of theprotected abstract TransferProgressgetProgressInternal(String transferId) voidlogComment(String transferId, Object obj) log an ad-hoc messagevoidlogCreated(String transferId, NodeRef sourceNode, NodeRef destNode, NodeRef parentNodeRef, String parentPath, boolean orphan) Log the creation of a new nodevoidlogDeleted(String transferId, NodeRef sourceNodeRef, NodeRef destNodeRef, String oldPath) Log the deletion of a nodevoidlogException(String transferId, Object obj, Throwable ex) log an ad-hoc message and an exceptionvoidlogMoved(String transferId, NodeRef sourceNodeRef, NodeRef destNodeRef, String oldPath, NodeRef newParentNodeRef, String newPath) After the transfer has completed this method reads the log.voidlogUpdated(String transferId, NodeRef sourceNodeRef, NodeRef destNodeRef, String path) Log the creation of a new nodevoidsetTransactionService(TransactionService transactionService) protected abstract voidstoreError(String transferId, Throwable error) voidupdateProgress(String transferId, int currPos) update the progress of the specified transfervoidupdateProgress(String transferId, int currPos, int endPos) update the progress of the specified transfer and possibly change the end position.protected abstract voidupdateProgressInternal(String transferId, int currPos) protected abstract voidupdateProgressInternal(String transferId, int currPos, int endPos) final voidupdateStatus(String transferId, TransferProgress.Status status) update the startus of the transferprotected abstract voidupdateStatusInternal(String transferId, TransferProgress.Status status) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.repo.transfer.TransferProgressMonitor
getLogInputStream
-
Field Details
-
MSG_TRANSFER_NOT_FOUND
- See Also:
-
MSG_TRANSFER_CANCELLED
- See Also:
-
-
Constructor Details
-
AbstractTransferProgressMonitor
public AbstractTransferProgressMonitor()
-
-
Method Details
-
setTransactionService
-
getProgress
Description copied from interface:TransferProgressMonitorRead the progress of the- Specified by:
getProgressin interfaceTransferProgressMonitor- Parameters:
transferId- String- Returns:
- the progress of the transfer
- Throws:
TransferException
-
getProgressInternal
-
updateProgress
Description copied from interface:TransferProgressMonitorupdate the progress of the specified transfer and possibly change the end position.- Specified by:
updateProgressin interfaceTransferProgressMonitor- Parameters:
transferId- StringcurrPos- intendPos- int- Throws:
TransferException
-
updateProgressInternal
-
updateProgress
Description copied from interface:TransferProgressMonitorupdate the progress of the specified transfer- Specified by:
updateProgressin interfaceTransferProgressMonitor- Parameters:
transferId- StringcurrPos- int- Throws:
TransferException
-
updateProgressInternal
-
updateStatus
public final void updateStatus(String transferId, TransferProgress.Status status) throws TransferException Description copied from interface:TransferProgressMonitorupdate the startus of the transfer- Specified by:
updateStatusin interfaceTransferProgressMonitor- Parameters:
transferId- Stringstatus- TransferProgress.Status- Throws:
TransferException
-
updateStatusInternal
-
logComment
Description copied from interface:TransferProgressMonitorlog an ad-hoc message- Specified by:
logCommentin interfaceTransferProgressMonitor- Parameters:
transferId- Stringobj- Object
-
logException
Description copied from interface:TransferProgressMonitorlog an ad-hoc message and an exception- Specified by:
logExceptionin interfaceTransferProgressMonitor- Parameters:
transferId- Stringobj- Objectex- Throwable
-
storeError
-
logCreated
public void logCreated(String transferId, NodeRef sourceNode, NodeRef destNode, NodeRef parentNodeRef, String parentPath, boolean orphan) Description copied from interface:TransferProgressMonitorLog the creation of a new node- Specified by:
logCreatedin interfaceTransferProgressMonitor- Parameters:
transferId- StringsourceNode- NodeRefdestNode- NodeRefparentPath- Stringorphan- boolean
-
logUpdated
Description copied from interface:TransferProgressMonitorLog the creation of a new node- Specified by:
logUpdatedin interfaceTransferProgressMonitor- Parameters:
transferId- StringsourceNodeRef- NodeRefdestNodeRef- NodeRefpath- The path of the updated node
-
logMoved
public void logMoved(String transferId, NodeRef sourceNodeRef, NodeRef destNodeRef, String oldPath, NodeRef newParentNodeRef, String newPath) Description copied from interface:TransferProgressMonitorAfter the transfer has completed this method reads the log.- Specified by:
logMovedin interfaceTransferProgressMonitor- Parameters:
transferId- StringsourceNodeRef- NodeRefdestNodeRef- NodeRefoldPath- StringnewParentNodeRef- NodeRefnewPath- String
-
logDeleted
public void logDeleted(String transferId, NodeRef sourceNodeRef, NodeRef destNodeRef, String oldPath) Description copied from interface:TransferProgressMonitorLog the deletion of a node- Specified by:
logDeletedin interfaceTransferProgressMonitor- Parameters:
transferId- StringsourceNodeRef- NodeRefdestNodeRef- NodeRefoldPath- The path of the deleted node
-
createUnderlyingLogWriter
-