lib/src/main/java/edu/utexas/tacc/tapis/files/lib/services/TransfersService.java
public TransferTask createTransfer(@NotNull String username, @NotNull String tenantId, String tag, List<TransferTaskRequestElement> elements) throws ServiceException {

        TransferTask task = new TransferTask();
        task.setTenantId(tenantId);
        task.setUsername(username);
        task.setStatus(TransferTaskStatus.ACCEPTED);
        task.setTag(tag);

        try {
            TransferTask newTask = dao.createTransferTask(task, elements);

            for (TransferTaskParent parent : newTask.getParentTasks()) {
                this.publishParentTaskMessage(parent);
            }
            return newTask;
        } catch (DAOException ex) {
            throw new ServiceException(Utils.getMsg("FILES_TXFR_SVC_ERR6", tenantId, username, "createTransfer", tag,
                ex.getMessage()), ex);
        }
    }
/**
     * Creates the top level TransferTask and the associated TransferTaskParents that were requested in the elements List.
     *
     * @param username Obo username
     * @param tenantId tenantId
     * @param tag      Optional identifier
     * @param elements List of requested paths to transfer
     * @return TransferTask The TransferTask that has been saved to the DB
     * @throws ServiceException Saving to DB fails
     */
Creates the top level TransferTask and the associated TransferTaskParents that were requested in the elements List.
Creates the top level TransferTask and the associated TransferTaskParents that were requested in the elements List .
public TransferTask createTransfer(@NotNull String username, @NotNull String tenantId, String tag, List<TransferTaskRequestElement> elements) throws ServiceException {
        TransferTask task = new TransferTask();
        task.setTenantId(tenantId);
        task.setUsername(username);
        task.setStatus(TransferTaskStatus.ACCEPTED);
        task.setTag(tag);
        try {
            TransferTask newTask = dao.createTransferTask(task, elements);
            for (TransferTaskParent parent : newTask.getParentTasks()) {
                this.publishParentTaskMessage(parent);
            }
            return newTask;
        } catch (DAOException ex) {
            throw new ServiceException(Utils.getMsg("FILES_TXFR_SVC_ERR6", tenantId, username, "createTransfer", tag,
                ex.getMessage()), ex);
        }
    }
public TransferTask createTransfer ( @ NotNull String username , @ NotNull String tenantId , String tag , List < TransferTaskRequestElement > elements ) throws ServiceException { TransferTask task = new TransferTask ( ) ; task . setTenantId ( tenantId ) ; task . setUsername ( username ) ; task . setStatus ( TransferTaskStatus . ACCEPTED ) ; task . setTag ( tag ) ; try { TransferTask newTask = dao . createTransferTask ( task , elements ) ; for ( TransferTaskParent parent : newTask . getParentTasks ( ) ) { this . publishParentTaskMessage ( parent ) ; } return newTask ; } catch ( DAOException ex ) { throw new ServiceException ( Utils . getMsg ( "FILES_TXFR_SVC_ERR6" , tenantId , username , "createTransfer" , tag , ex . getMessage ( ) ) , ex ) ; } }
Creates the top level TransferTask and the associated TransferTaskParents that were requested in the elements List.
Creates the top level TransferTask and the associated TransferTaskParents that were requested in the elements List .