com.atlassian.bamboo.author
Class HibernateAuthorManagerImpl

java.lang.Object
  extended by com.atlassian.bamboo.author.HibernateAuthorManagerImpl
All Implemented Interfaces:
AuthorManager, ExtendedAuthorManager

public class HibernateAuthorManagerImpl
extends java.lang.Object
implements ExtendedAuthorManager


Constructor Summary
HibernateAuthorManagerImpl()
           
 
Method Summary
 java.util.List<BuildResultsSummary> findBuildResultsBrokenByAuthor(ExtendedAuthor author)
           
 java.util.List<BuildResultsSummary> findBuildResultsFailedByAuthor(ExtendedAuthor author)
           
 java.util.List<BuildResultsSummary> findBuildResultsFixedByAuthor(ExtendedAuthor author)
           
 java.util.List<BuildResultsSummary> findBuildResultsSuccessfulByAuthor(ExtendedAuthor author)
           
 java.util.List<BuildResultsSummary> findBuildResultsTriggeredByAuthor(ExtendedAuthor author)
           
 ExtendedAuthor generateOrRetrieveAuthorFromCommit(Commit commit, java.lang.String authorName)
          Either retrieves an existing author (if exists) or creates a new one (if author does not exist) for a given commit
 java.util.Set getAllAuthors()
           
 java.util.Set<ExtendedAuthor> getAllUnlinkedAuthors()
           
 ExtendedAuthor getAuthorById(long id)
           
 Author getAuthorByName(java.lang.String name)
           
 AuthorDao getAuthorDao()
           
 java.util.Set getAuthorsInBuild(long buildId)
           
 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(Author author)
          Save the author
 void setAuthorDao(AuthorDao authorDao)
           
 void setBambooUserManager(BambooUserManager userManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateAuthorManagerImpl

public HibernateAuthorManagerImpl()
Method Detail

generateOrRetrieveAuthorFromCommit

public ExtendedAuthor generateOrRetrieveAuthorFromCommit(Commit commit,
                                                         java.lang.String authorName)
Description copied from interface: ExtendedAuthorManager
Either retrieves an existing author (if exists) or creates a new one (if author does not exist) for a given commit

Specified by:
generateOrRetrieveAuthorFromCommit in interface ExtendedAuthorManager
Returns:
ExtendedAuthor which made the commit.

getAllAuthors

public java.util.Set getAllAuthors()
Specified by:
getAllAuthors in interface AuthorManager
Returns:
Set of all Author

getAuthorsInBuild

public java.util.Set getAuthorsInBuild(long buildId)
Specified by:
getAuthorsInBuild in interface AuthorManager
Returns:
Set of Author in a build

getAuthorByName

public Author getAuthorByName(java.lang.String name)
Specified by:
getAuthorByName in interface AuthorManager
Returns:
Author with given name.

getAllUnlinkedAuthors

public java.util.Set<ExtendedAuthor> getAllUnlinkedAuthors()
Specified by:
getAllUnlinkedAuthors in interface ExtendedAuthorManager
Returns:
Set of ExtendedAuthor objects not linked to users

getExtendedAuthorByName

public ExtendedAuthor getExtendedAuthorByName(java.lang.String name)
Specified by:
getExtendedAuthorByName in interface ExtendedAuthorManager
Returns:
ExtendedAuthor with given name (assuming unique)

findBuildResultsTriggeredByAuthor

public java.util.List<BuildResultsSummary> findBuildResultsTriggeredByAuthor(ExtendedAuthor author)
Specified by:
findBuildResultsTriggeredByAuthor in interface ExtendedAuthorManager
Returns:
List of BuildResultsSummary triggered by author

findBuildResultsFailedByAuthor

public java.util.List<BuildResultsSummary> findBuildResultsFailedByAuthor(ExtendedAuthor author)
Specified by:
findBuildResultsFailedByAuthor in interface ExtendedAuthorManager
Returns:
List of BuildResultsSummary triggered by author and failed

findBuildResultsSuccessfulByAuthor

public java.util.List<BuildResultsSummary> findBuildResultsSuccessfulByAuthor(ExtendedAuthor author)
Specified by:
findBuildResultsSuccessfulByAuthor in interface ExtendedAuthorManager
Returns:
List of BuildResultsSummary triggered by author and successful

findBuildResultsBrokenByAuthor

public java.util.List<BuildResultsSummary> findBuildResultsBrokenByAuthor(ExtendedAuthor author)
Specified by:
findBuildResultsBrokenByAuthor in interface ExtendedAuthorManager
Returns:
List of BuildResultsSummary broken by author

findBuildResultsFixedByAuthor

public java.util.List<BuildResultsSummary> findBuildResultsFixedByAuthor(ExtendedAuthor author)
Specified by:
findBuildResultsFixedByAuthor in interface ExtendedAuthorManager
Returns:
List of BuildResultsSummary fixed by author

getAuthorById

public ExtendedAuthor getAuthorById(long id)
Specified by:
getAuthorById in interface ExtendedAuthorManager
Returns:
Author given id

getLinkedAuthorForUser

public java.util.List<ExtendedAuthor> getLinkedAuthorForUser(com.atlassian.user.User user)
Specified by:
getLinkedAuthorForUser in interface ExtendedAuthorManager
Returns:
List of ExtendedAuthor linked to the user.

removeAuthor

public void removeAuthor(ExtendedAuthor extendedAuthor)
Description copied from interface: ExtendedAuthorManager
removes an author

Specified by:
removeAuthor in interface ExtendedAuthorManager

saveAuthor

public void saveAuthor(Author author)
Description copied from interface: ExtendedAuthorManager
Save the author

Specified by:
saveAuthor in interface ExtendedAuthorManager

getAuthorDao

public AuthorDao getAuthorDao()

setAuthorDao

public void setAuthorDao(AuthorDao authorDao)

setBambooUserManager

public void setBambooUserManager(BambooUserManager userManager)


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.