Package jetbrains.buildServer.util
Class DependencyOptionSupportImpl
- java.lang.Object
-
- jetbrains.buildServer.util.DependencyOptionSupportImpl
-
- All Implemented Interfaces:
DependencyOptions
,OptionSupport
,OptionSupportEx
public class DependencyOptionSupportImpl extends Object implements OptionSupportEx, DependencyOptions
User: kir
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.serverSide.dependency.DependencyOptions
DependencyOptions.BuildContinuationMode
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.serverSide.dependency.DependencyOptions
RUN_BUILD_IF_DEPENDENCY_FAILED, RUN_BUILD_IF_DEPENDENCY_FAILED_TO_START, RUN_BUILD_ON_THE_SAME_AGENT, SYNCHRONIZE_REVISIONS, TAKE_STARTED_BUILD_WITH_SAME_REVISIONS, TAKE_SUCCESSFUL_BUILDS_ONLY
-
-
Constructor Summary
Constructors Constructor Description DependencyOptionSupportImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Option[]
getChangedOptions()
Return options with changed values, i.e.<T> T
getDeclaredOption(Option<T> option)
Get option value declared in this BuildTypeSettings<T> T
getOption(Option<T> option)
Get option value<T> T
getOptionDefaultValue(Option<T> option)
Collection<Option>
getOptions()
Collection<Option>
getOwnOptions()
Return options defined in this object, i.e.<T> OptionValue<T>
getOwnOptionValue(Option<T> option)
Get option value-spec pair.void
readFrom(org.jdom.Element parentElement)
void
reset()
<T> void
setOption(Option<T> option, T value)
Set option value, clears value if it is the same as default<T> void
setOption(Option<T> option, T value, ControlDescription spec)
Set option value and its specString
toString()
void
writeTo(org.jdom.Element parentElement)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.util.OptionSupportEx
getOptionSpec, getRawOptionSpec
-
-
-
-
Method Detail
-
getOption
@NotNull public <T> T getOption(@NotNull Option<T> option)
Description copied from interface:OptionSupport
Get option value- Specified by:
getOption
in interfaceOptionSupport
- Parameters:
option
- option to retrieve value for- Returns:
- value of the option. If value wasn't set, Option:getDefaultValue is returned
-
setOption
public <T> void setOption(@NotNull Option<T> option, @Nullable T value, @Nullable ControlDescription spec)
Description copied from interface:OptionSupportEx
Set option value and its spec
- Specified by:
setOption
in interfaceOptionSupportEx
-
setOption
public <T> void setOption(@NotNull Option<T> option, @NotNull T value)
Description copied from interface:OptionSupport
Set option value, clears value if it is the same as default- Specified by:
setOption
in interfaceOptionSupport
- Parameters:
option
- option to set value forvalue
- option value
-
getOptionDefaultValue
@NotNull public <T> T getOptionDefaultValue(@NotNull Option<T> option)
- Specified by:
getOptionDefaultValue
in interfaceOptionSupport
- Parameters:
option
- option whose default value to return- Returns:
- default value for specified option
-
getChangedOptions
@NotNull public Option[] getChangedOptions()
Description copied from interface:OptionSupport
Return options with changed values, i.e. options with non-default values- Specified by:
getChangedOptions
in interfaceOptionSupport
- Returns:
- see above
-
reset
public void reset()
-
getOwnOptions
@NotNull public Collection<Option> getOwnOptions()
Description copied from interface:OptionSupport
Return options defined in this object, i.e. options for which some value has been set usingOptionSupport.setOption(Option, Object)
method.- Specified by:
getOwnOptions
in interfaceOptionSupport
- Returns:
- see above
-
getDeclaredOption
@Nullable public <T> T getDeclaredOption(Option<T> option)
Description copied from interface:OptionSupport
Get option value declared in this BuildTypeSettings
- Specified by:
getDeclaredOption
in interfaceOptionSupport
- Parameters:
option
- option to retrieve value for- Returns:
- value of the option. If value wasn't set, null is returned
-
getOwnOptionValue
@Nullable public <T> OptionValue<T> getOwnOptionValue(@NotNull Option<T> option)
Description copied from interface:OptionSupportEx
Get option value-spec pair. If the option is not defined - null is returned in OptionValue.getValue()
- Specified by:
getOwnOptionValue
in interfaceOptionSupportEx
- Returns:
-
getOptions
@NotNull public Collection<Option> getOptions()
- Specified by:
getOptions
in interfaceOptionSupport
- Returns:
- combined set of options - own and inherited
-
readFrom
public void readFrom(@NotNull org.jdom.Element parentElement)
- Specified by:
readFrom
in interfaceOptionSupportEx
-
writeTo
public void writeTo(org.jdom.Element parentElement)
-
-