public final class FlowScript extends Object
Modifier and Type | Field and Description |
---|---|
static String |
KEY_BLOCKERS
A configuration key name of blockers' ID.
|
static String |
KEY_CLASS_NAME
A configuration key name of
class name . |
static String |
KEY_ENABLED_SCRIPT_KINDS
A configuration key name of enabled
script kinds . |
static String |
KEY_ENV_PREFIX
The configuration key prefix of
environment variables . |
static String |
KEY_FLOW_PREFIX
A configuration key prefix of each flow.
|
static String |
KEY_ID
A configuration key name of IDs.
|
static String |
KEY_KIND
A configuration key name of
script kind . |
static String |
KEY_MODULE
A configuration key name of
module name . |
static String |
KEY_PROFILE
A configuration key name of
profile name . |
static String |
KEY_SUPPORTED_EXTENSIONS
A configuration key name of
supported extensions . |
Constructor and Description |
---|
FlowScript(String id,
Set<String> blockerIds,
Map<ExecutionPhase,? extends Collection<? extends ExecutionScript>> scripts)
Deprecated.
Use
FlowScript(String, Set, Map, Set) instead |
FlowScript(String id,
Set<String> blockerIds,
Map<ExecutionPhase,? extends Collection<? extends ExecutionScript>> scripts,
Set<ExecutionScript.Kind> enables)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static Set<String> |
extractFlowIds(Properties properties)
Returns all flow IDs defined in the properties.
|
Set<String> |
getBlockerIds()
Returns the ID of this flow execution.
|
Set<ExecutionScript.Kind> |
getEnabledScriptKinds()
Returns the enabled script kinds in this flow execution.
|
String |
getId()
Returns the ID of this flow.
|
Map<ExecutionPhase,Set<ExecutionScript>> |
getScripts()
Returns the execution scripts for each
ExecutionPhase . |
int |
hashCode() |
static FlowScript |
load(Properties properties,
String flowId)
Loads a
FlowScript with the specified ID. |
static Set<ExecutionScript> |
load(Properties properties,
String flowId,
ExecutionPhase phase)
Loads a
ExecutionScript s in the specified flow and phase. |
void |
storeTo(Properties properties)
Stores this script into the specified object.
|
String |
toString() |
public static final String KEY_FLOW_PREFIX
public static final String KEY_ID
public static final String KEY_BLOCKERS
public static final String KEY_KIND
script kind
.public static final String KEY_CLASS_NAME
class name
.public static final String KEY_PROFILE
profile name
.public static final String KEY_MODULE
module name
.public static final String KEY_SUPPORTED_EXTENSIONS
supported extensions
.public static final String KEY_ENABLED_SCRIPT_KINDS
script kinds
.public static final String KEY_ENV_PREFIX
environment variables
.@Deprecated public FlowScript(String id, Set<String> blockerIds, Map<ExecutionPhase,? extends Collection<? extends ExecutionScript>> scripts)
FlowScript(String, Set, Map, Set)
insteadid
- the flow IDblockerIds
- the predecessors' flow IDscripts
- the execution scripts for each ExecutionPhase
IllegalArgumentException
- if some parameters were null
public FlowScript(String id, Set<String> blockerIds, Map<ExecutionPhase,? extends Collection<? extends ExecutionScript>> scripts, Set<ExecutionScript.Kind> enables)
id
- the flow IDblockerIds
- the predecessors' flow IDscripts
- the execution scripts for each ExecutionPhase
enables
- the enabled script kindsIllegalArgumentException
- if some parameters were null
public String getId()
public Set<String> getBlockerIds()
public Set<ExecutionScript.Kind> getEnabledScriptKinds()
public Map<ExecutionPhase,Set<ExecutionScript>> getScripts()
ExecutionPhase
.
If some phase has no scripts, then the related entry contains an empty list.public static FlowScript load(Properties properties, String flowId)
FlowScript
with the specified ID.properties
- source propertiesflowId
- the target flow IDIllegalArgumentException
- if script is invalid, or some parameters were null
extractFlowIds(Properties)
public static Set<ExecutionScript> load(Properties properties, String flowId, ExecutionPhase phase)
ExecutionScript
s in the specified flow and phase.
If the target phase is empty in the specified flow, this returns an empty list.
Note that this method will raise an exception if the specified flow does not exist.properties
- source propertiesflowId
- the target flow IDphase
- the target phaseIllegalArgumentException
- if script is invalid, or some parameters were null
extractFlowIds(Properties)
public static Set<String> extractFlowIds(Properties properties)
properties
- target propertiesIllegalArgumentException
- if some parameters were null
public void storeTo(Properties properties)
properties
- target propertiesIllegalArgumentException
- if some parameters were null
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.