org.alfresco.repo.transfer
Class LoggingTransferProgressMonitorImpl

java.lang.Object
  extended by org.alfresco.repo.transfer.LoggingTransferProgressMonitorImpl
All Implemented Interfaces:
TransferProgressMonitor

public class LoggingTransferProgressMonitorImpl
extends java.lang.Object
implements TransferProgressMonitor


Constructor Summary
LoggingTransferProgressMonitorImpl()
           
 
Method Summary
 java.io.InputStream getLogInputStream(java.lang.String transferId)
           
 TransferProgress getProgress(java.lang.String transferId)
          Read the progress of the
 void logComment(java.lang.String transferId, java.lang.Object obj)
          log an ad-hoc message
 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 parentNode, org.alfresco.service.cmr.repository.Path parentPath, boolean orphan)
          Log the creation of a new node
 void logDeleted(java.lang.String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, org.alfresco.service.cmr.repository.Path parentPath)
          Log the deletion of a node
 void logException(java.lang.String transferId, java.lang.Object obj, java.lang.Throwable ex)
          log an ad-hoc message and an exception
 void logMoved(java.lang.String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, org.alfresco.service.cmr.repository.Path oldPath, org.alfresco.service.cmr.repository.NodeRef parentNodeRef, org.alfresco.service.cmr.repository.Path parentPath)
          After the transfer has completed this method reads the log.
 void logUpdated(java.lang.String transferId, org.alfresco.service.cmr.repository.NodeRef sourceNode, org.alfresco.service.cmr.repository.NodeRef destNode, org.alfresco.service.cmr.repository.Path parentPath)
          Log the creation of a new node
 void setDelegate(TransferProgressMonitor delegate)
           
 void updateProgress(java.lang.String transferId, int currPos)
          update the progress of the specified transfer
 void updateProgress(java.lang.String transferId, int currPos, int endPos)
          update the progress of the specified transfer and possibly change the end position.
 void updateStatus(java.lang.String transferId, TransferProgress.Status status)
          update the startus of the transfer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingTransferProgressMonitorImpl

public LoggingTransferProgressMonitorImpl()
Method Detail

setDelegate

public void setDelegate(TransferProgressMonitor delegate)
Parameters:
delegate - the delegate to set

getProgress

public TransferProgress getProgress(java.lang.String transferId)
                             throws TransferException
Description copied from interface: TransferProgressMonitor
Read the progress of the

Specified by:
getProgress in interface TransferProgressMonitor
Parameters:
transferId -
Returns:
Throws:
TransferException
See Also:
TransferProgressMonitor.getProgress(java.lang.String)

logException

public void logException(java.lang.String transferId,
                         java.lang.Object obj,
                         java.lang.Throwable ex)
                  throws TransferException
Description copied from interface: TransferProgressMonitor
log an ad-hoc message and an exception

Specified by:
logException in interface TransferProgressMonitor
Parameters:
transferId -
obj -
ex -
Throws:
TransferException
See Also:
org.alfresco.repo.transfer.TransferProgressMonitor#log(java.lang.String, java.lang.Object, java.lang.Throwable)

logComment

public void logComment(java.lang.String transferId,
                       java.lang.Object obj)
                throws TransferException
Description copied from interface: TransferProgressMonitor
log an ad-hoc message

Specified by:
logComment in interface TransferProgressMonitor
Parameters:
transferId -
obj -
Throws:
TransferException
See Also:
org.alfresco.repo.transfer.TransferProgressMonitor#log(java.lang.String, java.lang.Object)

logCreated

public 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 parentNode,
                       org.alfresco.service.cmr.repository.Path parentPath,
                       boolean orphan)
Description copied from interface: TransferProgressMonitor
Log the creation of a new node

Specified by:
logCreated in interface TransferProgressMonitor

logUpdated

public void logUpdated(java.lang.String transferId,
                       org.alfresco.service.cmr.repository.NodeRef sourceNode,
                       org.alfresco.service.cmr.repository.NodeRef destNode,
                       org.alfresco.service.cmr.repository.Path parentPath)
Description copied from interface: TransferProgressMonitor
Log the creation of a new node

Specified by:
logUpdated in interface TransferProgressMonitor

logMoved

public void logMoved(java.lang.String transferId,
                     org.alfresco.service.cmr.repository.NodeRef sourceNode,
                     org.alfresco.service.cmr.repository.NodeRef destNode,
                     org.alfresco.service.cmr.repository.Path oldPath,
                     org.alfresco.service.cmr.repository.NodeRef parentNodeRef,
                     org.alfresco.service.cmr.repository.Path parentPath)
Description copied from interface: TransferProgressMonitor
After the transfer has completed this method reads the log.

Specified by:
logMoved in interface TransferProgressMonitor

logDeleted

public void logDeleted(java.lang.String transferId,
                       org.alfresco.service.cmr.repository.NodeRef sourceNode,
                       org.alfresco.service.cmr.repository.NodeRef destNode,
                       org.alfresco.service.cmr.repository.Path parentPath)
Description copied from interface: TransferProgressMonitor
Log the deletion of a node

Specified by:
logDeleted in interface TransferProgressMonitor

updateProgress

public void updateProgress(java.lang.String transferId,
                           int currPos,
                           int endPos)
                    throws TransferException
Description copied from interface: TransferProgressMonitor
update the progress of the specified transfer and possibly change the end position.

Specified by:
updateProgress in interface TransferProgressMonitor
Parameters:
transferId -
currPos -
endPos -
Throws:
TransferException
See Also:
TransferProgressMonitor.updateProgress(java.lang.String, int, int)

updateProgress

public void updateProgress(java.lang.String transferId,
                           int currPos)
                    throws TransferException
Description copied from interface: TransferProgressMonitor
update the progress of the specified transfer

Specified by:
updateProgress in interface TransferProgressMonitor
Parameters:
transferId -
currPos -
Throws:
TransferException
See Also:
TransferProgressMonitor.updateProgress(java.lang.String, int)

updateStatus

public void updateStatus(java.lang.String transferId,
                         TransferProgress.Status status)
                  throws TransferException
Description copied from interface: TransferProgressMonitor
update the startus of the transfer

Specified by:
updateStatus in interface TransferProgressMonitor
Parameters:
transferId -
status -
Throws:
TransferException
See Also:
TransferProgressMonitor.updateStatus(java.lang.String, org.alfresco.service.cmr.transfer.TransferProgress.Status)

getLogInputStream

public java.io.InputStream getLogInputStream(java.lang.String transferId)
                                      throws TransferException
Specified by:
getLogInputStream in interface TransferProgressMonitor
Throws:
TransferException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.