Class ChConCommand.Builder
- java.lang.Object
-
- nl.lexemmens.podman.command.chcon.ChConCommand.Builder
-
- Enclosing class:
- ChConCommand
public static class ChConCommand.Builder extends Object
Builder class to build an instance of thisChConCommand
-
-
Constructor Summary
Constructors Constructor Description Builder(org.apache.maven.plugin.logging.Log log, CommandExecutorDelegate delegate)Create a new instance of this builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Commandbuild()Returns the constructed commandChConCommand.BuilderwithRecursiveOption()Sets the recursive flag on the chcon commandChConCommand.BuilderwithReferenceDirectory(String sourceDirectory, String targetDirectory)Allows to specify the security context type
-
-
-
Constructor Detail
-
Builder
public Builder(org.apache.maven.plugin.logging.Log log, CommandExecutorDelegate delegate)Create a new instance of this builder- Parameters:
log- The Maven Logdelegate- The executor delegate
-
-
Method Detail
-
withRecursiveOption
public ChConCommand.Builder withRecursiveOption()
Sets the recursive flag on the chcon command- Returns:
- this builder instance
-
withReferenceDirectory
public ChConCommand.Builder withReferenceDirectory(String sourceDirectory, String targetDirectory)
Allows to specify the security context type- Parameters:
sourceDirectory- The source directory to base the context ontargetDirectory- The target directory to apply the SELinux context of the source directory to- Returns:
- this builder instance
-
build
public Command build()
Returns the constructed command- Returns:
- The constructed command
-
-