Package org.alfresco.repo.transfer
Class LoggingTransferProgressMonitorImpl
java.lang.Object
org.alfresco.repo.transfer.LoggingTransferProgressMonitorImpl
- All Implemented Interfaces:
TransferProgressMonitor
- Author:
- brian
-
Constructor Summary
Constructors -
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 parentNode, String parentPath, boolean orphan) Log the creation of a new nodevoidlogDeleted(String transferId, NodeRef sourceNode, NodeRef destNode, String parentPath) Log the deletion of a nodevoidlogException(String transferId, Object obj, Throwable ex) log an ad-hoc message and an exceptionvoidlogMoved(String transferId, NodeRef sourceNode, NodeRef destNode, String oldPath, NodeRef parentNodeRef, String parentPath) After the transfer has completed this method reads the log.voidlogUpdated(String transferId, NodeRef sourceNode, NodeRef destNode, String parentPath) Log the creation of a new nodevoidsetDelegate(TransferProgressMonitor delegate) 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.voidupdateStatus(String transferId, TransferProgress.Status status) update the startus of the transfer
-
Constructor Details
-
LoggingTransferProgressMonitorImpl
public LoggingTransferProgressMonitorImpl()
-
-
Method Details
-
setDelegate
- Parameters:
delegate- the delegate to set
-
getProgress
Description copied from interface:TransferProgressMonitorRead the progress of the- Specified by:
getProgressin interfaceTransferProgressMonitor- Parameters:
transferId- String- Returns:
- TransferProgress
- Throws:
TransferException- See Also:
-
logException
Description copied from interface:TransferProgressMonitorlog an ad-hoc message and an exception- Specified by:
logExceptionin interfaceTransferProgressMonitor- Parameters:
transferId- Stringobj- Objectex- Throwable- Throws:
TransferException- See Also:
-
logComment
Description copied from interface:TransferProgressMonitorlog an ad-hoc message- Specified by:
logCommentin interfaceTransferProgressMonitor- Parameters:
transferId- Stringobj- Object- Throws:
TransferException- See Also:
-
logCreated
public void logCreated(String transferId, NodeRef sourceNode, NodeRef destNode, NodeRef parentNode, 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- StringsourceNode- NodeRefdestNode- NodeRefparentPath- The path of the updated node
-
logMoved
public void logMoved(String transferId, NodeRef sourceNode, NodeRef destNode, String oldPath, NodeRef parentNodeRef, String parentPath) Description copied from interface:TransferProgressMonitorAfter the transfer has completed this method reads the log.- Specified by:
logMovedin interfaceTransferProgressMonitor- Parameters:
transferId- StringsourceNode- NodeRefdestNode- NodeRefoldPath- StringparentNodeRef- NodeRefparentPath- String
-
logDeleted
Description copied from interface:TransferProgressMonitorLog the deletion of a node- Specified by:
logDeletedin interfaceTransferProgressMonitor- Parameters:
transferId- StringsourceNode- NodeRefdestNode- NodeRefparentPath- The path of the deleted node
-
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- See Also:
-
updateProgress
Description copied from interface:TransferProgressMonitorupdate the progress of the specified transfer- Specified by:
updateProgressin interfaceTransferProgressMonitor- Parameters:
transferId- StringcurrPos- int- Throws:
TransferException- See Also:
-
updateStatus
public 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- Status- Throws:
TransferException- See Also:
-
getLogInputStream
- Specified by:
getLogInputStreamin interfaceTransferProgressMonitor- Throws:
TransferException
-