Class ProcessSupport.ScriptOwner
java.lang.Object
de.iip_ecosphere.platform.services.environment.ProcessSupport.ScriptOwner
- Enclosing class:
ProcessSupport
Holds the script context.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScriptOwner(String tmpFolderName, String testFallbackPath, String zipFileName) Creates an instance.ScriptOwner(String tmpFolderName, String testFallbackPath, String zipFileName, String resultFile) Creates an instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the optional process customizer.Returns the folder where the extracted script is located in.Returns the result file.Returns the fallback path to read the script during tests from the project folders.Returns the temporary folder name to extract the scripts into.Returns the ZIP file name containing the script.booleanReturns whether the holder/folder is initialized.(package private) voidsetInitialized(boolean initialized) Defines whether the holder/folder is initialized.(package private) voidsetPythonFolder(File pythonFolder) Changes the folder where the extracted script is located in.withProcessCustomizer(Consumer<ProcessBuilder> customizer) Adds an optional process customizer.
-
Field Details
-
initialized
private boolean initialized -
pythonFolder
-
tmpFolderName
-
testFallbackPath
-
zipFileName
-
resultFile
-
processCustomizer
-
-
Constructor Details
-
ScriptOwner
Creates an instance.- Parameters:
tmpFolderName- the temp folder name where to copy the script/extract the ZIP to.testFallbackPath- the test fallback path in the local project taking precedence during testingzipFileName- the ZIP file name to read from classpath
-
ScriptOwner
public ScriptOwner(String tmpFolderName, String testFallbackPath, String zipFileName, String resultFile) Creates an instance.- Parameters:
tmpFolderName- the temp folder name where to copy the script/extract the ZIP to.testFallbackPath- the test fallback path in the local project taking precedence during testingzipFileName- the ZIP file name to read from classpathresultFile- file to read result from, e.g., short lived processes, ifnulluse standard in
-
-
Method Details
-
isInitialized
public boolean isInitialized()Returns whether the holder/folder is initialized.- Returns:
- whether it is initialized
-
setInitialized
void setInitialized(boolean initialized) Defines whether the holder/folder is initialized.- Parameters:
initialized- whether it is initialized
-
getPythonFolder
Returns the folder where the extracted script is located in.- Returns:
- the folder
-
setPythonFolder
Changes the folder where the extracted script is located in.- Parameters:
pythonFolder- the folder
-
getTmpFolderName
Returns the temporary folder name to extract the scripts into.- Returns:
- the temporary folder name
-
getTestFallbackPath
Returns the fallback path to read the script during tests from the project folders.- Returns:
- the fallback path
-
getZipFileName
Returns the ZIP file name containing the script.- Returns:
- the ZIP file name as to be read as resource
-
getResultFile
Returns the result file.- Returns:
- the result file
-
withProcessCustomizer
Adds an optional process customizer.- Parameters:
customizer- the customizer- Returns:
- thi
-
getProcessCustomizer
Returns the optional process customizer.- Returns:
- the customizer, may be null
-