Interface BranchAttributesDataProvider

    • Method Detail

      • getId

        @NotNull
        String getId()
        Returns:
        id of the current provider. This id should be unique among all providers and will be used in branch filters as identifier for this provider
      • accepts

        boolean accepts​(@NotNull
                        String logicalBranchName,
                        @NotNull
                        BranchAttributesContext branchContext,
                        @Nullable
                        Map<String,​String> attributes)
        Parameters:
        logicalBranchName -
        branchContext - a context calculated for the branch
        attributes - a map of name value pairs, all names should be supported by the provider
        Returns:
        true if the given branch has all the provided attributes in the given context
      • validate

        @Nullable
        String validate​(@Nullable
                        Map<String,​String> attributes)
        Returns:
        null if attributes valid, or the reason why the attributes are incorrect
      • precalculateContextForFiltering

        @Nullable
        BranchAttributesPrecalculationContext precalculateContextForFiltering​(@NotNull
                                                                              SBuildType buildType)
        Returns:
        a precalculation context which might be helpful when calculating branch context. This context is not always calculated for the filtered branch, only in some cases when multiple branches are being filtered