Class BuildLoggerManagerForTesting
- java.lang.Object
-
- com.atlassian.bamboo.testutils.build.logger.BuildLoggerManagerForTesting
-
- All Implemented Interfaces:
BuildLoggerManager
public class BuildLoggerManagerForTesting extends Object implements BuildLoggerManager
-
-
Constructor Summary
Constructors Constructor Description BuildLoggerManagerForTesting()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull SimpleBuildLogger
getLogger(@NotNull Key key)
Returns aBuildLogger
for the given plan@NotNull SimpleBuildLogger
getLogger(@NotNull ResultKey resultKey)
Returns aBuildLogger
for the given result.<T extends Key>
@NotNull BuildLoggerWithoutLogAccessgetLoggerWithoutLogAccess(@NotNull LoggerId<T> loggerId)
Returns aBuildLoggerWithoutLogAccess
for the givenLoggerId
@NotNull BuildLoggerWithoutLogAccess
getLoggerWithoutLogAccess(@NotNull Key resultKey)
Returns aBuildLoggerWithoutLogAccess
for the given resultvoid
removeBuildLogger(PlanKey planKey)
Removes plan logger for given plan key.void
removeBuildLogger(PlanResultKey buildResultKey)
Removes buildLogger for finished build process.void
removeLogger(@NotNull ResultKey resultKey)
Remove a logger if you are finished with it.void
removeLogger(LoggerId loggerId)
Remove a logger if you are finished with it.void
transferLogs(BuildLogger buildLogger, CommonContext buildContext)
Transfers log to the final location.
-
-
-
Method Detail
-
getLogger
@NotNull public @NotNull SimpleBuildLogger getLogger(@NotNull @NotNull Key key)
Description copied from interface:BuildLoggerManager
Returns aBuildLogger
for the given plan- Specified by:
getLogger
in interfaceBuildLoggerManager
-
getLogger
@NotNull public @NotNull SimpleBuildLogger getLogger(@NotNull @NotNull ResultKey resultKey)
Description copied from interface:BuildLoggerManager
Returns aBuildLogger
for the given result. Does not guarantee a persistent logger.- Specified by:
getLogger
in interfaceBuildLoggerManager
- Returns:
-
getLoggerWithoutLogAccess
@NotNull public <T extends Key> @NotNull BuildLoggerWithoutLogAccess getLoggerWithoutLogAccess(@NotNull @NotNull LoggerId<T> loggerId)
Description copied from interface:BuildLoggerManager
Returns aBuildLoggerWithoutLogAccess
for the givenLoggerId
- Specified by:
getLoggerWithoutLogAccess
in interfaceBuildLoggerManager
-
getLoggerWithoutLogAccess
@NotNull public @NotNull BuildLoggerWithoutLogAccess getLoggerWithoutLogAccess(@NotNull @NotNull Key resultKey)
Description copied from interface:BuildLoggerManager
Returns aBuildLoggerWithoutLogAccess
for the given result- Specified by:
getLoggerWithoutLogAccess
in interfaceBuildLoggerManager
- Returns:
-
removeBuildLogger
public void removeBuildLogger(PlanKey planKey)
Description copied from interface:BuildLoggerManager
Removes plan logger for given plan key.- Specified by:
removeBuildLogger
in interfaceBuildLoggerManager
-
removeBuildLogger
public void removeBuildLogger(PlanResultKey buildResultKey)
Description copied from interface:BuildLoggerManager
Removes buildLogger for finished build process. Removed build logger is not used anymore as build has been finished and build result should be persisted already.- Specified by:
removeBuildLogger
in interfaceBuildLoggerManager
-
removeLogger
public void removeLogger(LoggerId loggerId)
Description copied from interface:BuildLoggerManager
Remove a logger if you are finished with it.- Specified by:
removeLogger
in interfaceBuildLoggerManager
- Parameters:
loggerId
- of the logger to remove
-
removeLogger
public void removeLogger(@NotNull @NotNull ResultKey resultKey)
Description copied from interface:BuildLoggerManager
Remove a logger if you are finished with it.- Specified by:
removeLogger
in interfaceBuildLoggerManager
-
transferLogs
public void transferLogs(BuildLogger buildLogger, CommonContext buildContext)
Description copied from interface:BuildLoggerManager
Transfers log to the final location. Called when the build/deployment is finished.- Specified by:
transferLogs
in interfaceBuildLoggerManager
-
-