List<?> entries = executeCommand(fileDiscoveryCommand, executionContext).getResultList(); if(!(entries.isEmpty()) && chronological)
@Override protected ExecutionOutput performExecute() throws ResourceException { logger.debug("execute called on command: [" + getClass().getName() + "]"); //$NON-NLS-1$ //$NON-NLS-2$ List<ClientListEntry> list = getList(); logger.debug("got resulting list:" + list); //$NON-NLS-1$ return new ExecutionOutput(list); }
baseFileTransferDao, clientID, renameOnSuccess, renameOnSuccessExtension, moveOnSuccess, moveOnSuccessNewPath, fileChunkDao, chunkSize, destructive); Object executionResult = executeCommand(chunkingRetrieveFileCommand, executionContext).getResult(); FileChunkHeader fileChunkHeader = (FileChunkHeader) executionResult; BaseFileTransferMappedRecord sftpMappedRecord = (BaseFileTransferMappedRecord) executionResult.getResult(); if (sftpMappedRecord == null)
ChunkingRetrieveFileCommand chunkingRetrieveFileCommand = new ChunkingRetrieveFileCommand(baseFileTransferDao, clientID, renameOnSuccess, renameOnSuccessExtension, moveOnSuccess, moveOnSuccessNewPath, fileChunkDao, chunkSize, destructive); Object executionResult = executeCommand(chunkingRetrieveFileCommand, executionContext).getResult(); FileChunkHeader fileChunkHeader = (FileChunkHeader) executionResult; result = fileChunkHeaderToPayload(fileChunkHeader); moveOnSuccessNewPath, destructive); ExecutionOutput executionResult = executeCommand(retrieveFileCommand, executionContext); BaseFileTransferMappedRecord ftpMappedRecord = (BaseFileTransferMappedRecord) executionResult.getResult(); if(ftpMappedRecord == null)
executeCommand(deliveryCommand, executionContext).getResult();
@Override protected ExecutionOutput performExecute() { logger.info("execute called on this command: [" + this + "]"); //$NON-NLS-1$ //$NON-NLS-2$ // Don't need to do anything on execute except remember the // fileChunkHeader Id this.fileChunkHeader = ((FileChunkHeader) executionContext.get(ExecutionContext.FILE_CHUNK_HEADER)); this.fileChunkHeaderId = fileChunkHeader.getId(); return new ExecutionOutput(); }
List<?> entries = executeCommand(fileDiscoveryCommand, executionContext).getResultList(); if (chronological)
deliveryCommand = new DeliverBatchCommand(outputTarget, overwrite); tempFilePath = (String) executeCommand(deliveryCommand, executionContext).getResult(); if(cleanup) deliveryCommand = new DeliverBatchCommand(outputTarget, overwrite); tempFilePath = (String) executeCommand(deliveryCommand, executionContext).getResult();
/** * @see org.ikasan.connector.basefiletransfer.outbound.command.AbstractBaseFileTransferTransactionalResourceCommand#performExecute() */ @Override protected ExecutionOutput performExecute() throws ResourceException { logger.info("execute called on command: [" + this + "]"); //$NON-NLS-1$ //$NON-NLS-2$ initialise(); renameFile(this.oldFilePath, this.newFilePath); return new ExecutionOutput(); }
/** * (non-Javadoc) * @see org.ikasan.connector.basefiletransfer.outbound.command.AbstractBaseFileTransferTransactionalResourceCommand#performExecute() */ @Override protected ExecutionOutput performExecute() throws ResourceException { logger.info("execute called on this command: [" + this + "]"); //$NON-NLS-1$ //$NON-NLS-2$ ClientListEntry entry = (ClientListEntry) executionContext.get(ExecutionContext.RETRIEVABLE_FILE_PARAM); //sourcePath = entry.getUri().getPath(); // We change the path to be file based as opposed to URI based, // means that root starts as '/' as opposed to '//' which // some FTP servers don't like String uriPath = entry.getUri().getPath(); File path = new File(uriPath); sourcePath = path.getPath(); BaseFileTransferMappedRecord record = getFile(entry); String clientId = (String) executionContext.get(ExecutionContext.CLIENT_ID); logger.debug("got clientId [" + clientId + "]"); //$NON-NLS-1$ //$NON-NLS-2$ entry.setClientId(clientId); dao.persistClientListEntry(entry); return new ExecutionOutput(record); }
@Override protected ExecutionOutput performExecute() throws ResourceException { logger.info("execute called on this command: [" + this + "]"); //$NON-NLS-1$ //$NON-NLS-2$ ClientListEntry entry = (ClientListEntry) executionContext.get(ExecutionContext.RETRIEVABLE_FILE_PARAM); this.sourcePath = entry.getUri().getPath(); File file = new File(entry.getUri().getPath()); try { String directory = file.getParent() + "/"; chunker.chunkFile(directory, file.getName(), chunkSize); } catch (ChunkException e) { throw new ResourceException("Exception caught whilst trying to chunk", e); //$NON-NLS-1$ } FileChunkHeader fileChunkHeader = ((ChunkerImpl) chunker).getFileChunkHeader(); clientId = (String) executionContext.get(ExecutionContext.CLIENT_ID); entry.setClientId(clientId); dao.persistClientListEntry(entry); return new ExecutionOutput(fileChunkHeader); }
@Override protected ExecutionOutput performExecute() throws ResourceException ExecutionOutput result = new ExecutionOutput(); if (skip)
return new ExecutionOutput(tempDirectory);
return new ExecutionOutput(destinationPath);