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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.InputStreamgetLogInputStream(java.lang.String transferId)TransferProgressgetProgress(java.lang.String transferId)Read the progress of thevoidlogComment(java.lang.String transferId, java.lang.Object obj)log an ad-hoc messagevoidlogCreated(java.lang.String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, org.alfresco.service.cmr.repository.NodeRef newParent, java.lang.String newPath, boolean orphan)Log the creation of a new nodevoidlogDeleted(java.lang.String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, java.lang.String path)Log the deletion of a nodevoidlogException(java.lang.String transferId, java.lang.Object obj, java.lang.Throwable ex)log an ad-hoc message and an exceptionvoidlogMoved(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 newParent, java.lang.String newPath)After the transfer has completed this method reads the log.voidlogUpdated(java.lang.String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, java.lang.String path)Log the creation of a new nodevoidupdateProgress(java.lang.String transferId, int currPos)update the progress of the specified transfervoidupdateProgress(java.lang.String transferId, int currPos, int endPos)update the progress of the specified transfer and possibly change the end position.voidupdateStatus(java.lang.String transferId, TransferProgress.Status status)update the startus of the transfer
-
-
-
Method Detail
-
logComment
void logComment(java.lang.String transferId, java.lang.Object obj) throws TransferExceptionlog an ad-hoc message- Parameters:
transferId- Stringobj- Object- Throws:
TransferException
-
logException
void logException(java.lang.String transferId, java.lang.Object obj, java.lang.Throwable ex) throws TransferExceptionlog an ad-hoc message and an exception- Parameters:
transferId- Stringobj- Objectex- Throwable- Throws:
TransferException
-
logCreated
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 newParent, java.lang.String newPath, boolean orphan)Log the creation of a new node- Parameters:
transferId- StringsourceNode- NodeRefdestNode- NodeRefnewPath- Stringorphan- boolean
-
logUpdated
void logUpdated(java.lang.String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, java.lang.String path)Log the creation of a new node- Parameters:
transferId- StringsourceNode- NodeRefdestNode- NodeRefpath- The path of the updated node
-
logDeleted
void logDeleted(java.lang.String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, java.lang.String path)Log the deletion of a node- Parameters:
transferId- StringsourceNode- NodeRefdestNode- NodeRefpath- The path of the deleted node
-
logMoved
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 newParent, java.lang.String newPath)After the transfer has completed this method reads the log.- Parameters:
transferId- StringsourceNodeRef- NodeRefdestNodeRef- NodeRefoldPath- StringnewParent- NodeRefnewPath- String
-
updateProgress
void updateProgress(java.lang.String transferId, int currPos) throws TransferExceptionupdate the progress of the specified transfer- Parameters:
transferId- StringcurrPos- int- Throws:
TransferException
-
updateProgress
void updateProgress(java.lang.String transferId, int currPos, int endPos) throws TransferExceptionupdate the progress of the specified transfer and possibly change the end position.- Parameters:
transferId- StringcurrPos- intendPos- int- Throws:
TransferException
-
updateStatus
void updateStatus(java.lang.String transferId, TransferProgress.Status status) throws TransferExceptionupdate the startus of the transfer- Parameters:
transferId- Stringstatus- TransferProgress.Status- Throws:
TransferException
-
getProgress
TransferProgress getProgress(java.lang.String transferId) throws TransferException
Read the progress of the- Parameters:
transferId- String- Returns:
- the progress of the transfer
- Throws:
TransferException
-
getLogInputStream
java.io.InputStream getLogInputStream(java.lang.String transferId) throws TransferException- Throws:
TransferException
-
-