Class ScriptPluginFileCopier
- java.lang.Object
-
- com.dtolabs.rundeck.core.plugins.AbstractDescribableScriptPlugin
-
- com.dtolabs.rundeck.core.plugins.BaseScriptPlugin
-
- com.dtolabs.rundeck.core.execution.service.ScriptPluginFileCopier
-
- All Implemented Interfaces:
ProxySecretBundleCreator,FileCopier,Describable
public class ScriptPluginFileCopier extends BaseScriptPlugin implements FileCopier
ScriptPluginFileCopier wraps the execution of the script and supplies the FileCopier interface.
-
-
Field Summary
-
Fields inherited from class com.dtolabs.rundeck.core.plugins.AbstractDescribableScriptPlugin
CONFIG_BLANK_IF_UNEXPANDED, CONFIG_DEFAULT, CONFIG_DESCRIPTION, CONFIG_LABELS, CONFIG_NAME, CONFIG_PROP_PREFIX, CONFIG_RENDERING_OPTIONS, CONFIG_REQUIRED, CONFIG_SCOPE, CONFIG_TITLE, CONFIG_TYPE, CONFIG_VALUES, DESCRIPTION_PROP, SETTING_MERGE_ENVIRONMENT, TITLE_PROP
-
-
Constructor Summary
Constructors Constructor Description ScriptPluginFileCopier(ScriptPluginProvider provider, Framework framework)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcopyFile(ExecutionContext executionContext, java.io.File file, INodeEntry node, java.lang.String destination)Copy existing filejava.lang.StringcopyFileStream(ExecutionContext executionContext, java.io.InputStream inputStream, INodeEntry node, java.lang.String destination)Copy inputstreamjava.lang.StringcopyScriptContent(ExecutionContext executionContext, java.lang.String s, INodeEntry node, java.lang.String destination)Copy string contentbooleanisAllowCustomProperties()booleanisUseConventionalPropertiesMapping()-
Methods inherited from class com.dtolabs.rundeck.core.plugins.BaseScriptPlugin
createScriptArgs, createScriptArgsList, createScriptDataContext, createScriptDataContext, createStepItemDataContext, getScriptExecHelper, listSecretsPath, listSecretsPathWorkflowNodeStep, listSecretsPathWorkflowStep, prepareSecretBundle, prepareSecretBundleWorkflowNodeStep, prepareSecretBundleWorkflowStep, runPluginScript, setScriptExecHelper
-
Methods inherited from class com.dtolabs.rundeck.core.plugins.AbstractDescribableScriptPlugin
createDescription, createDescription, createPluginData, getDescription, getFramework, getProvider, loadConfigData, loadContentConversionPropertyValues, loadInstanceDataFromNodeAttributes
-
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, prepareSecretBundleResourceModel
-
-
-
-
Constructor Detail
-
ScriptPluginFileCopier
public ScriptPluginFileCopier(ScriptPluginProvider provider, Framework framework)
-
-
Method Detail
-
isAllowCustomProperties
public boolean isAllowCustomProperties()
- Specified by:
isAllowCustomPropertiesin classAbstractDescribableScriptPlugin- Returns:
- true if the script-plugin allows custom configuration properties defined in plugin metadata.
-
isUseConventionalPropertiesMapping
public boolean isUseConventionalPropertiesMapping()
- Overrides:
isUseConventionalPropertiesMappingin classAbstractDescribableScriptPlugin- Returns:
- true to provide conventional mapping from config properties to framework/project properties.
-
copyFileStream
public java.lang.String copyFileStream(ExecutionContext executionContext, java.io.InputStream inputStream, INodeEntry node, java.lang.String destination) throws FileCopierException
Copy inputstream- Specified by:
copyFileStreamin interfaceFileCopier- Parameters:
executionContext- contextinputStream- 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 executionContext, java.io.File file, INodeEntry node, java.lang.String destination) throws FileCopierException
Copy existing file- Specified by:
copyFilein interfaceFileCopier- Parameters:
executionContext- 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 executionContext, java.lang.String s, INodeEntry node, java.lang.String destination) throws FileCopierException
Copy string content- Specified by:
copyScriptContentin interfaceFileCopier- Parameters:
executionContext- contexts- 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
-
-