public class LoggingTransferProgressMonitorImpl extends Object implements TransferProgressMonitor
Constructor and Description |
---|
LoggingTransferProgressMonitorImpl() |
Modifier and Type | Method and Description |
---|---|
InputStream |
getLogInputStream(String transferId) |
TransferProgress |
getProgress(String transferId)
Read the progress of the
|
void |
logComment(String transferId,
Object obj)
log an ad-hoc message
|
void |
logCreated(String transferId,
org.alfresco.service.cmr.repository.NodeRef sourceNode,
org.alfresco.service.cmr.repository.NodeRef destNode,
org.alfresco.service.cmr.repository.NodeRef parentNode,
String parentPath,
boolean orphan)
Log the creation of a new node
|
void |
logDeleted(String transferId,
org.alfresco.service.cmr.repository.NodeRef sourceNode,
org.alfresco.service.cmr.repository.NodeRef destNode,
String parentPath)
Log the deletion of a node
|
void |
logException(String transferId,
Object obj,
Throwable ex)
log an ad-hoc message and an exception
|
void |
logMoved(String transferId,
org.alfresco.service.cmr.repository.NodeRef sourceNode,
org.alfresco.service.cmr.repository.NodeRef destNode,
String oldPath,
org.alfresco.service.cmr.repository.NodeRef parentNodeRef,
String parentPath)
After the transfer has completed this method reads the log.
|
void |
logUpdated(String transferId,
org.alfresco.service.cmr.repository.NodeRef sourceNode,
org.alfresco.service.cmr.repository.NodeRef destNode,
String parentPath)
Log the creation of a new node
|
void |
setDelegate(TransferProgressMonitor delegate) |
void |
updateProgress(String transferId,
int currPos)
update the progress of the specified transfer
|
void |
updateProgress(String transferId,
int currPos,
int endPos)
update the progress of the specified transfer and possibly change the end position.
|
void |
updateStatus(String transferId,
TransferProgress.Status status)
update the startus of the transfer
|
public void setDelegate(TransferProgressMonitor delegate)
delegate
- the delegate to setpublic TransferProgress getProgress(String transferId) throws TransferException
TransferProgressMonitor
getProgress
in interface TransferProgressMonitor
transferId
- StringTransferException
TransferProgressMonitor.getProgress(java.lang.String)
public void logException(String transferId, Object obj, Throwable ex) throws TransferException
TransferProgressMonitor
logException
in interface TransferProgressMonitor
transferId
- Stringobj
- Objectex
- ThrowableTransferException
TransferProgressMonitor.logException(java.lang.String, java.lang.Object, java.lang.Throwable)
public void logComment(String transferId, Object obj) throws TransferException
TransferProgressMonitor
logComment
in interface TransferProgressMonitor
transferId
- Stringobj
- ObjectTransferException
TransferProgressMonitor.logComment(java.lang.String, java.lang.Object)
public void logCreated(String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, org.alfresco.service.cmr.repository.NodeRef parentNode, String parentPath, boolean orphan)
TransferProgressMonitor
logCreated
in interface TransferProgressMonitor
transferId
- StringsourceNode
- NodeRefdestNode
- NodeRefparentPath
- Stringorphan
- booleanpublic void logUpdated(String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, String parentPath)
TransferProgressMonitor
logUpdated
in interface TransferProgressMonitor
transferId
- StringsourceNode
- NodeRefdestNode
- NodeRefparentPath
- The path of the updated nodepublic void logMoved(String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, String oldPath, org.alfresco.service.cmr.repository.NodeRef parentNodeRef, String parentPath)
TransferProgressMonitor
logMoved
in interface TransferProgressMonitor
transferId
- StringsourceNode
- NodeRefdestNode
- NodeRefoldPath
- StringparentNodeRef
- NodeRefparentPath
- Stringpublic void logDeleted(String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, String parentPath)
TransferProgressMonitor
logDeleted
in interface TransferProgressMonitor
transferId
- StringsourceNode
- NodeRefdestNode
- NodeRefparentPath
- The path of the deleted nodepublic void updateProgress(String transferId, int currPos, int endPos) throws TransferException
TransferProgressMonitor
updateProgress
in interface TransferProgressMonitor
transferId
- StringcurrPos
- intendPos
- intTransferException
TransferProgressMonitor.updateProgress(java.lang.String, int, int)
public void updateProgress(String transferId, int currPos) throws TransferException
TransferProgressMonitor
updateProgress
in interface TransferProgressMonitor
transferId
- StringcurrPos
- intTransferException
TransferProgressMonitor.updateProgress(java.lang.String, int)
public void updateStatus(String transferId, TransferProgress.Status status) throws TransferException
TransferProgressMonitor
updateStatus
in interface TransferProgressMonitor
transferId
- Stringstatus
- StatusTransferException
TransferProgressMonitor.updateStatus(java.lang.String, org.alfresco.service.cmr.transfer.TransferProgress.Status)
public InputStream getLogInputStream(String transferId) throws TransferException
getLogInputStream
in interface TransferProgressMonitor
TransferException
Copyright © 2005–2017 Alfresco Software. All rights reserved.