public interface BuildHistory
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<SFinishedBuild> |
findEntries(java.util.Collection<java.lang.Long> buildIds)
Returns collection of finished builds corresponding to the specified build ids.
|
java.util.Collection<SFinishedBuild> |
findEntries(java.util.Collection<java.lang.Long> buildIds,
boolean addToCache)
Same as
findEntries(Collection) but with additional parameter which controls whether the found builds should be cached or not. |
java.util.List<SFinishedBuild> |
findEntries(java.lang.String buildTypeId,
java.lang.String buildNumber)
Returns list of finished builds with specified build number belonging to specified build configuration ordered by changes (the most recent first).
|
SFinishedBuild |
findEntry(long buildId)
Finds entry with the specified id and cache the data internally.
|
SFinishedBuild |
findEntry(long buildId,
boolean addToCache)
Finds entry with the specified id and optionally cache it.
|
SFinishedBuild |
findEntry(java.lang.String buildTypeId,
java.lang.String buildNumber)
Finds the most recent by changes entry inside specified configuration with specified build number.
|
java.util.List<SFinishedBuild> |
getEntries(boolean includeCanceled)
Return whole build history for all build configurations of all projects.
|
java.util.List<SFinishedBuild> |
getEntriesBefore(SBuild beforeThisBuild,
boolean successfulOnly)
Returns builds of the specified configuration started before the specified build (excluding the specified build).
|
java.util.List<SFinishedBuild> |
getEntriesSince(SBuild sinceBuildInclusive,
BuildType buildType)
Returns builds of the specified configuration started after the specified build (including the specified build), ordered by changes.
|
java.util.List<SFinishedBuild> |
getHistoryByAgent(SBuildAgent agent,
User user,
boolean includeCanceled)
Returns the build history filtered by the
agent. |
java.util.Date |
getLastFinishedBuildDateOnAgent(SBuildAgent agent,
java.util.Date finishTimeAfter)
Return last finished build that was started on the agent.
|
void |
processEntries(ItemProcessor<SFinishedBuild> itemProcessor)
Invokes the given ItemProcessor for all history records existing in the system.
|
void |
processEntries(java.lang.String buildTypeId,
User user,
boolean includePersonalBuildsIfUserNotSpecified,
boolean includeCanceled,
boolean orderByChanges,
ItemProcessor<SFinishedBuild> processor)
Process build history for the specified build configuration.
|
boolean |
removeEntry(long buildId)
Removes finished build from the history.
|
void |
removeEntry(SFinishedBuild finishedBuild)
Removes finished build from build history.
|
void |
removeEntry(SFinishedBuild finishedBuild,
java.lang.String comment)
Removes finished build from build history.
|
void |
removeEntry(SFinishedBuild finishedBuild,
java.lang.String comment,
CleanupLevel cleanupLevel)
Removes finished build from build history.
|
@NotNull java.util.List<SFinishedBuild> getEntries(boolean includeCanceled)
includeCanceled - true if cancelled builds should be included into resultvoid processEntries(java.lang.String buildTypeId,
@Nullable
User user,
boolean includePersonalBuildsIfUserNotSpecified,
boolean includeCanceled,
boolean orderByChanges,
@NotNull
ItemProcessor<SFinishedBuild> processor)
buildTypeId - internal id of build configurationuser - if not null, personal builds of this user will be included into resultincludePersonalBuildsIfUserNotSpecified - if true and user==null, all personal builds will be included into resultsincludeCanceled - true if cancelled builds should be included into resultorderByChanges - if true, builds are ordered by changes, i.e. most recent build with recent changes goes first; if false, most recent builds go first, regardless change orderprocessor - processor for builds@NotNull java.util.List<SFinishedBuild> getEntriesSince(@Nullable SBuild sinceBuildInclusive, @NotNull BuildType buildType)
sinceBuildInclusive - boundary for returning builds (inclusive), may be null - in this case all builds are returnedbuildType - specified configuration.@NotNull java.util.List<SFinishedBuild> getEntriesBefore(@NotNull SBuild beforeThisBuild, boolean successfulOnly)
beforeThisBuild - returns build before this onesuccessfulOnly - if only successful builds should be included.@NotNull java.util.Collection<SFinishedBuild> findEntries(@NotNull java.util.Collection<java.lang.Long> buildIds)
buildIds - id list to find builds with these ids.@NotNull java.util.Collection<SFinishedBuild> findEntries(@NotNull java.util.Collection<java.lang.Long> buildIds, boolean addToCache)
findEntries(Collection) but with additional parameter which controls whether the found builds should be cached or not.buildIds - id list to find builds with these ids.addToCache - whether to put found builds in cache or not@Nullable SFinishedBuild findEntry(long buildId)
buildId - specified build id.null if it does not exist or invisible for the current user.AccessDeniedException - if the current authority holder doesn't have
an access to the build with the given id.@Nullable SFinishedBuild findEntry(long buildId, boolean addToCache)
buildId - specified build id.addToCache - if true, the build will be added to internal cachesnull if it does not exist or invisible for the current user.AccessDeniedException - if the current authority holder doesn't have
an access to the build with the given id.@Nullable SFinishedBuild findEntry(@NotNull java.lang.String buildTypeId, @NotNull java.lang.String buildNumber)
buildTypeId - specified build configuration id.buildNumber - specified build number.null if it does not exist or invisible for the current user.@NotNull java.util.List<SFinishedBuild> findEntries(@NotNull java.lang.String buildTypeId, @NotNull java.lang.String buildNumber)
buildTypeId - build configuration idbuildNumber - build numbervoid removeEntry(@NotNull
SFinishedBuild finishedBuild,
@Nullable
java.lang.String comment,
@NotNull
CleanupLevel cleanupLevel)
CleanupLevel for more details.void removeEntry(@NotNull
SFinishedBuild finishedBuild,
@Nullable
java.lang.String comment)
void removeEntry(@NotNull
SFinishedBuild finishedBuild)
boolean removeEntry(long buildId)
The removing build must be an instance of SFinishedBuild.
buildId - build identifier of the finished build.void processEntries(@NotNull
ItemProcessor<SFinishedBuild> itemProcessor)
itemProcessor - processor for history entries@NotNull java.util.List<SFinishedBuild> getHistoryByAgent(@NotNull SBuildAgent agent, @Nullable User user, boolean includeCanceled)
agent.agent - the build agentuser - if set the result will contain only builds by userincludeCanceled - if set the result will include canceled builds as well@Nullable
java.util.Date getLastFinishedBuildDateOnAgent(@NotNull
SBuildAgent agent,
@NotNull
java.util.Date finishTimeAfter)
agent - agentfinishTimeAfter - finish time lower bound