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 aISystemCommandExecuterPlatformSupport
wrapper.- 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.String
getCommandOnErrorEnd()
Get the end command on errorjava.lang.String
getCommandOnErrorStart()
Get the start command on errorjava.lang.String
getCommandOnSuccessEnd()
Get the end command on successjava.lang.String
getCommandOnSuccessStart()
Get the start command on successjava.lang.String
getEndOfLine()
Get the end of linejava.lang.String
getEnvironmentAssignCommand()
Get the environment assign commandjava.lang.String
getEnvironmentAssignCommandEnd()
Get the environment assign command endjava.lang.String
getEnvironmentChangeDirectoryCommand()
Get the environment change directory commandjava.lang.String
getEnvironmentSetCommand()
Get the environment set commandjava.lang.String
getEnvironmentUnsetCommand()
Get the environment unset commandjava.lang.String
getNotExistEnvironmentVariableCommand(java.lang.String envVariable)
Get the if not exist environment variable commandjava.lang.String
getScriptFileComment()
Get the script file commentjava.lang.String
getScriptFileExtension()
Get the script file extensionjava.lang.String
getScriptFileFooter()
Get the script file footerjava.lang.String
getScriptFileHeader()
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.String
handleNull(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 handlingvoid
writeToFile(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.IOException
Description copied from interface:ISystemCommandExecuterPlatformSupport
Write content to the temporary file- Specified by:
writeToFile
in 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:ISystemCommandExecuterPlatformSupport
Get the substitute user command- Specified by:
getSudo
in 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:ISystemCommandExecuterPlatformSupport
Get the start shell command- Specified by:
getShellStartCommand
in 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:ISystemCommandExecuterPlatformSupport
Get the end shell command- Specified by:
getShellEndCommand
in 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:ISystemCommandExecuterPlatformSupport
Get the script file header- Specified by:
getScriptFileHeader
in interfaceISystemCommandExecuterPlatformSupport
- Returns:
- the script file header
- See Also:
ISystemCommandExecuterPlatformSupport.getScriptFileHeader()
-
getScriptFileFooter
public java.lang.String getScriptFileFooter()
Description copied from interface:ISystemCommandExecuterPlatformSupport
Get the script file footer- Specified by:
getScriptFileFooter
in interfaceISystemCommandExecuterPlatformSupport
- Returns:
- the script file footer
- See Also:
ISystemCommandExecuterPlatformSupport.getScriptFileFooter()
-
getScriptFileExtension
public java.lang.String getScriptFileExtension()
Description copied from interface:ISystemCommandExecuterPlatformSupport
Get the script file extension- Specified by:
getScriptFileExtension
in interfaceISystemCommandExecuterPlatformSupport
- Returns:
- the script file extension
- See Also:
ISystemCommandExecuterPlatformSupport.getScriptFileExtension()
-
getScriptFileComment
public java.lang.String getScriptFileComment()
Description copied from interface:ISystemCommandExecuterPlatformSupport
Get the script file comment- Specified by:
getScriptFileComment
in interfaceISystemCommandExecuterPlatformSupport
- Returns:
- the script file comment
- See Also:
ISystemCommandExecuterPlatformSupport.getScriptFileComment()
-
getEnvironmentUnsetCommand
public java.lang.String getEnvironmentUnsetCommand()
Description copied from interface:ISystemCommandExecuterPlatformSupport
Get the environment unset command- Specified by:
getEnvironmentUnsetCommand
in interfaceISystemCommandExecuterPlatformSupport
- Returns:
- the environment unset command
- See Also:
ISystemCommandExecuterPlatformSupport.getEnvironmentUnsetCommand()
-
getNotExistEnvironmentVariableCommand
public java.lang.String getNotExistEnvironmentVariableCommand(java.lang.String envVariable)
Description copied from interface:ISystemCommandExecuterPlatformSupport
Get the if not exist environment variable command- Specified by:
getNotExistEnvironmentVariableCommand
in 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:ISystemCommandExecuterPlatformSupport
Get the environment set command- Specified by:
getEnvironmentSetCommand
in interfaceISystemCommandExecuterPlatformSupport
- Returns:
- the environment set command
- See Also:
ISystemCommandExecuterPlatformSupport.getEnvironmentSetCommand()
-
getEnvironmentChangeDirectoryCommand
public java.lang.String getEnvironmentChangeDirectoryCommand()
Description copied from interface:ISystemCommandExecuterPlatformSupport
Get the environment change directory command- Specified by:
getEnvironmentChangeDirectoryCommand
in interfaceISystemCommandExecuterPlatformSupport
- Returns:
- the environment change directory command
- See Also:
ISystemCommandExecuterPlatformSupport.getEnvironmentChangeDirectoryCommand()
-
getEnvironmentAssignCommandEnd
public java.lang.String getEnvironmentAssignCommandEnd()
Description copied from interface:ISystemCommandExecuterPlatformSupport
Get the environment assign command end- Specified by:
getEnvironmentAssignCommandEnd
in interfaceISystemCommandExecuterPlatformSupport
- Returns:
- the assign command
- See Also:
ISystemCommandExecuterPlatformSupport.getEnvironmentAssignCommandEnd()
-
getEnvironmentAssignCommand
public java.lang.String getEnvironmentAssignCommand()
Description copied from interface:ISystemCommandExecuterPlatformSupport
Get the environment assign command- Specified by:
getEnvironmentAssignCommand
in interfaceISystemCommandExecuterPlatformSupport
- Returns:
- the environment assign command
- See Also:
ISystemCommandExecuterPlatformSupport.getEnvironmentAssignCommand()
-
getCommandOnSuccessStart
public java.lang.String getCommandOnSuccessStart()
Description copied from interface:ISystemCommandExecuterPlatformSupport
Get the start command on success- Specified by:
getCommandOnSuccessStart
in interfaceISystemCommandExecuterPlatformSupport
- Returns:
- the start command on success
- See Also:
ISystemCommandExecuterPlatformSupport.getCommandOnSuccessStart()
-
getCommandOnSuccessEnd
public java.lang.String getCommandOnSuccessEnd()
Description copied from interface:ISystemCommandExecuterPlatformSupport
Get the end command on success- Specified by:
getCommandOnSuccessEnd
in interfaceISystemCommandExecuterPlatformSupport
- Returns:
- the end command on success
- See Also:
ISystemCommandExecuterPlatformSupport.getCommandOnSuccessEnd()
-
getCommandOnErrorStart
public java.lang.String getCommandOnErrorStart()
Description copied from interface:ISystemCommandExecuterPlatformSupport
Get the start command on error- Specified by:
getCommandOnErrorStart
in interfaceISystemCommandExecuterPlatformSupport
- Returns:
- the start command on error
- See Also:
ISystemCommandExecuterPlatformSupport.getCommandOnErrorStart()
-
getCommandOnErrorEnd
public java.lang.String getCommandOnErrorEnd()
Description copied from interface:ISystemCommandExecuterPlatformSupport
Get the end command on error- Specified by:
getCommandOnErrorEnd
in interfaceISystemCommandExecuterPlatformSupport
- Returns:
- the end command on error
- See Also:
ISystemCommandExecuterPlatformSupport.getCommandOnErrorEnd()
-
getEndOfLine
public java.lang.String getEndOfLine()
Description copied from interface:ISystemCommandExecuterPlatformSupport
Get the end of line- Specified by:
getEndOfLine
in 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
-
-