com.atlassian.bamboo.author
Interface ExtendedAuthorManager

All Superinterfaces:
AuthorManager
All Known Implementing Classes:
HibernateAuthorManagerImpl

public interface ExtendedAuthorManager
extends AuthorManager


Method Summary
 void createAndSaveAuthor(java.lang.String authorName)
          Creates and saves author given authorName, if bamboo user with the same username exists the new author will be linked to that user.
 java.util.List<ResultsSummary> findBuildResultsBrokenByAuthor(ExtendedAuthor author, int maxResultCount)
           
 java.util.List<ResultsSummary> findBuildResultsFailedByAuthor(ExtendedAuthor author, int maxResultCount)
           
 java.util.List<ResultsSummary> findBuildResultsFixedByAuthor(ExtendedAuthor author, int maxResultCount)
           
 java.util.List<ResultsSummary> findBuildResultsSuccessfulByAuthor(ExtendedAuthor author, int maxResultCount)
           
 java.util.List<ResultsSummary> findBuildResultsTriggeredByAuthor(ExtendedAuthor author, int maxResultCount)
           
 java.util.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)
           
 java.util.List<ResultsSummary> findRecentResultsTriggeredByAuthors(java.util.List<ExtendedAuthor> author, int maxDays)
          Retrieve all build results triggered by the author in the last X days
 java.util.Set<ExtendedAuthor> getAllUnlinkedAuthors()
           
 ExtendedAuthor getAuthorById(long id)
           
 java.util.List<ExtendedAuthor> getAvailableAuthors(com.atlassian.user.User user)
          Get authors available for a user.
 ExtendedAuthor getExtendedAuthorByName(java.lang.String name)
           
 java.util.List<ExtendedAuthor> getLinkedAuthorForUser(com.atlassian.user.User user)
           
 void removeAuthor(ExtendedAuthor extendedAuthor)
          removes an author
 void saveAuthor(ExtendedAuthor author)
          Save the author
 
Methods inherited from interface com.atlassian.bamboo.author.AuthorManager
getAllAuthors, getAuthorByName
 

Method Detail

getAllUnlinkedAuthors

@NotNull
java.util.Set<ExtendedAuthor> getAllUnlinkedAuthors()
Returns:
Set of ExtendedAuthor objects not linked to users

getExtendedAuthorByName

ExtendedAuthor getExtendedAuthorByName(java.lang.String name)
Parameters:
name -
Returns:
ExtendedAuthor with given name (assuming unique)

saveAuthor

void saveAuthor(ExtendedAuthor author)
Save the author

Parameters:
author -

findBuildResultsTriggeredByAuthor

@NotNull
java.util.List<ResultsSummary> findBuildResultsTriggeredByAuthor(ExtendedAuthor author,
                                                                         int maxResultCount)
Parameters:
author -
maxResultCount - if <= 0 all the results are returned
Returns:
List of BuildResultsSummary triggered by author

findRecentResultsTriggeredByAuthors

java.util.List<ResultsSummary> findRecentResultsTriggeredByAuthors(java.util.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

findBuildResultsFailedByAuthor

@NotNull
java.util.List<ResultsSummary> findBuildResultsFailedByAuthor(ExtendedAuthor author,
                                                                      int maxResultCount)
Parameters:
author -
maxResultCount - if <= 0 all the results are returned
Returns:
List of BuildResultsSummary triggered by author and failed

findBuildResultsSuccessfulByAuthor

@NotNull
java.util.List<ResultsSummary> findBuildResultsSuccessfulByAuthor(ExtendedAuthor author,
                                                                          int maxResultCount)
Parameters:
author -
maxResultCount - if <= 0 all the results are returned
Returns:
List of BuildResultsSummary triggered by author and successful

findBuildResultsBrokenByAuthor

@NotNull
java.util.List<ResultsSummary> findBuildResultsBrokenByAuthor(ExtendedAuthor author,
                                                                      int maxResultCount)
Parameters:
author -
maxResultCount - if <= 0 all the results are returned
Returns:
List of BuildResultsSummary broken by author

findLatestBuildBrokenByAuthorInEachPlan

@NotNull
java.util.Collection<ResultsSummary> findLatestBuildBrokenByAuthorInEachPlan(ExtendedAuthor author)
Retrieves the last build broken by author for all the plans.

Parameters:
author -
Returns:
List of BuildResultsSummary broken by author

findBuildResultsFixedByAuthor

@NotNull
java.util.List<ResultsSummary> findBuildResultsFixedByAuthor(ExtendedAuthor author,
                                                                     int maxResultCount)
Parameters:
author -
maxResultCount - if <= 0 all the results are returned
Returns:
List of BuildResultsSummary 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
java.util.List<ExtendedAuthor> getLinkedAuthorForUser(com.atlassian.user.User user)
Parameters:
user -
Returns:
List of ExtendedAuthor linked to the user.

getAvailableAuthors

@NotNull
java.util.List<ExtendedAuthor> getAvailableAuthors(@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(java.lang.String authorName)
Creates and saves author given authorName, if bamboo user with the same username exists the new author will be linked to that user.

Parameters:
authorName -


Copyright © 2012 Atlassian. All Rights Reserved.