Interface ISystemCommandExecuterPlatformSupport
-
- All Known Implementing Classes:
AbstractSystemCommandExecuterImpl,LinuxSystemCommandExecuterImpl,SystemCommandExecuterPlatformSupportWrapper,UnixSystemCommandExecuterImpl,WindowsSystemCommandExecuterImpl
public interface ISystemCommandExecuterPlatformSupportThe system command executer platform support.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetCommandOnErrorEnd()Get the end command on errorjava.lang.StringgetCommandOnErrorStart()Get the start command on errorjava.lang.StringgetCommandOnSuccessEnd()Get the end command on successjava.lang.StringgetCommandOnSuccessStart()Get the start command on successjava.lang.StringgetEndOfLine()Get the end of linejava.lang.StringgetEnvironmentAssignCommand()Get the environment assign commandjava.lang.StringgetEnvironmentAssignCommandEnd()Get the environment assign command endjava.lang.StringgetEnvironmentChangeDirectoryCommand()Get the environment change directory commandjava.lang.StringgetEnvironmentSetCommand()Get the environment set commandjava.lang.StringgetEnvironmentUnsetCommand()Get the environment unset commandjava.lang.StringgetNotExistEnvironmentVariableCommand(java.lang.String envVariable)Get the if not exist environment variable commandjava.lang.StringgetScriptFileComment()Get the script file commentjava.lang.StringgetScriptFileExtension()Get the script file extensionjava.lang.StringgetScriptFileFooter()Get the script file footerjava.lang.StringgetScriptFileHeader()Get the script file headerjava.util.List<java.lang.String>getShellEndCommand(java.lang.String id, ISystemCommand systemCommand)Get the end shell commandjava.util.List<java.lang.String>getShellStartCommand(java.lang.String id, ISystemCommand systemCommand)Get the start shell commandjava.util.List<java.lang.String>getSudo(java.lang.String username)Get the substitute user commandvoidwriteToFile(java.nio.file.Path file, java.lang.String content)Write content to the temporary file
-
-
-
Method Detail
-
getShellStartCommand
java.util.List<java.lang.String> getShellStartCommand(java.lang.String id, ISystemCommand systemCommand)Get the start shell command- Parameters:
id- the id of this command groupsystemCommand- the system command- Returns:
- the shell command
-
getShellEndCommand
java.util.List<java.lang.String> getShellEndCommand(java.lang.String id, ISystemCommand systemCommand)Get the end shell command- Parameters:
id- the id of this command groupsystemCommand- the system command- Returns:
- the shell command
-
getScriptFileExtension
java.lang.String getScriptFileExtension()
Get the script file extension- Returns:
- the script file extension
-
getScriptFileHeader
java.lang.String getScriptFileHeader()
Get the script file header- Returns:
- the script file header
-
getScriptFileFooter
java.lang.String getScriptFileFooter()
Get the script file footer- Returns:
- the script file footer
-
getScriptFileComment
java.lang.String getScriptFileComment()
Get the script file comment- Returns:
- the script file comment
-
getNotExistEnvironmentVariableCommand
java.lang.String getNotExistEnvironmentVariableCommand(java.lang.String envVariable)
Get the if not exist environment variable command- Parameters:
envVariable- the environment variable- Returns:
- the if exist environment variable command
-
getEnvironmentSetCommand
java.lang.String getEnvironmentSetCommand()
Get the environment set command- Returns:
- the environment set command
-
getEnvironmentUnsetCommand
java.lang.String getEnvironmentUnsetCommand()
Get the environment unset command- Returns:
- the environment unset command
-
getEnvironmentChangeDirectoryCommand
java.lang.String getEnvironmentChangeDirectoryCommand()
Get the environment change directory command- Returns:
- the environment change directory command
-
getEnvironmentAssignCommand
java.lang.String getEnvironmentAssignCommand()
Get the environment assign command- Returns:
- the environment assign command
-
getEnvironmentAssignCommandEnd
java.lang.String getEnvironmentAssignCommandEnd()
Get the environment assign command end- Returns:
- the assign command
-
getEndOfLine
java.lang.String getEndOfLine()
Get the end of line- Returns:
- the end of line
-
getCommandOnSuccessStart
java.lang.String getCommandOnSuccessStart()
Get the start command on success- Returns:
- the start command on success
-
getCommandOnSuccessEnd
java.lang.String getCommandOnSuccessEnd()
Get the end command on success- Returns:
- the end command on success
-
getCommandOnErrorStart
java.lang.String getCommandOnErrorStart()
Get the start command on error- Returns:
- the start command on error
-
getCommandOnErrorEnd
java.lang.String getCommandOnErrorEnd()
Get the end command on error- Returns:
- the end command on error
-
getSudo
java.util.List<java.lang.String> getSudo(java.lang.String username)
Get the substitute user command- Parameters:
username- the username to use- Returns:
- the substitute user command
-
writeToFile
void writeToFile(java.nio.file.Path file, java.lang.String content) throws java.io.IOExceptionWrite content to the temporary file- Parameters:
file- the current temporary filecontent- the content to write- Throws:
java.io.IOException- In case of write issues
-
-