public class HookableTransferMonitorImpl extends Object implements TransferProgressMonitor
Constructor and Description |
---|
HookableTransferMonitorImpl() |
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 newParent,
String newPath,
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 path)
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 sourceNodeRef,
org.alfresco.service.cmr.repository.NodeRef destNodeRef,
String oldPath,
org.alfresco.service.cmr.repository.NodeRef newParent,
String newPath)
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 path)
Log the creation of a new node
|
void |
setListeners(List<TransferListener> listeners) |
void |
setSystemMonitor(TransferProgressMonitor systemMonitor) |
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 setListeners(List<TransferListener> listeners)
public void setSystemMonitor(TransferProgressMonitor systemMonitor)
public InputStream getLogInputStream(String transferId) throws TransferException
getLogInputStream
in interface TransferProgressMonitor
TransferException
public TransferProgress getProgress(String transferId) throws TransferException
TransferProgressMonitor
getProgress
in interface TransferProgressMonitor
transferId
- StringTransferException
public void logComment(String transferId, Object obj) throws TransferException
TransferProgressMonitor
logComment
in interface TransferProgressMonitor
transferId
- Stringobj
- ObjectTransferException
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 newParent, String newPath, boolean orphan)
TransferProgressMonitor
logCreated
in interface TransferProgressMonitor
transferId
- StringsourceNode
- NodeRefdestNode
- NodeRefnewPath
- Stringorphan
- booleanpublic void logDeleted(String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, String path)
TransferProgressMonitor
logDeleted
in interface TransferProgressMonitor
transferId
- StringsourceNode
- NodeRefdestNode
- NodeRefpath
- The path of the deleted nodepublic void logException(String transferId, Object obj, Throwable ex) throws TransferException
TransferProgressMonitor
logException
in interface TransferProgressMonitor
transferId
- Stringobj
- Objectex
- ThrowableTransferException
public void logMoved(String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, org.alfresco.service.cmr.repository.NodeRef destNodeRef, String oldPath, org.alfresco.service.cmr.repository.NodeRef newParent, String newPath)
TransferProgressMonitor
logMoved
in interface TransferProgressMonitor
transferId
- StringsourceNodeRef
- NodeRefdestNodeRef
- NodeRefoldPath
- StringnewParent
- NodeRefnewPath
- Stringpublic void logUpdated(String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, String path)
TransferProgressMonitor
logUpdated
in interface TransferProgressMonitor
transferId
- StringsourceNode
- NodeRefdestNode
- NodeRefpath
- The path of the updated nodepublic void updateProgress(String transferId, int currPos) throws TransferException
TransferProgressMonitor
updateProgress
in interface TransferProgressMonitor
transferId
- StringcurrPos
- intTransferException
public void updateProgress(String transferId, int currPos, int endPos) throws TransferException
TransferProgressMonitor
updateProgress
in interface TransferProgressMonitor
transferId
- StringcurrPos
- intendPos
- intTransferException
public void updateStatus(String transferId, TransferProgress.Status status) throws TransferException
TransferProgressMonitor
updateStatus
in interface TransferProgressMonitor
transferId
- Stringstatus
- TransferProgress.StatusTransferException
Copyright © 2005–2017 Alfresco Software. All rights reserved.