Package com.atlassian.bamboo.author
Interface ExtendedAuthorManager
-
- All Superinterfaces:
AuthorManager
- All Known Implementing Classes:
HibernateAuthorManagerImpl
public interface ExtendedAuthorManager extends AuthorManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
createAndSaveAuthor(@NotNull Author author)
Creates and saves author given author, if bamboo user with the same username exists the new author will be linked to that user.@NotNull List<Author>
findAuthorsByName(@NotNull String authorSearchString)
Performs a case insensitive search for authors by their author name.@NotNull List<Author>
findAuthorsByUser(@NotNull String userSearchString)
Performs a case insensitive search for authors by their linkedUserName.@NotNull List<Author>
findAuthorsThatStartWith(@NotNull String authorSearchString, boolean unlinkedOnly)
Performs a case insensitive search for authors by their author name.@NotNull List<ResultsSummary>
findBuildResultsBrokenByAuthor(ExtendedAuthor author, int maxResultCount)
@NotNull List<ResultsSummary>
findBuildResultsFailedByAuthor(ExtendedAuthor author, int maxResultCount)
@NotNull List<ResultsSummary>
findBuildResultsFixedByAuthor(ExtendedAuthor author, int maxResultCount)
@NotNull List<ResultsSummary>
findBuildResultsSuccessfulByAuthor(ExtendedAuthor author, int maxResultCount)
@NotNull List<ResultsSummary>
findBuildResultsTriggeredByAuthor(ExtendedAuthor author, int maxResultCount)
@NotNull Collection<ResultsSummary>
findLatestBuildBrokenByAuthorInEachPlan(ExtendedAuthor author)
Retrieves the last build broken by author for all the plans.int
findNumberOfBuildBrokenByAuthor(ExtendedAuthor author)
int
findNumberOfBuildFixedByAuthor(ExtendedAuthor author)
int
findNumberOfBuildsTriggeredByAuthor(ExtendedAuthor author)
int
findNumberOfFailedBuildsByAuthor(ExtendedAuthor author)
int
findNumberOfSuccessfulBuildsByAuthor(ExtendedAuthor author)
List<ResultsSummary>
findRecentResultsTriggeredByAuthors(List<ExtendedAuthor> author, int maxDays)
Retrieve all build results triggered by the author in the last X days@NotNull Set<ExtendedAuthor>
getAllUnlinkedAuthors()
ExtendedAuthor
getAuthorById(long id)
@NotNull Set<Author>
getAuthorsByResultSummary(@NotNull ResultsSummary resultsSummary)
Retrieve unique set of authors that contributed to commits related to a given ResultsSummary@NotNull List<ExtendedAuthor>
getAvailableAuthors(@Nullable com.atlassian.user.User user)
Get authors available for a user.ExtendedAuthor
getExtendedAuthorByName(String name)
Get Author information by author name.@NotNull List<ExtendedAuthor>
getLinkedAuthorForUser(com.atlassian.user.User user)
void
relinkUnlinkedAuthors()
Attempt to link any authors that currently aren't linked with a user.void
removeAuthor(ExtendedAuthor extendedAuthor)
removes an authorvoid
saveAuthor(ExtendedAuthor author)
Save the authorvoid
unlinkAllAuthors()
Remove all author links.-
Methods inherited from interface com.atlassian.bamboo.author.AuthorManager
getAllAuthors, getAuthorByName
-
-
-
-
Method Detail
-
getAllUnlinkedAuthors
@NotNull @NotNull Set<ExtendedAuthor> getAllUnlinkedAuthors()
- Returns:
Set
ofExtendedAuthor
objects not linked to users
-
unlinkAllAuthors
void unlinkAllAuthors()
Remove all author links. Useful if you have changed user management systems
-
relinkUnlinkedAuthors
void relinkUnlinkedAuthors()
Attempt to link any authors that currently aren't linked with a user. Currently only checks for direct author/username matches
-
getExtendedAuthorByName
ExtendedAuthor getExtendedAuthorByName(String name)
Get Author information by author name. Author names in DB are kept trimmed, make sure that name param is trimmed as well- Parameters:
name
- trimmed author name- Returns:
ExtendedAuthor
with given name (assuming unique)
-
saveAuthor
void saveAuthor(ExtendedAuthor author)
Save the author- Parameters:
author
-
-
findBuildResultsTriggeredByAuthor
@NotNull @NotNull List<ResultsSummary> findBuildResultsTriggeredByAuthor(ExtendedAuthor author, int maxResultCount)
- Parameters:
author
-maxResultCount
- if <= 0 all the results are returned- Returns:
List
ofBuildResultsSummary
triggered by author
-
findRecentResultsTriggeredByAuthors
List<ResultsSummary> findRecentResultsTriggeredByAuthors(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 bymaxDays
- number of days to look back in history- Returns:
- all build results triggered by the author in the last X days
-
findBuildResultsFailedByAuthor
@NotNull @NotNull List<ResultsSummary> findBuildResultsFailedByAuthor(ExtendedAuthor author, int maxResultCount)
- Parameters:
author
-maxResultCount
- if <= 0 all the results are returned- Returns:
List
ofBuildResultsSummary
triggered by author and failed
-
findBuildResultsSuccessfulByAuthor
@NotNull @NotNull List<ResultsSummary> findBuildResultsSuccessfulByAuthor(ExtendedAuthor author, int maxResultCount)
- Parameters:
author
-maxResultCount
- if <= 0 all the results are returned- Returns:
List
ofBuildResultsSummary
triggered by author and successful
-
findBuildResultsBrokenByAuthor
@NotNull @NotNull List<ResultsSummary> findBuildResultsBrokenByAuthor(ExtendedAuthor author, int maxResultCount)
- Parameters:
author
-maxResultCount
- if <= 0 all the results are returned- Returns:
List
ofBuildResultsSummary
broken by author
-
findLatestBuildBrokenByAuthorInEachPlan
@NotNull @NotNull Collection<ResultsSummary> findLatestBuildBrokenByAuthorInEachPlan(ExtendedAuthor author)
Retrieves the last build broken by author for all the plans.- Parameters:
author
-- Returns:
List
ofBuildResultsSummary
broken by author
-
findBuildResultsFixedByAuthor
@NotNull @NotNull List<ResultsSummary> findBuildResultsFixedByAuthor(ExtendedAuthor author, int maxResultCount)
- Parameters:
author
-maxResultCount
- if <= 0 all the results are returned- Returns:
List
ofBuildResultsSummary
fixed by author
-
findNumberOfBuildsTriggeredByAuthor
int findNumberOfBuildsTriggeredByAuthor(ExtendedAuthor author)
- Parameters:
author
-- Returns:
- int
-
findNumberOfFailedBuildsByAuthor
int findNumberOfFailedBuildsByAuthor(ExtendedAuthor author)
- Parameters:
author
-- Returns:
- int
-
findNumberOfSuccessfulBuildsByAuthor
int findNumberOfSuccessfulBuildsByAuthor(ExtendedAuthor author)
- Parameters:
author
-- Returns:
- int
-
findNumberOfBuildFixedByAuthor
int findNumberOfBuildFixedByAuthor(ExtendedAuthor author)
- Parameters:
author
-- Returns:
- int
-
findNumberOfBuildBrokenByAuthor
int findNumberOfBuildBrokenByAuthor(ExtendedAuthor author)
- Parameters:
author
-- Returns:
- int
-
getAuthorById
ExtendedAuthor getAuthorById(long id)
- Parameters:
id
-- Returns:
Author
given id
-
getLinkedAuthorForUser
@NotNull @NotNull List<ExtendedAuthor> getLinkedAuthorForUser(com.atlassian.user.User user)
- Parameters:
user
-- Returns:
List
ofExtendedAuthor
linked to the user.
-
getAvailableAuthors
@NotNull @NotNull List<ExtendedAuthor> getAvailableAuthors(@Nullable @Nullable com.atlassian.user.User user)
Get authors available for a user. That includes all authors user is linked to and all unlinked authors.- Parameters:
user
- user- Returns:
- List of
ExtendedAuthor
-
removeAuthor
void removeAuthor(ExtendedAuthor extendedAuthor)
removes an author- Parameters:
extendedAuthor
-
-
createAndSaveAuthor
void createAndSaveAuthor(@NotNull @NotNull Author author)
Creates and saves author given author, if bamboo user with the same username exists the new author will be linked to that user.- Parameters:
author
-
-
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(@NotNull @NotNull 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 an user already- Returns:
- any authors who's author name match the given string.
-
findAuthorsByUser
@NotNull @NotNull List<Author> findAuthorsByUser(@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
-
-