Search in sources :

Example 1 with DefaultExternalResourceConnector

use of org.gradle.internal.resource.transfer.DefaultExternalResourceConnector in project gradle by gradle.

the class SftpConnectorFactory method createResourceConnector.

@Override
public ExternalResourceConnector createResourceConnector(ResourceConnectorSpecification connectionDetails) {
    PasswordCredentials passwordCredentials = connectionDetails.getCredentials(PasswordCredentials.class);
    SftpResourceAccessor accessor = new SftpResourceAccessor(sftpClientFactory, passwordCredentials);
    SftpResourceLister lister = new SftpResourceLister(sftpClientFactory, passwordCredentials);
    SftpResourceUploader uploader = new SftpResourceUploader(sftpClientFactory, passwordCredentials);
    return new DefaultExternalResourceConnector(accessor, lister, uploader);
}
Also used : PasswordCredentials(org.gradle.api.artifacts.repositories.PasswordCredentials) DefaultExternalResourceConnector(org.gradle.internal.resource.transfer.DefaultExternalResourceConnector)

Aggregations

PasswordCredentials (org.gradle.api.artifacts.repositories.PasswordCredentials)1 DefaultExternalResourceConnector (org.gradle.internal.resource.transfer.DefaultExternalResourceConnector)1