Interface AuthorDao

    • Method Detail

      • getNumberOfBuildsTriggeredByAuthor

        int getNumberOfBuildsTriggeredByAuthor​(ExtendedAuthor author)
        Parameters:
        author -
        Returns:
        int
      • getNumberOfFailedBuildsByAuthor

        int getNumberOfFailedBuildsByAuthor​(ExtendedAuthor author)
        Parameters:
        author -
        Returns:
        int
      • getNumberOfSuccessfulBuildsByAuthor

        int getNumberOfSuccessfulBuildsByAuthor​(ExtendedAuthor author)
        Parameters:
        author -
        Returns:
        int
      • getNumberOfBuildFixedByAuthor

        int getNumberOfBuildFixedByAuthor​(ExtendedAuthor author)
        Parameters:
        author -
        Returns:
        int
      • getNumberOfBuildBrokenByAuthor

        int getNumberOfBuildBrokenByAuthor​(ExtendedAuthor author)
        Parameters:
        author -
        Returns:
        int
      • getLinkedAuthorsForUser

        @NotNull
        @NotNull List<ExtendedAuthor> getLinkedAuthorsForUser​(com.atlassian.user.User user)
        Parameters:
        user -
        Returns:
        List of ExtendedAuthor which are linked to a given user.
      • getRecentResultsTriggeredByAuthors

        List<ResultsSummary> getRecentResultsTriggeredByAuthors​(List<ExtendedAuthor> author,
                                                                int maxDays)
        Retrieve all build results triggered by the author in the last X days
        Parameters:
        author - the builds will be triggered by
        maxDays - number of days to look back in history
        Returns:
        all build results triggered by the author in the last X days
      • unlinkLinkedAuthors

        @Deprecated
        default void unlinkLinkedAuthors​(@NotNull
                                         @NotNull com.atlassian.user.User user)
        Deprecated.
        Removes the link between User and all Author entities, User was linked to
        Parameters:
        user - user
      • unlinkLinkedAuthors

        void unlinkLinkedAuthors​(@NotNull
                                 @NotNull String username)
        Removes all links between a user and author entities.
        Parameters:
        username - name of the user
      • updateLinkedAuthors

        void updateLinkedAuthors​(@NotNull
                                 @NotNull com.atlassian.user.User user,
                                 @NotNull
                                 @NotNull List<Long> authorIds)
        Updates list of Authors linked to a User. As a result of this operation only Authors with id listed in authorIds will be linked to user
        Parameters:
        user - user
        authorIds - list of Author id that should be linked to user
      • findAuthorsByName

        @NotNull
        @NotNull List<Author> findAuthorsByName​(@NotNull
                                                @NotNull String authorSearchString)
        Performs a case insensitive search for authors by their author name. AuthorSearchString can appear anywhere in the authors name.
        Parameters:
        authorSearchString - string to search for
        Returns:
        any authors who's author name match the given string.
      • findAuthorsThatStartWith

        @NotNull
        @NotNull List<Author> findAuthorsThatStartWith​(String authorSearchString,
                                                       boolean unlinkedOnly)
        Performs a case insensitive search for authors by their author name.
        Parameters:
        authorSearchString - string to search for
        unlinkedOnly - if true will only return users which have not been linked with a user already
        Returns:
        any authors who's author name match the given string.
      • findAuthorsByLinkedUser

        @NotNull
        @NotNull List<Author> findAuthorsByLinkedUser​(@NotNull
                                                      @NotNull String userSearchString)
        Performs a case insensitive search for authors by their linkedUserName. userSearchString can appear anywhere in the linked user name.
        Parameters:
        userSearchString - string to search for
        Returns:
        any authors who's linkedusername match the given string.
      • getAuthorsByResultSummary

        @NotNull
        @NotNull Set<Author> getAuthorsByResultSummary​(@NotNull
                                                       @NotNull ResultsSummary resultsSummary)
        Retrieve unique set of authors that contributed to commits related to a given ResultsSummary
        Parameters:
        resultsSummary - ResultsSummary
        Returns:
        list of authors