org.jenkins.plugins.audit2db.data
Interface BuildDetailsRepository

All Known Implementing Classes:
BuildDetailsHibernateRepository

public interface BuildDetailsRepository

Author:
Marco Scata

Method Summary
 List<BuildDetails> getBuildDetails(String masterHostName, Date fromDate, Date toDate)
          Retrieves the build details for all job instances that ran on the specified Jenkins master or all the slaves registered with that master, between two dates for al projects.
 List<BuildDetails> getBuildDetails(String masterHostName, String projectName, Date fromDate, Date toDate)
          Retrieves the build details for all job instances that ran on the specified Jenkins master or all the slaves registered with that master, between two dates and for a specific project.
 List<BuildDetails> getBuildDetailsByDateRange(Date start, Date end)
          Retrieves previously saved build details whose start date or end date fall between the given range.
 List<BuildDetails> getBuildDetailsByDurationRange(long min, long max)
          Retrieves previously saved build details whose duration in seconds falls between the given range.
 List<BuildDetails> getBuildDetailsByFullName(String fullName)
          Retrieves previously saved build details that match the given full name.
 BuildDetails getBuildDetailsById(String id)
          Retrieves previously saved build details that match the given id.
 List<BuildDetails> getBuildDetailsByName(String name)
          Retrieves previously saved build details that match the given name.
 List<BuildDetails> getBuildDetailsByParams(String masterHostName, String paramName, String paramValue, Date fromDate, Date toDate)
          Retrieves previously saved build details that were executed using the given parameter values.
 List<BuildDetails> getBuildDetailsByUserId(String userId)
          Retrieves previously saved build details that match the given user id.
 List<BuildDetails> getBuildDetailsByUserName(String userName)
          Retrieves previously saved build details that match the given user name.
 BuildDetails getBuildDetailsForBuild(hudson.model.AbstractBuild<?,?> build)
          Retrieves the build details for the given Jenkins build.
 BuildNode getBuildNodeByUrl(String url)
          Retrieves the build node that matches the given url.
 List<String> getProjectNames(String masterHostName, Date fromDate, Date toDate)
          Retrieves a list of all the projects registered with the specified Jenkins master that have had job instances executed between the specified dates.
 List<String> getProjectNames(String masterHostName, String pattern, Date fromDate, Date toDate)
          Retrieves a list of all the projects registered with the specified Jenkins master that have had job instances executed between the specified dates.
 Object saveBuildDetails(BuildDetails details)
          Creates a new entity in the repository with the given build details.
 void saveBuildDetailsList(List<BuildDetails> details)
          Creates new entities in the repository according to the given list of build details.
 void updateBuildDetails(BuildDetails details)
          Updates a previously saved build using the given build details.
 

Method Detail

saveBuildDetails

Object saveBuildDetails(BuildDetails details)
Creates a new entity in the repository with the given build details.

Parameters:
details - the details to save.
Returns:
the entity id.

saveBuildDetailsList

void saveBuildDetailsList(List<BuildDetails> details)
Creates new entities in the repository according to the given list of build details.

Parameters:
details - the collection of details to save.

getBuildDetailsById

BuildDetails getBuildDetailsById(String id)
Retrieves previously saved build details that match the given id.

Parameters:
id - the build details id.
Returns:
the matching build details if found, otherwise null.

getBuildDetailsByName

List<BuildDetails> getBuildDetailsByName(String name)
Retrieves previously saved build details that match the given name.

Parameters:
name - the build name
Returns:
a list of matching build details if found, otherwise an empty list.

getBuildDetailsByFullName

List<BuildDetails> getBuildDetailsByFullName(String fullName)
Retrieves previously saved build details that match the given full name.

Parameters:
fullName -
Returns:
a list of matching build details if found, otherwise an empty list.

getBuildDetailsByDateRange

List<BuildDetails> getBuildDetailsByDateRange(Date start,
                                              Date end)
Retrieves previously saved build details whose start date or end date fall between the given range. The range is inclusive.

Parameters:
start - the start date.
end - the end date.
Returns:
a list of matching build details if found, otherwise an empty list.

