Class SystemCommandExecuterPlatformSupportWrapper
- java.lang.Object
-
- com.github.toolarium.system.command.executer.impl.SystemCommandExecuterPlatformSupportWrapper
-
- All Implemented Interfaces:
ISystemCommandExecuterPlatformSupport,java.io.Serializable
public class SystemCommandExecuterPlatformSupportWrapper extends java.lang.Object implements ISystemCommandExecuterPlatformSupport, java.io.Serializable
Implements aISystemCommandExecuterPlatformSupportwrapper.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SystemCommandExecuterPlatformSupportWrapper(ISystemCommandExecuterPlatformSupport systemCommandExecuterPlatformSupport)Constructor for SystemCommandExecuterPlatformSupportWrapper
-
Method Summary
All Methods Instance Methods Concrete 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 commandprotected java.lang.StringhandleNull(java.lang.String content)Implements the the null handlingprotected java.util.List<java.lang.String>handleNull(java.util.List<java.lang.String> content)Implements the the null handlingvoidwriteToFile(java.nio.file.Path file, java.lang.String content)Write content to the temporary file
-
-
-
Constructor Detail
-
SystemCommandExecuterPlatformSupportWrapper
public SystemCommandExecuterPlatformSupportWrapper(ISystemCommandExecuterPlatformSupport systemCommandExecuterPlatformSupport)
Constructor for SystemCommandExecuterPlatformSupportWrapper- Parameters:
systemCommandExecuterPlatformSupport- the system command executer platform support
-
-
Method Detail
-
writeToFile
public void writeToFile(java.nio.file.Path file, java.lang.String content) throws java.io.IOExceptionDescription copied from interface:ISystemCommandExecuterPlatformSupportWrite content to the temporary file- Specified by:
writeToFilein interfaceISystemCommandExecuterPlatformSupport- Parameters:
file- the current temporary filecontent- the content to write- Throws:
java.io.IOException- In case of write issues- See Also:
ISystemCommandExecuterPlatformSupport.writeToFile(java.nio.file.Path, java.lang.String)
-
getSudo
public java.util.List<java.lang.String> getSudo(java.lang.String username)
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the substitute user command- Specified by:
getSudoin interfaceISystemCommandExecuterPlatformSupport- Parameters:
username- the username to use- Returns:
- the substitute user command
- See Also:
ISystemCommandExecuterPlatformSupport.getSudo(java.lang.String)
-
getShellStartCommand
public java.util.List<java.lang.String> getShellStartCommand(java.lang.String id, ISystemCommand systemCommand)Description copied from interface:ISystemCommandExecuterPlatformSupportGet the start shell command- Specified by:
getShellStartCommandin interfaceISystemCommandExecuterPlatformSupport- Parameters:
id- the id of this command groupsystemCommand- the system command- Returns:
- the shell command
- See Also:
ISystemCommandExecuterPlatformSupport.getShellStartCommand(java.lang.String, com.github.toolarium.system.command.dto.ISystemCommand)
-
getShellEndCommand
public java.util.List<java.lang.String> getShellEndCommand(java.lang.String id, ISystemCommand systemCommand)Description copied from interface:ISystemCommandExecuterPlatformSupportGet the end shell command- Specified by:
getShellEndCommandin interfaceISystemCommandExecuterPlatformSupport- Parameters:
id- the id of this command groupsystemCommand- the system command- Returns:
- the shell command
- See Also:
ISystemCommandExecuterPlatformSupport.getShellEndCommand(java.lang.String, com.github.toolarium.system.command.dto.ISystemCommand)
-
getScriptFileHeader
public java.lang.String getScriptFileHeader()
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the script file header- Specified by:
getScriptFileHeaderin interfaceISystemCommandExecuterPlatformSupport- Returns:
- the script file header
- See Also:
ISystemCommandExecuterPlatformSupport.getScriptFileHeader()
-
getScriptFileFooter
public java.lang.String getScriptFileFooter()
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the script file footer- Specified by:
getScriptFileFooterin interfaceISystemCommandExecuterPlatformSupport- Returns:
- the script file footer
- See Also:
ISystemCommandExecuterPlatformSupport.getScriptFileFooter()
-
getScriptFileExtension
public java.lang.String getScriptFileExtension()
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the script file extension- Specified by:
getScriptFileExtensionin interfaceISystemCommandExecuterPlatformSupport- Returns:
- the script file extension
- See Also:
ISystemCommandExecuterPlatformSupport.getScriptFileExtension()
-
getScriptFileComment
public java.lang.String getScriptFileComment()
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the script file comment- Specified by:
getScriptFileCommentin interfaceISystemCommandExecuterPlatformSupport- Returns:
- the script file comment
- See Also:
ISystemCommandExecuterPlatformSupport.getScriptFileComment()
-
getEnvironmentUnsetCommand
public java.lang.String getEnvironmentUnsetCommand()
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the environment unset command- Specified by:
getEnvironmentUnsetCommandin interfaceISystemCommandExecuterPlatformSupport- Returns:
- the environment unset command
- See Also:
ISystemCommandExecuterPlatformSupport.getEnvironmentUnsetCommand()
-
getNotExistEnvironmentVariableCommand
public java.lang.String getNotExistEnvironmentVariableCommand(java.lang.String envVariable)
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the if not exist environment variable command- Specified by:
getNotExistEnvironmentVariableCommandin interfaceISystemCommandExecuterPlatformSupport- Parameters:
envVariable- the environment variable- Returns:
- the if exist environment variable command
- See Also:
ISystemCommandExecuterPlatformSupport.getNotExistEnvironmentVariableCommand(java.lang.String)
-
getEnvironmentSetCommand
public java.lang.String getEnvironmentSetCommand()
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the environment set command- Specified by:
getEnvironmentSetCommandin interfaceISystemCommandExecuterPlatformSupport- Returns:
- the environment set command
- See Also:
ISystemCommandExecuterPlatformSupport.getEnvironmentSetCommand()
-
getEnvironmentChangeDirectoryCommand
public java.lang.String getEnvironmentChangeDirectoryCommand()
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the environment change directory command- Specified by:
getEnvironmentChangeDirectoryCommandin interfaceISystemCommandExecuterPlatformSupport- Returns:
- the environment change directory command
- See Also:
ISystemCommandExecuterPlatformSupport.getEnvironmentChangeDirectoryCommand()
-
getEnvironmentAssignCommandEnd
public java.lang.String getEnvironmentAssignCommandEnd()
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the environment assign command end- Specified by:
getEnvironmentAssignCommandEndin interfaceISystemCommandExecuterPlatformSupport- Returns:
- the assign command
- See Also:
ISystemCommandExecuterPlatformSupport.getEnvironmentAssignCommandEnd()
-
getEnvironmentAssignCommand
public java.lang.String getEnvironmentAssignCommand()
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the environment assign command- Specified by:
getEnvironmentAssignCommandin interfaceISystemCommandExecuterPlatformSupport- Returns:
- the environment assign command
- See Also:
ISystemCommandExecuterPlatformSupport.getEnvironmentAssignCommand()
-
getCommandOnSuccessStart
public java.lang.String getCommandOnSuccessStart()
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the start command on success- Specified by:
getCommandOnSuccessStartin interfaceISystemCommandExecuterPlatformSupport- Returns:
- the start command on success
- See Also:
ISystemCommandExecuterPlatformSupport.getCommandOnSuccessStart()
-
getCommandOnSuccessEnd
public java.lang.String getCommandOnSuccessEnd()
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the end command on success- Specified by:
getCommandOnSuccessEndin interfaceISystemCommandExecuterPlatformSupport- Returns:
- the end command on success
- See Also:
ISystemCommandExecuterPlatformSupport.getCommandOnSuccessEnd()
-
getCommandOnErrorStart
public java.lang.String getCommandOnErrorStart()
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the start command on error- Specified by:
getCommandOnErrorStartin interfaceISystemCommandExecuterPlatformSupport- Returns:
- the start command on error
- See Also:
ISystemCommandExecuterPlatformSupport.getCommandOnErrorStart()
-
getCommandOnErrorEnd
public java.lang.String getCommandOnErrorEnd()
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the end command on error- Specified by:
getCommandOnErrorEndin interfaceISystemCommandExecuterPlatformSupport- Returns:
- the end command on error
- See Also:
ISystemCommandExecuterPlatformSupport.getCommandOnErrorEnd()
-
getEndOfLine
public java.lang.String getEndOfLine()
Description copied from interface:ISystemCommandExecuterPlatformSupportGet the end of line- Specified by:
getEndOfLinein interfaceISystemCommandExecuterPlatformSupport- Returns:
- the end of line
- See Also:
ISystemCommandExecuterPlatformSupport.getEndOfLine()
-
handleNull
protected java.lang.String handleNull(java.lang.String content)
Implements the the null handling- Parameters:
content- the content- Returns:
- the content
-
handleNull
protected java.util.List<java.lang.String> handleNull(java.util.List<java.lang.String> content)
Implements the the null handling- Parameters:
content- the content- Returns:
- the content
-
-