public class FileTransferReceiver extends Object implements TransferReceiver
Constructor and Description |
---|
FileTransferReceiver() |
Modifier and Type | Method and Description |
---|---|
void |
cancel(String transferId)
Abort
|
org.alfresco.repo.transfer.fsr.FileTransferReceiver.Lock |
checkLock(String transferId) |
void |
commit(String transferId)
Commit
|
void |
commitAsync(String transferId)
Commit asynchronously
|
void |
end(String transferId)
Asks the receiver to end (and clean up) the specified transfer
|
void |
generateRequsite(String transferId,
OutputStream requsiteStream)
Write the requsite (the bits required to support the Manifest) to the output stream.
|
Map<String,File> |
getContents() |
DbHelper |
getDbHelper() |
String |
getDefaultReceivingroot() |
JobLockService |
getJobLockService() |
long |
getLockRefreshTime() |
int |
getLockRetryCount() |
long |
getLockRetryWait() |
long |
getLockTimeOut() |
ManifestProcessorFactory |
getManifestProcessorFactory() |
List<FSRRunnable> |
getPostCommit() |
TransferProgressMonitor |
getProgressMonitor() |
String |
getRootStagingDirectory() |
protected File |
getSnapshotFile(String transferId) |
File |
getStagingFolder(String transferId) |
TransferProgress |
getStatus(String transferId) |
org.alfresco.service.cmr.repository.NodeRef |
getTempFolder(String transferId) |
InputStream |
getTransferReport(String transferId)
get the transfer report for the specified transfer
|
String |
getTransferRootNode() |
TransferVersion |
getVersion()
Get the version that we are transfering to.
|
boolean |
isContentNewOrModified(String nodeRef,
String contentUrl) |
void |
prepare(String transferId)
Prepare
|
void |
saveContent(String transferId,
String contentFileId,
InputStream contentStream)
Save a content item
|
void |
saveSnapshot(String transferId,
InputStream openStream)
Store the specified snapshot file into the transfer staging area.
|
void |
setDefaultReceivingroot(String defaultReceivingroot) |
void |
setDescriptorDAO(DescriptorDAO descriptorDAO) |
void |
setFileTransferInfoDAO(FileTransferInfoDAO fileTransferInfoDAO) |
void |
setJobLockService(JobLockService jobLockService) |
void |
setLockRefreshTime(long lockRefreshTime) |
void |
setLockRetryCount(int lockRetryCount) |
void |
setLockRetryWait(long lockRetryWait) |
void |
setLockTimeOut(long lockTimeOut) |
void |
setManifestProcessorFactory(ManifestProcessorFactory manifestProcessorFactory) |
void |
setPostCommit(List<FSRRunnable> postCommit) |
void |
setProgressMonitor(TransferProgressMonitor progressMonitor) |
void |
setRootStagingDirectory(String rootStagingDirectory) |
void |
setTransactionService(TransactionService transactionService) |
void |
setTransferRootNode(String rootFileSystem)
set the root node for the file system receiver
|
String |
start(String fromRepositoryId,
boolean transferToSelf,
TransferVersion fromVersion)
Asks the receiver to setup a new transfer.
|
public void cancel(String transferId) throws TransferException
TransferReceiver
cancel
in interface TransferReceiver
transferId
- StringTransferException
public void commit(String transferId) throws TransferException
TransferReceiver
commit
in interface TransferReceiver
transferId
- StringTransferException
public void commitAsync(String transferId) throws TransferException
TransferReceiver
commitAsync
in interface TransferReceiver
transferId
- StringTransferException
public void end(String transferId)
TransferReceiver
end
in interface TransferReceiver
transferId
- The transfer to endpublic void generateRequsite(String transferId, OutputStream requsiteStream) throws TransferException
TransferReceiver
generateRequsite
in interface TransferReceiver
requsiteStream
- an open stream to receive the requisiteTransferException
public TransferProgressMonitor getProgressMonitor()
getProgressMonitor
in interface TransferReceiver
public File getStagingFolder(String transferId)
getStagingFolder
in interface TransferReceiver
transferId
- Stringpublic TransferProgress getStatus(String transferId) throws TransferException
getStatus
in interface TransferReceiver
transferId
- StringTransferException
public org.alfresco.service.cmr.repository.NodeRef getTempFolder(String transferId)
getTempFolder
in interface TransferReceiver
transferId
- Stringpublic InputStream getTransferReport(String transferId)
TransferReceiver
getTransferReport
in interface TransferReceiver
transferId
- Stringpublic TransferVersion getVersion()
TransferReceiver
getVersion
in interface TransferReceiver
public void prepare(String transferId) throws TransferException
TransferReceiver
prepare
in interface TransferReceiver
transferId
- StringTransferException
public void saveContent(String transferId, String contentFileId, InputStream contentStream) throws TransferException
TransferReceiver
saveContent
in interface TransferReceiver
transferId
- StringcontentFileId
- StringcontentStream
- InputStreamTransferException
public org.alfresco.repo.transfer.fsr.FileTransferReceiver.Lock checkLock(String transferId) throws TransferException
TransferException
public void saveSnapshot(String transferId, InputStream openStream) throws TransferException
TransferReceiver
saveSnapshot
in interface TransferReceiver
transferId
- The identifier of the transfer with which this snapshot is associatedopenStream
- The open stream that holds the snapshot file.TransferException
- If an error occurs while saving the snapshot file.public String start(String fromRepositoryId, boolean transferToSelf, TransferVersion fromVersion)
TransferReceiver
start
in interface TransferReceiver
fromRepositoryId
- the repositoryId of the sending systemtransferToSelf
- are transfers to the same repository allowed?fromVersion
- the version sendingpublic void setJobLockService(JobLockService jobLockService)
public JobLockService getJobLockService()
public void setLockRefreshTime(long lockRefreshTime)
public long getLockRefreshTime()
public long getLockRetryWait()
public void setLockRetryWait(long lockRetryWait)
public int getLockRetryCount()
public void setLockRetryCount(int lockRetryCount)
public long getLockTimeOut()
public void setLockTimeOut(long lockTimeOut)
public void setTransactionService(TransactionService transactionService)
public String getRootStagingDirectory()
public void setRootStagingDirectory(String rootStagingDirectory)
public ManifestProcessorFactory getManifestProcessorFactory()
public void setManifestProcessorFactory(ManifestProcessorFactory manifestProcessorFactory)
public void setProgressMonitor(TransferProgressMonitor progressMonitor)
public String getDefaultReceivingroot()
public void setDefaultReceivingroot(String defaultReceivingroot)
public void setTransferRootNode(String rootFileSystem)
TransferReceiver
setTransferRootNode
in interface TransferReceiver
rootFileSystem
- Stringpublic String getTransferRootNode()
public void setFileTransferInfoDAO(FileTransferInfoDAO fileTransferInfoDAO)
public void setDescriptorDAO(DescriptorDAO descriptorDAO)
public DbHelper getDbHelper()
public void setPostCommit(List<FSRRunnable> postCommit)
public List<FSRRunnable> getPostCommit()
Copyright © 2005–2017 Alfresco Software. All rights reserved.