public final class ExecutionOptions extends Object
ExecutionFlag
instances which can be either true or falseThe options map can be used to pass user-defined or provider-specific options. The ExecutionOptions are made
available as part of the ExecutionEnvironment
during engine execution.
Instances of ExecutionOptions are not safe for use by multiple threads.
Constructor and Description |
---|
ExecutionOptions()
Construct an empty set of execution options.
|
ExecutionOptions(ExecutionOptions executionOptions)
Constructs a new set of execution options, initialized with all options
and flags copied from the given set of execution options.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getFlag(ExecutionFlag flag)
Returns the value the given flag.
|
Map<ExecutionFlag,Boolean> |
getFlags()
Returns an immutable map of the flags that have been set on this object.
|
String |
getOption(String optionName)
Returns the value for the option with the given name, or null
if the option is not set.
|
Map<String,String> |
getOptions()
Returns an immutable map of the options that have been set on this object.
|
boolean |
isFlagSet(ExecutionFlag flag)
Checks whether or not the given flag is set.
|
boolean |
isOptionSet(String optionName)
Checks whether or not the option with the given name has been set.
|
ExecutionOptions |
removeFlag(ExecutionFlag flag)
Removes the specified flag (if it has been set) from the set of execution options.
|
ExecutionOptions |
removeOption(String optionName)
Removes the option with the specified name (if it has been set) from the set
of execution options.
|
ExecutionOptions |
setFlag(ExecutionFlag flag,
boolean value)
Sets the value for the given flag to the given boolean value.
|
ExecutionOptions |
setOption(String optionName,
String value)
Sets the value for the given option name to the given value.
|
public ExecutionOptions()
public ExecutionOptions(ExecutionOptions executionOptions)
executionOptions
- the execution options from which to copy into the newly created instance.
If the given execution options are null, then this constructor is equivalent to ExecutionOptions()
public ExecutionOptions setFlag(ExecutionFlag flag, boolean value)
flag
- the flag to setvalue
- the flag value to setIllegalArgumentException
- if the given flag is nullpublic ExecutionOptions setOption(String optionName, String value)
optionName
- the name of the option to setvalue
- the value of the option to setIllegalArgumentException
- if the given optionName is blankpublic ExecutionOptions removeFlag(ExecutionFlag flag)
flag
- the flag to removeIllegalArgumentException
- if the given flag is nullpublic ExecutionOptions removeOption(String optionName)
optionName
- the name of the option to removeIllegalArgumentException
- if the given optionName is blankpublic boolean getFlag(ExecutionFlag flag)
ExecutionFlag.getDefaultValue()
will be returned.flag
- the flag to checkIllegalArgumentException
- if the given flag is nullpublic String getOption(String optionName)
optionName
- the name of the option for which to retrieve the valueIllegalArgumentException
- if the given optionName is blankpublic boolean isFlagSet(ExecutionFlag flag)
flag
- the flag to checkIllegalArgumentException
- if the given flag is nullpublic boolean isOptionSet(String optionName)
optionName
- the name of the option to checkIllegalArgumentException
- if the given optionName is blankpublic Map<ExecutionFlag,Boolean> getFlags()
public Map<String,String> getOptions()
Copyright © 2005–2015 The Kuali Foundation. All rights reserved.