Interface TransferReceiver
-
- All Known Implementing Classes:
RepoTransferReceiverImpl
public interface TransferReceiver- Author:
- brian The server side Transfer Receiver.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcancel(java.lang.String transferId)Abortvoidcommit(java.lang.String transferId)CommitvoidcommitAsync(java.lang.String transferId)Commit asynchronouslyvoidend(java.lang.String transferId)Asks the receiver to end (and clean up) the specified transfervoidgenerateRequsite(java.lang.String transferId, java.io.OutputStream requsiteStream)Write the requsite (the bits required to support the Manifest) to the output stream.TransferProgressMonitorgetProgressMonitor()java.io.FilegetStagingFolder(java.lang.String transferId)TransferProgressgetStatus(java.lang.String transferId)org.alfresco.service.cmr.repository.NodeRefgetTempFolder(java.lang.String transferId)java.io.InputStreamgetTransferReport(java.lang.String transferId)get the transfer report for the specified transferTransferVersiongetVersion()Get the version that we are transfering to.voidprepare(java.lang.String transferId)PreparevoidsaveContent(java.lang.String transferId, java.lang.String contentId, java.io.InputStream contentStream)Save a content itemvoidsaveSnapshot(java.lang.String transferId, java.io.InputStream snapshotStream)Store the specified snapshot file into the transfer staging area.voidsetTransferRootNode(java.lang.String rootFileSystem)set the root node for the file system receiverjava.lang.Stringstart(java.lang.String fromRepositoryId, boolean allowTransferToSelf, TransferVersion fromVersion)Asks the receiver to setup a new transfer.
-
-
-
Method Detail
-
getStagingFolder
java.io.File getStagingFolder(java.lang.String transferId)
- Parameters:
transferId- String- Returns:
- File
-
getTempFolder
org.alfresco.service.cmr.repository.NodeRef getTempFolder(java.lang.String transferId)
- Parameters:
transferId- String- Returns:
- NodeRef
-
start
java.lang.String start(java.lang.String fromRepositoryId, boolean allowTransferToSelf, TransferVersion fromVersion) throws TransferExceptionAsks the receiver to setup a new transfer.- Parameters:
fromRepositoryId- the repositoryId of the sending systemallowTransferToSelf- are transfers to the same repository allowed?fromVersion- the version sending- Returns:
- The identifier of the new transfer
- Throws:
TransferException- if an error occurred while setting up the transfer
-
end
void end(java.lang.String transferId) throws TransferException
Asks the receiver to end (and clean up) the specified transfer- Parameters:
transferId- The transfer to end- Throws:
TransferException- If the process of ending the transfer fails
-
saveSnapshot
void saveSnapshot(java.lang.String transferId, java.io.InputStream snapshotStream) throws TransferExceptionStore the specified snapshot file into the transfer staging area. The specified transfer must currently be the holder of the transfer lock, otherwise an exception is thrown. This operation does not close the supplied stream, so the caller must do it as appropriate. The caller should assume that the supplied stream has been fully read when this operation returns.- Parameters:
transferId- The identifier of the transfer with which this snapshot is associatedsnapshotStream- The open stream that holds the snapshot file.- Throws:
TransferException- If an error occurs while saving the snapshot file.
-
saveContent
void saveContent(java.lang.String transferId, java.lang.String contentId, java.io.InputStream contentStream) throws TransferExceptionSave a content item- Parameters:
transferId- StringcontentId- StringcontentStream- InputStream- Throws:
TransferException
-
generateRequsite
void generateRequsite(java.lang.String transferId, java.io.OutputStream requsiteStream) throws TransferExceptionWrite the requsite (the bits required to support the Manifest) to the output stream.- Parameters:
requsiteStream- an open stream to receive the requisite- Throws:
TransferException
-
prepare
void prepare(java.lang.String transferId) throws TransferExceptionPrepare- Parameters:
transferId- String- Throws:
TransferException
-
cancel
void cancel(java.lang.String transferId) throws TransferExceptionAbort- Parameters:
transferId- String- Throws:
TransferException
-
commitAsync
void commitAsync(java.lang.String transferId) throws TransferExceptionCommit asynchronously- Parameters:
transferId- String- Throws:
TransferException
-
commit
void commit(java.lang.String transferId) throws TransferExceptionCommit- Parameters:
transferId- String- Throws:
TransferException
-
getStatus
TransferProgress getStatus(java.lang.String transferId) throws TransferException
- Parameters:
transferId- String- Returns:
- the trabsfer progress
- Throws:
TransferException
-
getVersion
TransferVersion getVersion()
Get the version that we are transfering to.
-
getProgressMonitor
TransferProgressMonitor getProgressMonitor()
- Returns:
- TransferProgressMonitor
-
getTransferReport
java.io.InputStream getTransferReport(java.lang.String transferId)
get the transfer report for the specified transfer- Parameters:
transferId- String
-
setTransferRootNode
void setTransferRootNode(java.lang.String rootFileSystem)
set the root node for the file system receiver- Parameters:
rootFileSystem- String
-
-