Package net.thevpc.naru.api.task
Class NaruTaskSpec
java.lang.Object
net.thevpc.naru.api.task.NaruTaskSpec
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionname()static NaruTaskSpecof()longparentId()parentId(long parentId) Prompt mode to run the task in.promptMode(NaruPromptMode promptMode) resolveNameOr(String name) statements(String... commands) statements(List<String> commands) toolTags()Tool tags granted to the task.Add or replace a single initial task variable, keeping the others.vars()The initial task variables, unmodifiable.Replace the initial task variables, replacing anything set earlier.workingDirectory(NPath workingDirectory)
-
Constructor Details
-
NaruTaskSpec
public NaruTaskSpec()
-
-
Method Details
-
of
-
parentId
public long parentId() -
parentId
-
workingDirectory
-
workingDirectory
-
statements
-
statements
-
statements
-
name
-
name
-
promptMode
Prompt mode to run the task in. Whennullthe task inherits its parent's mode, falling back toPLANNINGfor root tasks.Declaring it here rather than calling
NaruTask.promptMode(..)afternewTask(..)matters: a freshly created task is already visible to scheduler workers, so a mode flipped after the fact leaves a window in which the task runs under the inherited mode. -
promptMode
-
toolTags
Tool tags granted to the task. A task can only see a tagged tool if it holds at least one of that tool's tags, so these must be granted explicitly; tags are never inherited from the parent. -
toolTags
-
toolTags
-
vars
Replace the initial task variables, replacing anything set earlier.This is how a host passes real inputs in. The alternative -- a leading
/set --task name = valuestatement -- forces every value through the script parser, which means stringifying anything that is not a literal and quoting anything containing spaces.- Parameters:
vars- the variables, may be null to clear; null keys are ignored
-
var
Add or replace a single initial task variable, keeping the others. -
vars
The initial task variables, unmodifiable. Empty rather than null when none were set. -
resolveName
-
resolveNameOr
-