public class TransferServiceImpl extends Object implements TransferService
Constructor and Description |
---|
TransferServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
cancelAsync(String transferId)
Asynchronously cancel an in-progress transfer
This method tells an in-process transfer to give up, rollback and stop as soon as possible.
|
TransferTarget |
createAndSaveTransferTarget(String name,
String title,
String description,
String endpointProtocol,
String endpointHost,
int endpointPort,
String endpointPath,
String username,
char[] password)
Create and save a new transfer target.
|
TransferTarget |
createTransferTarget(String name)
Creates an in memory transfer target.
|
void |
deleteTransferTarget(String name)
Delete a transfer target.
|
void |
enableTransferTarget(String name,
boolean enable)
Enables/Disables the named transfer target
|
TransferTarget |
getTransferTarget(String name)
Get a transfer target by its name
|
Set<TransferTarget> |
getTransferTargets()
Get all the transfer targets
|
Set<TransferTarget> |
getTransferTargets(String groupName)
Get All the transfer targets for a particular transfer target group.
|
TransferTarget |
saveTransferTarget(TransferTarget update)
Save TransferTarget, will create a transfer target if it does not already exist or update an existing transfer target.
|
void |
setTransferServiceImpl2(TransferServiceImpl2 transferServiceImpl2) |
boolean |
targetExists(String name)
Test to see if the target with the specified name exists
|
org.alfresco.service.cmr.repository.NodeRef |
transfer(String targetName,
TransferDefinition definition)
Transfer nodes, sync.
|
org.alfresco.service.cmr.repository.NodeRef |
transfer(String targetName,
TransferDefinition definition,
Collection<TransferCallback> callbacks)
Transfer nodes sync, with callback.
|
org.alfresco.service.cmr.repository.NodeRef |
transfer(String targetName,
TransferDefinition definition,
TransferCallback... callbacks)
Transfer nodes sync, with callback.
|
void |
transferAsync(String targetName,
TransferDefinition definition,
Collection<TransferCallback> callbacks)
Transfer nodes async with callback.
|
void |
transferAsync(String targetName,
TransferDefinition definition,
TransferCallback... callbacks)
Transfer nodes async with callback.
|
void |
verify(TransferTarget target)
Verify a target is available and that the configured credentials are valid.
|
public void setTransferServiceImpl2(TransferServiceImpl2 transferServiceImpl2)
public TransferTarget createTransferTarget(String name)
TransferService
createTransferTarget
in interface TransferService
public TransferTarget createAndSaveTransferTarget(String name, String title, String description, String endpointProtocol, String endpointHost, int endpointPort, String endpointPath, String username, char[] password)
TransferService
createAndSaveTransferTarget
in interface TransferService
name
- the name of this transfer target, which must be uniquetitle
- the display name of this transfer targetdescription
- StringendpointProtocol
- either http or httpsendpointHost
- StringendpointPort
- intendpointPath
- Stringusername
- Stringpassword
- char[]public Set<TransferTarget> getTransferTargets()
TransferService
getTransferTargets
in interface TransferService
public Set<TransferTarget> getTransferTargets(String groupName)
TransferService
getTransferTargets
in interface TransferService
groupName
- the name of the transfer grouppublic void deleteTransferTarget(String name)
TransferService
deleteTransferTarget
in interface TransferService
name
- the name of this transfer target,public void enableTransferTarget(String name, boolean enable)
TransferService
enableTransferTarget
in interface TransferService
name
- the name of the transfer targetenable
- (or false=disable)public boolean targetExists(String name)
TransferService
targetExists
in interface TransferService
name
- Stringpublic TransferTarget getTransferTarget(String name)
TransferService
getTransferTarget
in interface TransferService
public TransferTarget saveTransferTarget(TransferTarget update)
TransferService
saveTransferTarget
in interface TransferService
update
- TransferTargetpublic void transferAsync(String targetName, TransferDefinition definition, TransferCallback... callbacks)
TransferService
transferAsync
in interface TransferService
targetName
- the name of the target to transfer todefinition
- - the definition of the transfer. Specifies which nodes to transfer.
The following properties must be set, nodescallbacks
- - a collection of callback handlers that will be called as transfer proceeds. May be null.public void transferAsync(String targetName, TransferDefinition definition, Collection<TransferCallback> callbacks)
TransferService
transferAsync
in interface TransferService
targetName
- the name of the target to transfer todefinition
- - the definition of the transfer. Specifies which nodes to transfer.
The following properties must be set, nodescallbacks
- - a collection of callback handlers that will be called as transfer proceeds. May be null.public org.alfresco.service.cmr.repository.NodeRef transfer(String targetName, TransferDefinition definition)
TransferService
transfer
in interface TransferService
targetName
- the name of the target to transfer to
The following properties must be set, nodesdefinition
- the definition of the transfer. Specifies which nodes to transfer.public org.alfresco.service.cmr.repository.NodeRef transfer(String targetName, TransferDefinition definition, TransferCallback... callbacks)
TransferService
transfer
in interface TransferService
targetName
- the name of the target to transfer todefinition
- - the definition of the transfer. Specifies which nodes to transfer.
The following properties must be set, nodescallbacks
- - a list of callback handlers that will be called as transfer proceeds. May be null.public org.alfresco.service.cmr.repository.NodeRef transfer(String targetName, TransferDefinition definition, Collection<TransferCallback> callbacks)
TransferService
transfer
in interface TransferService
targetName
- the name of the target to transfer todefinition
- - the definition of the transfer. Specifies which nodes to transfer.
The following properties must be set, nodescallbacks
- - a set of callback handlers that will be called as transfer proceeds. May be null.public void verify(TransferTarget target) throws TransferException
TransferService
verify
in interface TransferService
TransferException
public void cancelAsync(String transferId)
TransferService
cancelAsync
in interface TransferService
transferId
- the unique identifier of the transfer to cancel.TransferEventBegin
Copyright © 2005–2017 Alfresco Software. All rights reserved.