Package org.alfresco.repo.transfer
Interface TransferProgressMonitor
- All Known Implementing Classes:
AbstractTransferProgressMonitor,LoggingTransferProgressMonitorImpl,RepoTransferProgressMonitorImpl
public interface TransferProgressMonitor
- Author:
- brian
The transfer progress monitor monitors each transfer
It contains a status, current position, end position, and a log. It can also store an exception.
-
Method Summary
Modifier and TypeMethodDescriptiongetLogInputStream(String transferId) getProgress(String transferId) Read the progress of thevoidlogComment(String transferId, Object obj) log an ad-hoc messagevoidlogCreated(String transferId, NodeRef sourceNode, NodeRef destNode, NodeRef newParent, String newPath, boolean orphan) Log the creation of a new nodevoidlogDeleted(String transferId, NodeRef sourceNode, NodeRef destNode, String path) 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 newParent, String newPath) After the transfer has completed this method reads the log.voidlogUpdated(String transferId, NodeRef sourceNode, NodeRef destNode, String path) Log the creation of a new nodevoidupdateProgress(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.voidupdateStatus(String transferId, TransferProgress.Status status) update the startus of the transfer
-
Method Details
-
logComment
log an ad-hoc message- Parameters:
transferId- Stringobj- Object- Throws:
TransferException
-
logException
log an ad-hoc message and an exception- Parameters:
transferId- Stringobj- Objectex- Throwable- Throws:
TransferException
-
logCreated
void logCreated(String transferId, NodeRef sourceNode, NodeRef destNode, NodeRef newParent, String newPath, boolean orphan) Log the creation of a new node- Parameters:
transferId- StringsourceNode- NodeRefdestNode- NodeRefnewPath- Stringorphan- boolean
-
logUpdated
Log the creation of a new node- Parameters:
transferId- StringsourceNode- NodeRefdestNode- NodeRefpath- The path of the updated node
-
logDeleted
Log the deletion of a node- Parameters:
transferId- StringsourceNode- NodeRefdestNode- NodeRefpath- The path of the deleted node
-
logMoved
void logMoved(String transferId, NodeRef sourceNodeRef, NodeRef destNodeRef, String oldPath, NodeRef newParent, String newPath) After the transfer has completed this method reads the log.- Parameters:
transferId- StringsourceNodeRef- NodeRefdestNodeRef- NodeRefoldPath- StringnewParent- NodeRefnewPath- String
-
updateProgress
update the progress of the specified transfer- Parameters:
transferId- StringcurrPos- int- Throws:
TransferException
-
updateProgress
update the progress of the specified transfer and possibly change the end position.- Parameters:
transferId- StringcurrPos- intendPos- int- Throws:
TransferException
-
updateStatus
update the startus of the transfer- Parameters:
transferId- Stringstatus- TransferProgress.Status- Throws:
TransferException
-
getProgress
Read the progress of the- Parameters:
transferId- String- Returns:
- the progress of the transfer
- Throws:
TransferException
-
getLogInputStream
- Throws:
TransferException
-