Package jetbrains.buildServer.vcs.spec
Class BranchSpecsImpl
- java.lang.Object
-
- jetbrains.buildServer.vcs.spec.BranchSpecsImpl
-
- All Implemented Interfaces:
BranchSpecsEx,BranchSpecs
public class BranchSpecsImpl extends Object implements BranchSpecsEx
- Author:
- dmitry.neverov
-
-
Constructor Summary
Constructors Constructor Description BranchSpecsImpl(BranchAttributesFilterManager branchAttributesFilterManager, ExtensionHolder extensionHolder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BranchSpeccreateDefault()BranchFiltercreateFilter(String filterSpec)BranchFiltercreateFilter(String filterSpec, boolean filterAttributesAllowed, BranchSpecParserSettings settings)BranchFiltercreateFilter(String filterSpec, BranchSpecParserSettings settings)BranchSpecparse(String spec)BranchFilterContextprecalculateForFiltering(SBuildType buildType, BranchFilter filter)Should be used if multiple branches are supposed to be filteredvoidvalidate(String spec)voidvalidate(String spec, boolean extendedSyntax)voidvalidate(String spec, boolean extendedSyntax, boolean attributesFilterAllowed)StringvalidateBranchFilterProperty(String filterValue, boolean attributeFiltersAllowed)
-
-
-
Constructor Detail
-
BranchSpecsImpl
public BranchSpecsImpl(@Nullable BranchAttributesFilterManager branchAttributesFilterManager, @NotNull ExtensionHolder extensionHolder)
-
-
Method Detail
-
createFilter
@NotNull public BranchFilter createFilter(@NotNull String filterSpec) throws InvalidBranchSpecException
- Specified by:
createFilterin interfaceBranchSpecs- Throws:
InvalidBranchSpecException
-
createFilter
@NotNull public BranchFilter createFilter(@NotNull String filterSpec, @NotNull BranchSpecParserSettings settings) throws InvalidBranchSpecException
- Specified by:
createFilterin interfaceBranchSpecs- Throws:
InvalidBranchSpecException
-
createFilter
@NotNull public BranchFilter createFilter(@NotNull String filterSpec, boolean filterAttributesAllowed, @Nullable BranchSpecParserSettings settings)
- Specified by:
createFilterin interfaceBranchSpecsfilterAttributesAllowed- true if attributes filters are allowed for this branch filter
-
precalculateForFiltering
@Nullable public BranchFilterContext precalculateForFiltering(@NotNull SBuildType buildType, @NotNull BranchFilter filter)
Description copied from interface:BranchSpecsExShould be used if multiple branches are supposed to be filtered- Specified by:
precalculateForFilteringin interfaceBranchSpecsEx- Returns:
- context for further branch filtering, or null if the context is not needed
-
validateBranchFilterProperty
public String validateBranchFilterProperty(@Nullable String filterValue, boolean attributeFiltersAllowed)
- Specified by:
validateBranchFilterPropertyin interfaceBranchSpecsEx- Parameters:
filterValue- a branch filter value used in some settingsattributeFiltersAllowed- true if attribute filters are allowed in the settings they are used in- Returns:
- error as string if the provided branch filter value is incorrect, always returns null if parameter references are used
-
createDefault
@NotNull public BranchSpec createDefault()
- Specified by:
createDefaultin interfaceBranchSpecs
-
parse
@NotNull public BranchSpec parse(@Nullable String spec) throws InvalidBranchSpecException
- Specified by:
parsein interfaceBranchSpecs- Throws:
InvalidBranchSpecException
-
validate
public void validate(@Nullable String spec) throws InvalidBranchSpecException- Specified by:
validatein interfaceBranchSpecs- Throws:
InvalidBranchSpecException
-
validate
public void validate(@Nullable String spec, boolean extendedSyntax) throws InvalidBranchSpecException- Specified by:
validatein interfaceBranchSpecs- Parameters:
spec- branch specification to validateextendedSyntax- if true spec allows usage of brackets, if false, only simple spec is allowed- Throws:
InvalidBranchSpecException
-
validate
public void validate(@Nullable String spec, boolean extendedSyntax, boolean attributesFilterAllowed) throws InvalidBranchSpecException- Specified by:
validatein interfaceBranchSpecsattributesFilterAllowed- indicates if attributes branch filter syntax is allowed in the branch filter- Throws:
InvalidBranchSpecException
-
-