getBuildDetailsByDurationRange

List<BuildDetails> getBuildDetailsByDurationRange(long min,
                                                  long max)
Retrieves previously saved build details whose duration in seconds falls between the given range. The range is inclusive.

Parameters:
min - the minimum duration in seconds.
max - the maximum duration in seconds.
Returns:
a list of matching build details if found, otherwise an empty list.

getBuildDetailsByUserId

List<BuildDetails> getBuildDetailsByUserId(String userId)
Retrieves previously saved build details that match the given user id.

Parameters:
userId - the user id to match.
Returns:
a list of matching build details if found, otherwise an empty list.

getBuildDetailsByUserName

List<BuildDetails> getBuildDetailsByUserName(String userName)
Retrieves previously saved build details that match the given user name.

Parameters:
userName - the user name to match.
Returns:
a list of matching build details if found, otherwise an empty list.

getBuildDetailsByParams

List<BuildDetails> getBuildDetailsByParams(String masterHostName,
                                           String paramName,
                                           String paramValue,
                                           Date fromDate,
                                           Date toDate)
Retrieves previously saved build details that were executed using the given parameter values.

Parameters:
masterHostName - the host name of the Jenkins master.
paramName - the parameter name.
paramValue - the parameter value.
fromDate - the start (inclusive) of the date range.
toDate - the end (inclusive) of the date range.
Returns:
a list of build details matching the specified criteria. Never null.

updateBuildDetails

void updateBuildDetails(BuildDetails details)
Updates a previously saved build using the given build details.

Parameters:
details - the updated build details.

getBuildNodeByUrl

BuildNode getBuildNodeByUrl(String url)
Retrieves the build node that matches the given url.

Parameters:
url - the node url (unique).
Returns:
the matching node if found, otherwise null.

getBuildDetailsForBuild

BuildDetails getBuildDetailsForBuild(hudson.model.AbstractBuild<?,?> build)
Retrieves the build details for the given Jenkins build.

Parameters:
build - a reference to the Jenkins build.
Returns:
the relevant build details if found, otherwise null.

getProjectNames

List<String> getProjectNames(String masterHostName,
                             Date fromDate,
                             Date toDate)
Retrieves a list of all the projects registered with the specified Jenkins master that have had job instances executed between the specified dates.

Parameters:
masterHostName - the host name of the Jenkins master.
fromDate - the start (inclusive) of the date range.
toDate - the end (inclusive) of the date range.
Returns:
a list of project names, never null.

getProjectNames

List<String> getProjectNames(String masterHostName,
                             String pattern,
                             Date fromDate,
                             Date toDate)
Retrieves a list of all the projects registered with the specified Jenkins master that have had job instances executed between the specified dates.

Parameters:
masterHostName - the host name of the Jenkins master.
pattern - the pattern used to match project names.
fromDate - the start (inclusive) of the date range.
toDate - the end (inclusive) of the date range.
Returns:
a list of project names, never null.

getBuildDetails

List<BuildDetails> getBuildDetails(String masterHostName,
                                   Date fromDate,
                                   Date toDate)
Retrieves the build details for all job instances that ran on the specified Jenkins master or all the slaves registered with that master, between two dates for al projects.

Parameters:
masterHostName - the host name of the Jenkins master.
fromDate - the start (inclusive) of the date range.
toDate - the end (inclusive) of the date range.
Returns:
a list of build details matching the specified criteria. Never null.

getBuildDetails

List<BuildDetails> getBuildDetails(String masterHostName,
                                   String projectName,
                                   Date fromDate,
                                   Date toDate)
Retrieves the build details for all job instances that ran on the specified Jenkins master or all the slaves registered with that master, between two dates and for a specific project.

Parameters:
masterHostName - the host name of the Jenkins master.
projectName - the name of the project that was executed.
fromDate - the start (inclusive) of the date range.
toDate - the end (inclusive) of the date range.
Returns:
a list of build details matching the specified criteria. Never null.


Copyright © 2004-2013. All Rights Reserved.