Package com.atlassian.bamboo.author
Interface AuthorDao
- All Superinterfaces:
BambooObjectDao<ExtendedAuthor>
- All Known Implementing Classes:
AuthorHibernateDao
-
Method Summary
Modifier and TypeMethodDescription@NotNull Collection<? extends ExtendedAuthor> findAll()Get allExtendedAuthorentitiesfindAuthorsByLinkedUser(@NotNull String userSearchString) Performs a case insensitive search for authors by their linkedUserName.findAuthorsByName(@NotNull String authorSearchString) Performs a case insensitive search for authors by their author name.findAuthorsThatStartWith(String authorSearchString, boolean unlinkedOnly) Performs a case insensitive search for authors by their author name.@Nullable ExtendedAuthorfindById(long id) Find anExtendedAuthorobject of a given id.@NotNull Set<ExtendedAuthor> @Nullable ExtendedAuthorgetAuthorByName(String name) getAuthorsByResultSummary(@NotNull ResultsSummary resultsSummary) Retrieve unique set of authors that contributed to commits related to a given ResultsSummary@NotNull List<ResultsSummary> getBuildResultsBrokenByAuthor(ExtendedAuthor author, int maxResultCount) @NotNull List<ResultsSummary> getBuildResultsFailedByAuthor(ExtendedAuthor author, int maxResultCount) @NotNull List<ResultsSummary> getBuildResultsFixedByAuthor(ExtendedAuthor author, int maxResultCount) @NotNull List<ResultsSummary> getBuildResultsSuccessfulByAuthor(ExtendedAuthor author, int maxResultCount) @NotNull List<ResultsSummary> getBuildResultsTriggeredByAuthor(ExtendedAuthor author, int maxResultCount) @NotNull List<ExtendedAuthor> getLinkedAuthorsForUser(com.atlassian.user.User user) intintintintintgetRecentResultsTriggeredByAuthors(List<ExtendedAuthor> author, int maxDays) Retrieve all build results triggered by the author in the last X daysdefault voidunlinkLinkedAuthors(@NotNull com.atlassian.user.User user) Deprecated.voidunlinkLinkedAuthors(@NotNull String username) Removes all links between a user and author entities.voidupdateLinkedAuthors(@NotNull com.atlassian.user.User user, @NotNull List<Long> authorIds) Updates list of Authors linked to a User.
-
Method Details
-
findById
Find anExtendedAuthorobject of a given id.- Parameters:
id- id ofAuthorto be found- Returns:
ExtendedAuthorobject or null if not found
-
findAll
Get allExtendedAuthorentities- Returns:
- Collection of
ExtendedAuthor
-
getAuthorByName
- Parameters:
name-- Returns:
- a
ExtendedAuthorobject given an author name
-
getBuildResultsTriggeredByAuthor
@NotNull @NotNull List<ResultsSummary> getBuildResultsTriggeredByAuthor(ExtendedAuthor author, int maxResultCount) - Parameters:
author-maxResultCount-- Returns:
ListofBuildResultsSummarytriggered by author
-
getBuildResultsFailedByAuthor
@NotNull @NotNull List<ResultsSummary> getBuildResultsFailedByAuthor(ExtendedAuthor author, int maxResultCount) - Parameters:
author-maxResultCount-- Returns:
ListofBuildResultsSummarytriggered by author and failed
-
getBuildResultsSuccessfulByAuthor
@NotNull @NotNull List<ResultsSummary> getBuildResultsSuccessfulByAuthor(ExtendedAuthor author, int maxResultCount) - Parameters:
author-maxResultCount-- Returns:
ListofBuildResultsSummarytriggered by author and succesful
-
getBuildResultsBrokenByAuthor
@NotNull @NotNull List<ResultsSummary> getBuildResultsBrokenByAuthor(ExtendedAuthor author, int maxResultCount) - Parameters:
author-maxResultCount-- Returns:
ListofBuildResultsSummarybroken by author
-
getBuildResultsFixedByAuthor
@NotNull @NotNull List<ResultsSummary> getBuildResultsFixedByAuthor(ExtendedAuthor author, int maxResultCount) - Parameters:
author-maxResultCount-- Returns:
ListofBuildResultsSummaryfixed by author
-
getNumberOfBuildsTriggeredByAuthor
- Parameters:
author-- Returns:
- int
-
getNumberOfFailedBuildsByAuthor
- Parameters:
author-- Returns:
- int
-
getNumberOfSuccessfulBuildsByAuthor
- Parameters:
author-- Returns:
- int
-
getNumberOfBuildFixedByAuthor
- Parameters:
author-- Returns:
- int
-
getNumberOfBuildBrokenByAuthor
- Parameters:
author-- Returns:
- int
-
getAllUnlinkedAuthors
- Returns:
SetofExtendedAuthorwhich are not yet linked to any user.
-
getLinkedAuthorsForUser
- Parameters:
user-- Returns:
ListofExtendedAuthorwhich are linked to a given user.
-
getRecentResultsTriggeredByAuthors
Retrieve all build results triggered by the author in the last X days- Parameters:
author- the builds will be triggered bymaxDays- number of days to look back in history- Returns:
- all build results triggered by the author in the last X days
-
unlinkLinkedAuthors
Deprecated.since 6.8 useunlinkLinkedAuthors(String)Removes the link between User and all Author entities, User was linked to- Parameters:
user- user
-
unlinkLinkedAuthors
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 onlyAuthors with id listed in authorIds will be linked to user- Parameters:
user- userauthorIds- list ofAuthorid that should be linked to user
-
findAuthorsByName
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 forunlinkedOnly- 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
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
-
unlinkLinkedAuthors(String)