Class CompositeBranchSpec
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.CompositeBranchSpec
-
- All Implemented Interfaces:
BranchSpec
public class CompositeBranchSpec extends Object implements BranchSpec
A number of branch specs acting as one
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.vcs.BranchSpec
ALLOW_DEFAULT_BRANCH, FALLBACK_TO_DEFAULT
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RepositoryStateapply(RepositoryState state)Apply this spec to the given repository stateStringasString()Returns a string representation of this branch spec.booleanequals(Object obj)StringgetLogicalBranchName(String vcsBranchName)Returns a logical name for given vcs branch name or null if branch spec doesn't match given vcs branchSet<String>getLogicalBranchNames(RepositoryState state)Returns set of logical branch names for given state.<T> TgetOption(Option<T> option)Returns value of the specified option or its default value if such option is not specified in this specStringgetVcsBranchName(RepositoryState state, String logicalBranchName)Maps logical branch name to VCS branch name understandable by VCS plugin.Map<String,String>getVcsBranchNames(RepositoryState state, Collection<String> logicalBranchNames)Returns map of logical branch name to corresponding VCS branch name.inthashCode()booleanisEmpty()StringtoString()
-
-
-
Method Detail
-
apply
@NotNull public RepositoryState apply(@NotNull RepositoryState state)
Description copied from interface:BranchSpecApply this spec to the given repository state- Specified by:
applyin interfaceBranchSpec- Parameters:
state- repository state of interest- Returns:
- repository state containing only branches matched by this spec
-
getVcsBranchName
@Nullable public String getVcsBranchName(@NotNull RepositoryState state, @NotNull String logicalBranchName)
Description copied from interface:BranchSpecMaps logical branch name to VCS branch name understandable by VCS plugin. Returns null if vcs branch name was not found.- Specified by:
getVcsBranchNamein interfaceBranchSpec- Parameters:
state- repository state of interestlogicalBranchName- logical branch name- Returns:
- see above
-
getVcsBranchNames
@NotNull public Map<String,String> getVcsBranchNames(@NotNull RepositoryState state, @NotNull Collection<String> logicalBranchNames)
Description copied from interface:BranchSpecReturns map of logical branch name to corresponding VCS branch name.- Specified by:
getVcsBranchNamesin interfaceBranchSpec- Parameters:
state- repository state of interestlogicalBranchNames- logical branch names- Returns:
- see above
-
getLogicalBranchNames
@NotNull public Set<String> getLogicalBranchNames(@NotNull RepositoryState state)
Description copied from interface:BranchSpecReturns set of logical branch names for given state. This set doesn't include default branch name.- Specified by:
getLogicalBranchNamesin interfaceBranchSpec- Parameters:
state- repository state of interest- Returns:
- see above
-
getLogicalBranchName
@Nullable public String getLogicalBranchName(@NotNull String vcsBranchName)
Description copied from interface:BranchSpecReturns a logical name for given vcs branch name or null if branch spec doesn't match given vcs branch- Specified by:
getLogicalBranchNamein interfaceBranchSpec- Parameters:
vcsBranchName- vcs branch name of interest- Returns:
- see above
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceBranchSpec- Returns:
- true if this branch spec is empty, i.e. does not include any branch
-
asString
@NotNull public String asString()
Description copied from interface:BranchSpecReturns a string representation of this branch spec. Branch spec can be re-created from string representation usingBranchSpecs#parse(String)- Specified by:
asStringin interfaceBranchSpec- Returns:
- see above
-
getOption
@NotNull public <T> T getOption(@NotNull Option<T> option)Description copied from interface:BranchSpecReturns value of the specified option or its default value if such option is not specified in this spec- Specified by:
getOptionin interfaceBranchSpec- Parameters:
option- option of interest- Returns:
- see above
-
-