Class DependencyImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.dependency.DependencyImpl
-
- All Implemented Interfaces:
Dependency,DependencyOptions,OptionSupport,OptionSupportEx
- Direct Known Subclasses:
UnresolvedDependency
public class DependencyImpl extends Object implements Dependency, OptionSupportEx
- Author:
- kir
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.serverSide.dependency.DependencyOptions
DependencyOptions.BuildContinuationMode
-
-
Field Summary
Fields Modifier and Type Field Description static StringUNRESOLVED_EXTERNAL_ID_PREFIX-
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 Modifier Constructor Description protectedDependencyImpl(ProjectManager projectManager, BuildTypeIdentifiersManager buildTypeIdentifiersManager, String internalId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DependencycreateCopy()Creates copy of this dependencybooleanequals(Object o)Option[]getChangedOptions()Return options with changed values, i.e.<T> TgetDeclaredOption(Option<T> option)Get option value declared in this BuildTypeSettingsSBuildTypegetDependOn()Returns the build configuration we're depend on.StringgetDependOnExternalId()StringgetDependOnId()<T> TgetOption(Option<T> option)Get option value<T> TgetOptionDefaultValue(Option<T> option)Collection<Option>getOptions()ControlDescriptiongetOptionSpec(Option option)Get option spec string.OptionSupportExgetOptionSupport()Collection<Option>getOwnOptions()Return options defined in this object, i.e.<T> OptionValue<T>getOwnOptionValue(Option<T> option)Get option value-spec pair.inthashCode()voidreadFrom(org.jdom.Element parentEl)<T> voidsetOption(Option<T> option, T value)Set option value, clears value if it is the same as default<T> voidsetOption(Option<T> option, T value, ControlDescription spec)Set option value and its specStringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.util.OptionSupportEx
getRawOptionSpec
-
-
-
-
Field Detail
-
UNRESOLVED_EXTERNAL_ID_PREFIX
public static final String UNRESOLVED_EXTERNAL_ID_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DependencyImpl
protected DependencyImpl(@NotNull ProjectManager projectManager, @NotNull BuildTypeIdentifiersManager buildTypeIdentifiersManager, @NotNull String internalId)
-
-
Method Detail
-
getDependOnId
@NotNull public String getDependOnId()
- Specified by:
getDependOnIdin interfaceDependency- Returns:
- internal id of build configuration we depend on
-
getDependOnExternalId
@NotNull public String getDependOnExternalId()
- Specified by:
getDependOnExternalIdin interfaceDependency- Returns:
- external id of build configuration we depend on
-
getDependOn
@Nullable public SBuildType getDependOn()
Description copied from interface:DependencyReturns the build configuration we're depend on. May return null if this dependency references non-existing configuration- Specified by:
getDependOnin interfaceDependency- Returns:
- see above
-
getOptionSupport
public OptionSupportEx getOptionSupport()
-
createCopy
public Dependency createCopy()
Description copied from interface:DependencyCreates copy of this dependency- Specified by:
createCopyin interfaceDependency- Returns:
- see above
-
getOption
@NotNull public <T> T getOption(@NotNull Option<T> option)Description copied from interface:OptionSupportGet option value- Specified by:
getOptionin interfaceOptionSupport- Parameters:
option- option to retrieve value for- Returns:
- value of the option. If value wasn't set, Option:getDefaultValue is returned
-
getOptionDefaultValue
@NotNull public <T> T getOptionDefaultValue(@NotNull Option<T> option)- Specified by:
getOptionDefaultValuein interfaceOptionSupport- Parameters:
option- option whose default value to return- Returns:
- default value for specified option
-
setOption
public <T> void setOption(@NotNull Option<T> option, @NotNull T value)Description copied from interface:OptionSupportSet option value, clears value if it is the same as default- Specified by:
setOptionin interfaceOptionSupport- Parameters:
option- option to set value forvalue- option value
-
getChangedOptions
@NotNull public Option[] getChangedOptions()
Description copied from interface:OptionSupportReturn options with changed values, i.e. options with non-default values- Specified by:
getChangedOptionsin interfaceOptionSupport- Returns:
- see above
-
getOwnOptions
@NotNull public Collection<Option> getOwnOptions()
Description copied from interface:OptionSupportReturn options defined in this object, i.e. options for which some value has been set usingOptionSupport.setOption(Option, Object)method.- Specified by:
getOwnOptionsin interfaceOptionSupport- Returns:
- see above
-
getOptions
@NotNull public Collection<Option> getOptions()
- Specified by:
getOptionsin interfaceOptionSupport- Returns:
- combined set of options - own and inherited
-
getOptionSpec
public ControlDescription getOptionSpec(@NotNull Option option)
Description copied from interface:OptionSupportExGet option spec string.
- Specified by:
getOptionSpecin interfaceOptionSupportEx- Returns:
-
setOption
public <T> void setOption(@NotNull Option<T> option, @Nullable T value, @Nullable ControlDescription spec)Description copied from interface:OptionSupportExSet option value and its spec
- Specified by:
setOptionin interfaceOptionSupportEx
-
readFrom
public void readFrom(@NotNull org.jdom.Element parentEl)- Specified by:
readFromin interfaceOptionSupportEx
-
getDeclaredOption
@Nullable public <T> T getDeclaredOption(Option<T> option)
Description copied from interface:OptionSupportGet option value declared in this BuildTypeSettings
- Specified by:
getDeclaredOptionin 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:OptionSupportExGet option value-spec pair. If the option is not defined - null is returned in OptionValue.getValue()
- Specified by:
getOwnOptionValuein interfaceOptionSupportEx- Returns:
-
-