public abstract class AbstractTransferProgressMonitor extends Object implements TransferProgressMonitor
Modifier and Type | Field and Description |
---|---|
protected static String |
MSG_TRANSFER_CANCELLED |
protected static String |
MSG_TRANSFER_NOT_FOUND |
Constructor and Description |
---|
AbstractTransferProgressMonitor() |
Modifier and Type | Method and Description |
---|---|
protected abstract Writer |
createUnderlyingLogWriter(String transferId) |
TransferProgress |
getProgress(String transferId)
Read the progress of the
|
protected abstract TransferProgress |
getProgressInternal(String transferId) |
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 parentNodeRef,
String parentPath,
boolean orphan)
Log the creation of a new node
|
void |
logDeleted(String transferId,
org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
org.alfresco.service.cmr.repository.NodeRef destNodeRef,
String oldPath)
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 newParentNodeRef,
String newPath)
After the transfer has completed this method reads the log.
|
void |
logUpdated(String transferId,
org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
org.alfresco.service.cmr.repository.NodeRef destNodeRef,
String path)
Log the creation of a new node
|
void |
setTransactionService(TransactionService transactionService) |
protected abstract void |
storeError(String transferId,
Throwable error) |
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.
|
protected abstract void |
updateProgressInternal(String transferId,
int currPos) |
protected abstract void |
updateProgressInternal(String transferId,
int currPos,
int endPos) |
void |
updateStatus(String transferId,
TransferProgress.Status status)
update the startus of the transfer
|
protected abstract void |
updateStatusInternal(String transferId,
TransferProgress.Status status) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLogInputStream
protected static final String MSG_TRANSFER_NOT_FOUND
protected static final String MSG_TRANSFER_CANCELLED
public void setTransactionService(TransactionService transactionService)
public TransferProgress getProgress(String transferId) throws TransferException
TransferProgressMonitor
getProgress
in interface TransferProgressMonitor
transferId
- StringTransferException
protected abstract TransferProgress getProgressInternal(String transferId)
public void updateProgress(String transferId, int currPos, int endPos) throws TransferException
TransferProgressMonitor
updateProgress
in interface TransferProgressMonitor
transferId
- StringcurrPos
- intendPos
- intTransferException
protected abstract void updateProgressInternal(String transferId, int currPos, int endPos)
public void updateProgress(String transferId, int currPos) throws TransferException
TransferProgressMonitor
updateProgress
in interface TransferProgressMonitor
transferId
- StringcurrPos
- intTransferException
protected abstract void updateProgressInternal(String transferId, int currPos)
public final void updateStatus(String transferId, TransferProgress.Status status) throws TransferException
TransferProgressMonitor
updateStatus
in interface TransferProgressMonitor
transferId
- Stringstatus
- TransferProgress.StatusTransferException
protected abstract void updateStatusInternal(String transferId, TransferProgress.Status status)
public void logComment(String transferId, Object obj)
TransferProgressMonitor
logComment
in interface TransferProgressMonitor
transferId
- Stringobj
- Objectpublic void logException(String transferId, Object obj, Throwable ex)
TransferProgressMonitor
logException
in interface TransferProgressMonitor
transferId
- Stringobj
- Objectex
- Throwablepublic void logCreated(String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, org.alfresco.service.cmr.repository.NodeRef parentNodeRef, 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 sourceNodeRef, org.alfresco.service.cmr.repository.NodeRef destNodeRef, String path)
TransferProgressMonitor
logUpdated
in interface TransferProgressMonitor
transferId
- StringsourceNodeRef
- NodeRefdestNodeRef
- NodeRefpath
- The path of the updated nodepublic 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 newParentNodeRef, String newPath)
TransferProgressMonitor
logMoved
in interface TransferProgressMonitor
transferId
- StringsourceNodeRef
- NodeRefdestNodeRef
- NodeRefoldPath
- StringnewParentNodeRef
- NodeRefnewPath
- Stringpublic void logDeleted(String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, org.alfresco.service.cmr.repository.NodeRef destNodeRef, String oldPath)
TransferProgressMonitor
logDeleted
in interface TransferProgressMonitor
transferId
- StringsourceNodeRef
- NodeRefdestNodeRef
- NodeRefoldPath
- The path of the deleted nodeCopyright © 2005–2017 Alfresco Software. All rights reserved.