public static class ChocoExecutor.ChocoExecutorBuilder
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
ChocoExecutor.ChocoExecutorBuilder |
addAdminMode(boolean isAdminMode)
Adds an indication assembled choco command will be executed in admin mode.
|
ChocoExecutor.ChocoExecutorBuilder |
addArgs(java.lang.String... args)
Adds multiple arguments in one command.
|
ChocoExecutor.ChocoExecutorBuilder |
addAutoInstall(boolean isAutoInstall)
Adds an indication if the ChocoExecutor will auto install chocolatey.
|
ChocoExecutor.ChocoExecutorBuilder |
addChocoHome(java.io.File chocoHome)
Adds the location of a non-standard location of chocolatey installation.
|
ChocoExecutor.ChocoExecutorBuilder |
addCommand(java.lang.String command)
Add the choco command the be executed.
|
ChocoExecutor.ChocoExecutorBuilder |
addForceAdminMode(boolean forceAdminMode)
Adds an indication that the choco is being force to run in admin mode.
|
ChocoExecutor.ChocoExecutorBuilder |
addLogging(boolean hasLogging)
Adds an indication that the choco must log its activities to a file.
|
ChocoExecutor.ChocoExecutorBuilder |
addNoop(boolean noop)
Adds an indication that no actual choco command will be executed
|
ChocoExecutor.ChocoExecutorBuilder |
addNoScriptDeletion(boolean noScriptDeletion)
Indicates that the script generated will not be deleted.
|
ChocoExecutor.ChocoExecutorBuilder |
addOSType(OSType osType)
Add an OSType in the builder.
|
ChocoExecutor.ChocoExecutorBuilder |
addPackages(java.util.List<java.util.List<java.lang.String>> packages)
The the packages to be scripted.
|
ChocoExecutor.ChocoExecutorBuilder |
addRunningOnAdmin(boolean runningOnAdmin)
Adds an indication that the choco is already running on administration mode.
|
ChocoExecutor.ChocoExecutorBuilder |
addScriptMode(boolean scriptMode)
Adds an indication that the choco commands will be scripted.
|
ChocoExecutor.ChocoExecutorBuilder |
addTaskName(java.lang.String taskName)
Adds the name of the task being executed.
|
ChocoExecutor.ChocoExecutorBuilder |
addZArgs(java.lang.String... args)
Adds multiple zArguments in one command.
|
ChocoExecutor |
build()
The method that actually builds an instance of ChocoExecutor.
|
public ChocoExecutor.ChocoExecutorBuilder addOSType(OSType osType)
osType - An instance of the OSType enum.public ChocoExecutor.ChocoExecutorBuilder addAutoInstall(boolean isAutoInstall)
isAutoInstall - Set to true to indicate auto installation.public ChocoExecutor.ChocoExecutorBuilder addChocoHome(java.io.File chocoHome)
chocoHome - An instance of File holding the location of chocolatey.public ChocoExecutor.ChocoExecutorBuilder addCommand(java.lang.String command)
command - The command to be executed.public ChocoExecutor.ChocoExecutorBuilder addArgs(java.lang.String... args)
args - An array of arguments.public ChocoExecutor.ChocoExecutorBuilder addZArgs(java.lang.String... args)
args - An array of arguments.public ChocoExecutor.ChocoExecutorBuilder addNoop(boolean noop)
noop - Set to true to stop prevent execution.public ChocoExecutor.ChocoExecutorBuilder addAdminMode(boolean isAdminMode)
isAdminMode - Set to true to run the command in admin mode.public ChocoExecutor.ChocoExecutorBuilder addLogging(boolean hasLogging)
hasLogging - Set to true to enable choco logging.public ChocoExecutor.ChocoExecutorBuilder addRunningOnAdmin(boolean runningOnAdmin)
runningOnAdmin - True if running on administration mode.public ChocoExecutor.ChocoExecutorBuilder addForceAdminMode(boolean forceAdminMode)
forceAdminMode - True if running on to force administration mode.public ChocoExecutor.ChocoExecutorBuilder addScriptMode(boolean scriptMode)
scriptMode - True the commands will be scripted.public ChocoExecutor.ChocoExecutorBuilder addTaskName(java.lang.String taskName)
taskName - The name of the task.public ChocoExecutor.ChocoExecutorBuilder addPackages(java.util.List<java.util.List<java.lang.String>> packages)
packages - The name of the task.public ChocoExecutor.ChocoExecutorBuilder addNoScriptDeletion(boolean noScriptDeletion)
noScriptDeletion - The name of the task.public ChocoExecutor build()