Package ch.rswk.bootstrap.core.execute
Class AbstractActionExecutor<T extends AbstractActionExecutor.ExecutorAction>
java.lang.Object
ch.rswk.bootstrap.core.execute.AbstractActionExecutor<T>
- Direct Known Subclasses:
CmdExecutor
,CopyExecutor
,EnvExecutor
,UnpackExecutor
,VariableExecutor
,WaitExecutor
,WgetExecutor
public abstract class AbstractActionExecutor<T extends AbstractActionExecutor.ExecutorAction>
extends Object
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
static final record
static class
static interface
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
doExecute
(T action, VariableResolver resolver) void
execute
(AbstractActionExecutor.ExecuteAction action, Set<String> flags, VariableResolver resolver, Env.EnvType targetEnv) protected boolean
static boolean
isMatchingCondition
(@Nullable AbstractActionExecutor.ExecuteCondition condition, Env.EnvType targetEnv, Set<String> flags, VariableResolver resolver) static boolean
isMatchingExists
(@Nullable String exists, VariableResolver resolver) static boolean
isMatchingFlags
(@Nullable String flag, Set<String> flags) newWrapper
(AbstractActionExecutor.ExecutorAction action, @Nullable AbstractActionExecutor.ExecuteCondition condition) static boolean
processOverwrite
(boolean overwrite, Path target) protected Path
resolveToAbsolutePath
(@Nullable String path, VariableResolver resolver)
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
ACTION_TYPE_PROPERTY
- See Also:
-
CONDITION_NEGATE_PREFIX
- See Also:
-
actionType
-
-
Constructor Details
-
AbstractActionExecutor
public AbstractActionExecutor()
-
-
Method Details
-
execute
public void execute(AbstractActionExecutor.ExecuteAction action, Set<String> flags, VariableResolver resolver, Env.EnvType targetEnv) throws AbstractActionExecutor.ExecuteException -
isMatchingActionType
-
doExecute
public abstract void doExecute(T action, VariableResolver resolver) throws AbstractActionExecutor.ExecuteException -
resolveToAbsolutePath
-
processOverwrite
- Throws:
IOException
-
isMatchingCondition
public static boolean isMatchingCondition(@Nullable AbstractActionExecutor.ExecuteCondition condition, Env.EnvType targetEnv, Set<String> flags, VariableResolver resolver) -
isMatchingExists
-
isMatchingFlags
-
newWrapper
public static AbstractActionExecutor.ExecuteAction newWrapper(AbstractActionExecutor.ExecutorAction action, @Nullable AbstractActionExecutor.ExecuteCondition condition)
-