|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.author.HibernateAuthorManagerImpl
public class HibernateAuthorManagerImpl
Constructor Summary | |
---|---|
HibernateAuthorManagerImpl(AuthorDao authorDao,
BambooUserManager bambooUserManager)
|
Method Summary | |
---|---|
void |
createAndSaveAuthor(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. |
java.util.List<Author> |
findAuthorsByName(java.lang.String authorSearchString)
Performs a case insensitive search for authors by their author name. |
java.util.List<Author> |
findAuthorsByUser(java.lang.String userSearchString)
Performs a case insensitive search for authors by their linkedUserName. |
java.util.List<Author> |
findAuthorsThatStartWith(java.lang.String authorSearchString,
boolean unlinkedOnly)
Performs a case insensitive search for authors by their author name. |
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> authors,
int maxDays)
Retrieve all build results triggered by the author in the last X days |
java.util.Set |
getAllAuthors()
|
java.util.Set<ExtendedAuthor> |
getAllUnlinkedAuthors()
|
ExtendedAuthor |
getAuthorById(long id)
|
Author |
getAuthorByName(java.lang.String name)
|
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 |
relinkUnlinkedAuthors()
Attempt to link any authors that currently aren't linked with a user. |
void |
removeAuthor(ExtendedAuthor extendedAuthor)
removes an author |
void |
saveAuthor(ExtendedAuthor author)
Save the author |
void |
unlinkAllAuthors()
Remove all author links. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HibernateAuthorManagerImpl(AuthorDao authorDao, BambooUserManager bambooUserManager)
Method Detail |
---|
public void createAndSaveAuthor(@NotNull Author author)
ExtendedAuthorManager
createAndSaveAuthor
in interface ExtendedAuthorManager
public java.util.Set getAllAuthors()
getAllAuthors
in interface AuthorManager
Set
of all Author
public void unlinkAllAuthors()
ExtendedAuthorManager
unlinkAllAuthors
in interface ExtendedAuthorManager
public void relinkUnlinkedAuthors()
ExtendedAuthorManager
relinkUnlinkedAuthors
in interface ExtendedAuthorManager
public Author getAuthorByName(java.lang.String name)
getAuthorByName
in interface AuthorManager
Author
with given name.@NotNull public java.util.Set<ExtendedAuthor> getAllUnlinkedAuthors()
getAllUnlinkedAuthors
in interface ExtendedAuthorManager
Set
of ExtendedAuthor
objects not linked to userspublic ExtendedAuthor getExtendedAuthorByName(java.lang.String name)
getExtendedAuthorByName
in interface ExtendedAuthorManager
ExtendedAuthor
with given name (assuming unique)@NotNull public java.util.List<ResultsSummary> findBuildResultsTriggeredByAuthor(ExtendedAuthor author, int maxResultCount)
findBuildResultsTriggeredByAuthor
in interface ExtendedAuthorManager
maxResultCount
- if <= 0 all the results are returned
List
of BuildResultsSummary
triggered by authorpublic java.util.List<ResultsSummary> findRecentResultsTriggeredByAuthors(java.util.List<ExtendedAuthor> authors, int maxDays)
ExtendedAuthorManager
findRecentResultsTriggeredByAuthors
in interface ExtendedAuthorManager
authors
- the builds will be triggered bymaxDays
- number of days to look back in history
@NotNull public java.util.List<ResultsSummary> findBuildResultsFailedByAuthor(ExtendedAuthor author, int maxResultCount)
findBuildResultsFailedByAuthor
in interface ExtendedAuthorManager
maxResultCount
- if <= 0 all the results are returned
List
of BuildResultsSummary
triggered by author and failed@NotNull public java.util.List<ResultsSummary> findBuildResultsSuccessfulByAuthor(ExtendedAuthor author, int maxResultCount)
findBuildResultsSuccessfulByAuthor
in interface ExtendedAuthorManager
maxResultCount
- if <= 0 all the results are returned
List
of BuildResultsSummary
triggered by author and successful@NotNull public java.util.List<ResultsSummary> findBuildResultsBrokenByAuthor(ExtendedAuthor author, int maxResultCount)
findBuildResultsBrokenByAuthor
in interface ExtendedAuthorManager
maxResultCount
- if <= 0 all the results are returned
List
of BuildResultsSummary
broken by author@NotNull public java.util.Collection<ResultsSummary> findLatestBuildBrokenByAuthorInEachPlan(ExtendedAuthor author)
ExtendedAuthorManager
findLatestBuildBrokenByAuthorInEachPlan
in interface ExtendedAuthorManager
List
of BuildResultsSummary
broken by author@NotNull public java.util.List<ResultsSummary> findBuildResultsFixedByAuthor(ExtendedAuthor author, int maxResultCount)
findBuildResultsFixedByAuthor
in interface ExtendedAuthorManager
maxResultCount
- if <= 0 all the results are returned
List
of BuildResultsSummary
fixed by authorpublic int findNumberOfBuildsTriggeredByAuthor(ExtendedAuthor author)
findNumberOfBuildsTriggeredByAuthor
in interface ExtendedAuthorManager
public int findNumberOfFailedBuildsByAuthor(ExtendedAuthor author)
findNumberOfFailedBuildsByAuthor
in interface ExtendedAuthorManager
public int findNumberOfSuccessfulBuildsByAuthor(ExtendedAuthor author)
findNumberOfSuccessfulBuildsByAuthor
in interface ExtendedAuthorManager
public int findNumberOfBuildFixedByAuthor(ExtendedAuthor author)
findNumberOfBuildFixedByAuthor
in interface ExtendedAuthorManager
public int findNumberOfBuildBrokenByAuthor(ExtendedAuthor author)
findNumberOfBuildBrokenByAuthor
in interface ExtendedAuthorManager
public ExtendedAuthor getAuthorById(long id)
getAuthorById
in interface ExtendedAuthorManager
Author
given id@NotNull public java.util.List<ExtendedAuthor> getLinkedAuthorForUser(com.atlassian.user.User user)
getLinkedAuthorForUser
in interface ExtendedAuthorManager
List
of ExtendedAuthor
linked to the user.@NotNull public java.util.List<ExtendedAuthor> getAvailableAuthors(@Nullable com.atlassian.user.User user)
ExtendedAuthorManager
getAvailableAuthors
in interface ExtendedAuthorManager
user
- user
ExtendedAuthor
@NotNull public java.util.List<Author> findAuthorsByName(@NotNull java.lang.String authorSearchString)
ExtendedAuthorManager
findAuthorsByName
in interface ExtendedAuthorManager
authorSearchString
- string to search for
@NotNull public java.util.List<Author> findAuthorsThatStartWith(@NotNull java.lang.String authorSearchString, boolean unlinkedOnly)
ExtendedAuthorManager
findAuthorsThatStartWith
in interface ExtendedAuthorManager
authorSearchString
- string to search forunlinkedOnly
- if true will only return users which have not been linked with an user already
@NotNull public java.util.List<Author> findAuthorsByUser(@NotNull java.lang.String userSearchString)
ExtendedAuthorManager
findAuthorsByUser
in interface ExtendedAuthorManager
userSearchString
- string to search for
public void removeAuthor(ExtendedAuthor extendedAuthor)
ExtendedAuthorManager
removeAuthor
in interface ExtendedAuthorManager
public void saveAuthor(ExtendedAuthor author)
ExtendedAuthorManager
saveAuthor
in interface ExtendedAuthorManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |