Search in sources :

Example 1 with GetTransferJob

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

the class GetTransferJobAction method handle.

@Override
public TransferJob handle(GetTransferJob transferRequest) {
    String id = transferRequest.getId();
    Preconditions.checkNotNull(id, "transfer job ID required for GetTransferJobAction");
    UUID jobId = decodeJobId(id);
    PortabilityJob job = jobStore.findJob(jobId);
    monitor.debug(() -> format("Fetched job with jobId: %s", jobId), jobId, EventCode.API_GOT_TRANSFER_JOB);
    // TODO(#553): This list of nulls should be cleaned up when we refactor TransferJob.
    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) GetTransferJob(org.datatransferproject.types.client.transfer.GetTransferJob)

Aggregations

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