Search in sources :

Example 1 with StartTransferJob

use of org.datatransferproject.types.client.transfer.StartTransferJob in project data-transfer-project by google.

the class StartTransferJobAction method handle.

@Override
public TransferJob handle(StartTransferJob startTransferJob) {
    String id = startTransferJob.getId();
    Preconditions.checkNotNull(id, "transfer job ID required for StartTransferJobAction");
    UUID jobId = decodeJobId(id);
    PortabilityJob job = jobStore.findJob(jobId);
    String authData = startTransferJob.getEncryptedAuthData();
    job = updateJobWithCredentials(jobId, job, authData);
    return new TransferJob(id, job.exportService(), job.importService(), job.transferDataType(), null, null, null, null, null, null);
}
Also used : PortabilityJob(org.datatransferproject.spi.cloud.types.PortabilityJob) UUID(java.util.UUID) TransferJob(org.datatransferproject.types.client.transfer.TransferJob) StartTransferJob(org.datatransferproject.types.client.transfer.StartTransferJob)

Aggregations

UUID (java.util.UUID)1 PortabilityJob (org.datatransferproject.spi.cloud.types.PortabilityJob)1 StartTransferJob (org.datatransferproject.types.client.transfer.StartTransferJob)1 TransferJob (org.datatransferproject.types.client.transfer.TransferJob)1