Class BaseFilteredBranch
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.BranchImpl
-
- jetbrains.buildServer.serverSide.impl.BaseFilteredBranch
-
- All Implemented Interfaces:
Branch
,FilteredBranch
- Direct Known Subclasses:
AbstractBuildTypeBranch
public class BaseFilteredBranch extends BranchImpl implements FilteredBranch
-
-
Field Summary
Fields Modifier and Type Field Description protected BuildTypeEx
myBuildType
-
Fields inherited from interface jetbrains.buildServer.serverSide.Branch
DEFAULT_BRANCH_NAME, UNSPECIFIED_BRANCH_NAME
-
-
Constructor Summary
Constructors Constructor Description BaseFilteredBranch(String branchName, String displayName, BuildTypeEx buildType, BranchFilterContext precalcFilterContext)
BaseFilteredBranch(String branchName, BuildTypeEx buildType)
BaseFilteredBranch(String branchName, BuildTypeEx buildType, BranchFilterContext precalcFilterContext)
BaseFilteredBranch(BranchEx branch, BranchFilterContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FilteredBranch
fromBranchEx(BranchEx branch, BranchFilterContext context)
static Branch
fromBuild(BuildPromotion promotion, BranchFilterContext context)
SBuildType
getBuildType()
BranchFilterContext
getPrecalcContext()
FilteredBranch
withPrecalcContext(BranchFilterContext context)
If the branch is supposed to be stored somewhere, it is better to use temporary branch withfromBranchEx(BranchEx, BranchFilterContext)
, in order to allow the context to be collected by garbage collector-
Methods inherited from class jetbrains.buildServer.serverSide.impl.BranchImpl
equals, getDisplayName, getName, hashCode, isDefaultBranch, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.Branch
getDisplayName, getName, isDefaultBranch
-
-
-
-
Field Detail
-
myBuildType
@NotNull protected final BuildTypeEx myBuildType
-
-
Constructor Detail
-
BaseFilteredBranch
public BaseFilteredBranch(@NotNull BranchEx branch, @NotNull BranchFilterContext context)
-
BaseFilteredBranch
public BaseFilteredBranch(@NotNull String branchName, @NotNull BuildTypeEx buildType)
-
BaseFilteredBranch
public BaseFilteredBranch(@NotNull String branchName, @NotNull BuildTypeEx buildType, @Nullable BranchFilterContext precalcFilterContext)
-
BaseFilteredBranch
public BaseFilteredBranch(@NotNull String branchName, @NotNull String displayName, @NotNull BuildTypeEx buildType, @Nullable BranchFilterContext precalcFilterContext)
-
-
Method Detail
-
fromBranchEx
public static FilteredBranch fromBranchEx(@NotNull BranchEx branch, @Nullable BranchFilterContext context)
-
fromBuild
@Nullable public static Branch fromBuild(BuildPromotion promotion, @Nullable BranchFilterContext context)
-
getBuildType
@NotNull public SBuildType getBuildType()
- Specified by:
getBuildType
in interfaceFilteredBranch
- Returns:
- Build type that was used to calculate the logical branch name
-
getPrecalcContext
@Nullable public BranchFilterContext getPrecalcContext()
- Specified by:
getPrecalcContext
in interfaceFilteredBranch
- Returns:
- an optional context calculated for this branch before applying filter.
This context can be calculated for branches with
BranchSpecsImpl.precalculateForFiltering(SBuildType, BranchFilter)
-
withPrecalcContext
public FilteredBranch withPrecalcContext(@Nullable BranchFilterContext context)
If the branch is supposed to be stored somewhere, it is better to use temporary branch withfromBranchEx(BranchEx, BranchFilterContext)
, in order to allow the context to be collected by garbage collector- Specified by:
withPrecalcContext
in interfaceFilteredBranch
- Parameters:
context
- optional context that can speed up filtering for attribute filters- Returns:
- the same branch with the context set, if the branch is to be stored somewhere, then it is recommended to create a new temporary branch for filtering, so that the context can be garbage collected after filtering is done
-
-