Class TrackingEntryManagerImpl
java.lang.Object
com.atlassian.bamboo.brokenbuildtracker.data.TrackingEntryManagerImpl
- All Implemented Interfaces:
TrackingEntryManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResult(@NotNull TrackingEntry entry, long resultId, int buildNumber) Add a result to an existing tracking entryvoidaddUser(@NotNull TrackingEntry entry, @NotNull String user, @Nullable String userWhoUpdated) Add a responsible user to an existing tracking entryvoidcloseTrackingEntry(@NotNull TrackingEntry entry) Close a tracking entry.@NotNull TrackingEntrycreateTrackingEntry(long planId, boolean active) Create a brand new tracking entry for this plan.@NotNull Collection<TrackingEntry> getActiveTrackingEntriesForUser(@NotNull String username) Find any active tracking entries for a given user.getActiveTrackingEntriesForUser(@NotNull String username, int start, int limit) getActiveTrackingEntryForPlan(long id) Returns the currently open tracking entry for plan.getTrackingEntryById(int id) Find tracking entry by database idgetTrackingEntryByResultId(long resultId) Find the tracking entry for a given chain result.getTrackingEntryWithBuildNumber(long planId, int buildNumber) Find the tracking entry with given build number.voidremoveAllUsers(@NotNull TrackingEntry entry) Removes all existing responsible users from the existing tracking entry.voidremoveTrackingEntry(TrackingEntry trackingEntry) Remove entire tracking entry.voidremoveTrackingForPlan(long idOfDeletedItem) Remove any tracking information for a given planvoidremoveTrackingForResult(long idOfDeletedItem) Remove any tracking information for a given resultvoidremoveUser(@NotNull TrackingEntry entry, @NotNull String user) Remove a responsible user from existing tracking entryvoidsetActiveEntry(TrackingEntry trackingEntry) Sets tracing entry to active.
-
Constructor Details
-
TrackingEntryManagerImpl
-
-
Method Details
-
getTrackingEntryById
Description copied from interface:TrackingEntryManagerFind tracking entry by database id- Specified by:
getTrackingEntryByIdin interfaceTrackingEntryManager- Parameters:
id- of tracking entry to find- Returns:
- tracking entry with given id if found, otherwise null
-
getTrackingEntryByResultId
Description copied from interface:TrackingEntryManagerFind the tracking entry for a given chain result.- Specified by:
getTrackingEntryByResultIdin interfaceTrackingEntryManager- Parameters:
resultId- of the result- Returns:
- tracking entry for the given result. null if none exists (e.g if result is green!)
-
getActiveTrackingEntryForPlan
Description copied from interface:TrackingEntryManagerReturns the currently open tracking entry for plan. Only one tracking entry is allowed open per plan at any one time. If multiple are found. They are all closed and this method will return null. Will also return null if there is no currently active entry (i.e the plan is currently passing)- Specified by:
getActiveTrackingEntryForPlanin interfaceTrackingEntryManager- Parameters:
id- of the plan- Returns:
- currently active tracking entry for the plan if there is one
-
getActiveTrackingEntriesForUser
@NotNull public @NotNull Collection<TrackingEntry> getActiveTrackingEntriesForUser(@NotNull @NotNull String username) Description copied from interface:TrackingEntryManagerFind any active tracking entries for a given user. This represents the plans they currently are responsible for- Specified by:
getActiveTrackingEntriesForUserin interfaceTrackingEntryManager- Parameters:
username- of the user- Returns:
- any active tracking entries for the given user.
-
getActiveTrackingEntriesForUser
public List<TrackingEntry> getActiveTrackingEntriesForUser(@NotNull @NotNull String username, int start, int limit) - Specified by:
getActiveTrackingEntriesForUserin interfaceTrackingEntryManager
-
addResult
Description copied from interface:TrackingEntryManagerAdd a result to an existing tracking entry- Specified by:
addResultin interfaceTrackingEntryManager- Parameters:
entry- to add result toresultId- id of the result to addbuildNumber-
-
addUser
public void addUser(@NotNull @NotNull TrackingEntry entry, @NotNull @NotNull String user, @Nullable @Nullable String userWhoUpdated) Description copied from interface:TrackingEntryManagerAdd a responsible user to an existing tracking entry- Specified by:
addUserin interfaceTrackingEntryManager- Parameters:
entry- to add user toouser- to adduserWhoUpdated- user who updated the responsibility entry. Null if responsibility has been automatically assigned
-
removeUser
Description copied from interface:TrackingEntryManagerRemove a responsible user from existing tracking entry- Specified by:
removeUserin interfaceTrackingEntryManager- Parameters:
entry- to remove user fromuser- to remove
-
removeAllUsers
Description copied from interface:TrackingEntryManagerRemoves all existing responsible users from the existing tracking entry.- Specified by:
removeAllUsersin interfaceTrackingEntryManager- Parameters:
entry- to remove users from
-
closeTrackingEntry
Description copied from interface:TrackingEntryManagerClose a tracking entry. Essentially you do this when it no longer needs attention. e.g. if the build is now green.- Specified by:
closeTrackingEntryin interfaceTrackingEntryManager- Parameters:
entry- to close
-
createTrackingEntry
Description copied from interface:TrackingEntryManagerCreate a brand new tracking entry for this plan. Will be active by default, ensure there are no other active tracking entries before creating a new one- Specified by:
createTrackingEntryin interfaceTrackingEntryManager- Parameters:
planId- of planactive- should the new entry be created as active entry- Returns:
- created tracking entry
-
removeTrackingForPlan
public void removeTrackingForPlan(long idOfDeletedItem) Description copied from interface:TrackingEntryManagerRemove any tracking information for a given plan- Specified by:
removeTrackingForPlanin interfaceTrackingEntryManager- Parameters:
idOfDeletedItem- db id of the plan
-
removeTrackingForResult
public void removeTrackingForResult(long idOfDeletedItem) Description copied from interface:TrackingEntryManagerRemove any tracking information for a given result- Specified by:
removeTrackingForResultin interfaceTrackingEntryManager- Parameters:
idOfDeletedItem- db if of the result
-
removeTrackingEntry
Description copied from interface:TrackingEntryManagerRemove entire tracking entry.- Specified by:
removeTrackingEntryin interfaceTrackingEntryManager- Parameters:
trackingEntry-
-
setActiveEntry
Description copied from interface:TrackingEntryManagerSets tracing entry to active. Caller must ensure that there's no other open tracking entry.- Specified by:
setActiveEntryin interfaceTrackingEntryManager- Parameters:
trackingEntry-
-
getTrackingEntryWithBuildNumber
Description copied from interface:TrackingEntryManagerFind the tracking entry with given build number.- Specified by:
getTrackingEntryWithBuildNumberin interfaceTrackingEntryManager- Parameters:
planId-buildNumber-
-