Class JschScpFileCopier
- java.lang.Object
-
- com.dtolabs.rundeck.core.execution.impl.common.BaseFileCopier
-
- com.dtolabs.rundeck.core.execution.impl.jsch.JschScpFileCopier
-
- All Implemented Interfaces:
ProxySecretBundleCreator
,FileCopier
,MultiFileCopier
,Describable
public class JschScpFileCopier extends BaseFileCopier implements MultiFileCopier, Describable, ProxySecretBundleCreator
JschScpFileCopier is ...
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SERVICE_PROVIDER_TYPE
-
Fields inherited from class com.dtolabs.rundeck.core.execution.impl.common.BaseFileCopier
DEFAULT_UNIX_FILE_EXT, DEFAULT_WINDOWS_FILE_EXT, FILE_COPY_DESTINATION_DIR, FRAMEWORK_FILE_COPY_DESTINATION_DIR, PROJECT_FILE_COPY_DESTINATION_DIR
-
-
Constructor Summary
Constructors Constructor Description JschScpFileCopier(Framework framework)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
copyFile(ExecutionContext context, java.io.File scriptfile, INodeEntry node)
java.lang.String
copyFile(ExecutionContext context, java.io.File file, INodeEntry node, java.lang.String destination)
Copy the contents of an input stream to the nodejava.lang.String[]
copyFiles(ExecutionContext context, java.io.File basedir, java.util.List<java.io.File> files, java.lang.String remotePath, INodeEntry node)
Copy multiple files to the node, the default implementation will useMultiFileCopierUtil.copyMultipleFiles(FileCopier, ExecutionContext, File, List, String, INodeEntry)
java.lang.String
copyFileStream(ExecutionContext context, java.io.InputStream input, INodeEntry node)
java.lang.String
copyFileStream(ExecutionContext context, java.io.InputStream input, INodeEntry node, java.lang.String destination)
Copy the contents of an input stream to the nodejava.lang.String
copyScriptContent(ExecutionContext context, java.lang.String script, INodeEntry node)
java.lang.String
copyScriptContent(ExecutionContext context, java.lang.String script, INodeEntry node, java.lang.String destination)
Copy the contents of an input stream to the nodeDescription
getDescription()
java.util.List<java.lang.String>
listSecretsPath(ExecutionContext context, INodeEntry node)
SecretBundle
prepareSecretBundle(ExecutionContext context, INodeEntry node)
-
Methods inherited from class com.dtolabs.rundeck.core.execution.impl.common.BaseFileCopier
appendRemoteFileExtension, defaultRemoteFileExtensionForNode, generateRemoteFilepathForNode, generateRemoteFilepathForNode, generateRemoteFilepathForNode, generateRemoteFilepathForNode, getRemoteDirForNode, getRemoteDirForNode, writeLocalFile, writeTempFile
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.dtolabs.rundeck.core.execution.proxy.ProxySecretBundleCreator
listSecretsPathResourceModel, listSecretsPathWorkflowNodeStep, listSecretsPathWorkflowStep, prepareSecretBundleResourceModel, prepareSecretBundleWorkflowNodeStep, prepareSecretBundleWorkflowStep
-
-
-
-
Field Detail
-
SERVICE_PROVIDER_TYPE
public static final java.lang.String SERVICE_PROVIDER_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JschScpFileCopier
public JschScpFileCopier(Framework framework)
-
-
Method Detail
-
getDescription
public Description getDescription()
- Specified by:
getDescription
in interfaceDescribable
- Returns:
- the configuration description
-
copyFileStream
public java.lang.String copyFileStream(ExecutionContext context, java.io.InputStream input, INodeEntry node) throws FileCopierException
- Throws:
FileCopierException
-
copyFile
public java.lang.String copyFile(ExecutionContext context, java.io.File scriptfile, INodeEntry node) throws FileCopierException
- Throws:
FileCopierException
-
copyScriptContent
public java.lang.String copyScriptContent(ExecutionContext context, java.lang.String script, INodeEntry node) throws FileCopierException
- Throws:
FileCopierException
-
copyFileStream
public java.lang.String copyFileStream(ExecutionContext context, java.io.InputStream input, INodeEntry node, java.lang.String destination) throws FileCopierException
Description copied from interface:FileCopier
Copy the contents of an input stream to the node- Specified by:
copyFileStream
in interfaceFileCopier
- Parameters:
context
- contextinput
- the input streamnode
- nodedestination
- the full path destination for the file- Returns:
- File path of the file after copying to the node
- Throws:
FileCopierException
- if an error occurs
-
copyFile
public java.lang.String copyFile(ExecutionContext context, java.io.File file, INodeEntry node, java.lang.String destination) throws FileCopierException
Description copied from interface:FileCopier
Copy the contents of an input stream to the node- Specified by:
copyFile
in interfaceFileCopier
- Parameters:
context
- contextfile
- local file tocopynode
- nodedestination
- the full path destination for the file- Returns:
- File path of the file after copying to the node
- Throws:
FileCopierException
- if an error occurs
-
copyScriptContent
public java.lang.String copyScriptContent(ExecutionContext context, java.lang.String script, INodeEntry node, java.lang.String destination) throws FileCopierException
Description copied from interface:FileCopier
Copy the contents of an input stream to the node- Specified by:
copyScriptContent
in interfaceFileCopier
- Parameters:
context
- contextscript
- file content stringnode
- nodedestination
- the full path destination for the file- Returns:
- File path of the file after copying to the node
- Throws:
FileCopierException
- if an error occurs
-
copyFiles
public java.lang.String[] copyFiles(ExecutionContext context, java.io.File basedir, java.util.List<java.io.File> files, java.lang.String remotePath, INodeEntry node) throws FileCopierException
Description copied from interface:MultiFileCopier
Copy multiple files to the node, the default implementation will useMultiFileCopierUtil.copyMultipleFiles(FileCopier, ExecutionContext, File, List, String, INodeEntry)
- Specified by:
copyFiles
in interfaceMultiFileCopier
- Parameters:
context
- contextbasedir
- local base directory to determine relative paths of copied filesfiles
- list of local files to copy, must all be somewhere within the basedirremotePath
- remote directory path to copy file(s) to, using relative paths from the basedir as subpaths appended to the remote pathnode
- node- Returns:
- File paths of the files after copying to the node
- Throws:
FileCopierException
- if an error occurs
-
prepareSecretBundle
public SecretBundle prepareSecretBundle(ExecutionContext context, INodeEntry node)
- Specified by:
prepareSecretBundle
in interfaceProxySecretBundleCreator
-
listSecretsPath
public java.util.List<java.lang.String> listSecretsPath(ExecutionContext context, INodeEntry node)
- Specified by:
listSecretsPath
in interfaceProxySecretBundleCreator
-
-