Package nl.lexemmens.podman.command
Class AbstractCommand
- java.lang.Object
-
- nl.lexemmens.podman.command.AbstractCommand
-
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
AbstractPodmanCommand,BuildahUnshareCommand,ChConCommand,SeStatusCommand,SkopeoCopyCommand
public abstract class AbstractCommand extends Object implements Command
Abstract implementation for each command
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.maven.plugin.logging.Loglog
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractCommand(org.apache.maven.plugin.logging.Log log, CommandExecutorDelegate delegate)Constructor.protectedAbstractCommand(org.apache.maven.plugin.logging.Log log, CommandExecutorDelegate delegate, File workDir)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description List<String>execute()Executes the commandprotected abstract List<String>getCommand()Returns the command to executeprotected abstract booleanredirectError()Returns whether errors should be redirected
-
-
-
Constructor Detail
-
AbstractCommand
protected AbstractCommand(org.apache.maven.plugin.logging.Log log, CommandExecutorDelegate delegate)Constructor. Creates a new instance of the command using the default working directory
-
AbstractCommand
protected AbstractCommand(org.apache.maven.plugin.logging.Log log, CommandExecutorDelegate delegate, File workDir)Constructor. Creates a new instance of the command using the specified working directory
-
-
Method Detail
-
execute
public List<String> execute() throws org.apache.maven.plugin.MojoExecutionException
Description copied from interface:CommandExecutes the command
-
getCommand
protected abstract List<String> getCommand()
Returns the command to execute- Returns:
- The command to execute
-
redirectError
protected abstract boolean redirectError()
Returns whether errors should be redirected
-
-