public class CommandScript extends Object implements ExecutionScript
ExecutionScript.Kind, ExecutionScript.PlaceholderResolver
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_PROFILE_NAME
Default profile name (empty string).
|
ENV_ASAKUSA_HOME, PLACEHOLDER_ARGUMENTS, PLACEHOLDER_EXECUTION_ID, PLACEHOLDER_HOME
Constructor and Description |
---|
CommandScript(String id,
Set<String> blockerIds,
String profileName,
String moduleName,
List<String> command,
Map<String,String> environmentVariables)
Creates a new instance.
|
CommandScript(String id,
Set<String> blockerIds,
String profileName,
String moduleName,
List<String> command,
Map<String,String> environmentVariables,
Collection<String> supportedExtensions)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Set<String> |
getBlockerIds()
Returns the IDs representing blockers of this script execution.
|
List<String> |
getCommandLineTokens()
Returns a sequence of command line tokens.
|
Map<String,String> |
getEnvironmentVariables()
Returns desired environment variables used in this execution.
|
String |
getId()
Returns the ID of this script execution.
|
ExecutionScript.Kind |
getKind()
Returns the kind of this script.
|
String |
getModuleName()
Returns a module name of target command.
|
String |
getProfileName()
Returns the profile name to execute this command.
|
Set<String> |
getSupportedExtensions()
Returns the supported extension names.
|
int |
hashCode() |
boolean |
isResolved()
Returns whether this script is resolved.
|
CommandScript |
resolve(ExecutionContext context,
ExecutionScriptHandler<?> handler)
Resolves placeholders defined in this script.
|
String |
toString() |
public static final String DEFAULT_PROFILE_NAME
public CommandScript(String id, Set<String> blockerIds, String profileName, String moduleName, List<String> command, Map<String,String> environmentVariables)
resolve(ExecutionContext, ExecutionScriptHandler)
.id
- the script IDblockerIds
- other script IDs blocking this script executionprofileName
- the profile name to execute this command, empty string means use default profilemoduleName
- module name of target commandcommand
- sequence of command tokensenvironmentVariables
- the extra environment variablesIllegalArgumentException
- if some parameters were null
DEFAULT_PROFILE_NAME
,
resolve(ExecutionContext, ExecutionScriptHandler)
public CommandScript(String id, Set<String> blockerIds, String profileName, String moduleName, List<String> command, Map<String,String> environmentVariables, Collection<String> supportedExtensions)
resolve(ExecutionContext, ExecutionScriptHandler)
.id
- the script IDblockerIds
- other script IDs blocking this script executionprofileName
- the profile name to execute this command, empty string means use default profilemoduleName
- module name of target commandcommand
- sequence of command tokensenvironmentVariables
- the extra environment variablessupportedExtensions
- the supported extension namesIllegalArgumentException
- if some parameters were null
DEFAULT_PROFILE_NAME
,
resolve(ExecutionContext, ExecutionScriptHandler)
public ExecutionScript.Kind getKind()
ExecutionScript
getKind
in interface ExecutionScript
public String getId()
ExecutionScript
getId
in interface ExecutionScript
public Set<String> getBlockerIds()
ExecutionScript
getBlockerIds
in interface ExecutionScript
public String getProfileName()
DEFAULT_PROFILE_NAME
public String getModuleName()
public List<String> getCommandLineTokens()
public Map<String,String> getEnvironmentVariables()
ExecutionScript
getEnvironmentVariables
in interface ExecutionScript
public Set<String> getSupportedExtensions()
ExecutionScript
getSupportedExtensions
in interface ExecutionScript
public boolean isResolved()
ExecutionScript
isResolved
in interface ExecutionScript
true
for resolved instance, otherwise false
ExecutionScript.resolve(ExecutionContext, ExecutionScriptHandler)
public CommandScript resolve(ExecutionContext context, ExecutionScriptHandler<?> handler) throws InterruptedException, IOException
ExecutionScript
resolve
in interface ExecutionScript
context
- current contexthandler
- target handlerInterruptedException
- if interrupted while resolving this objectIOException
- if failed to resolve some entryExecutionScript.isResolved()
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.