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 SimpleBuildLoggergetLogger(@NotNull Key key)Returns aBuildLoggerfor the given plan@NotNull SimpleBuildLoggergetLogger(@NotNull ResultKey resultKey)Returns aBuildLoggerfor the given result.<T extends Key>
@NotNull BuildLoggerWithoutLogAccessgetLoggerWithoutLogAccess(@NotNull LoggerId<T> loggerId)Returns aBuildLoggerWithoutLogAccessfor the givenLoggerId@NotNull BuildLoggerWithoutLogAccessgetLoggerWithoutLogAccess(@NotNull Key resultKey)Returns aBuildLoggerWithoutLogAccessfor the given resultvoidremoveBuildLogger(PlanKey planKey)Removes plan logger for given plan key.voidremoveBuildLogger(PlanResultKey buildResultKey)Removes buildLogger for finished build process.voidremoveLogger(@NotNull ResultKey resultKey)Remove a logger if you are finished with it.voidremoveLogger(LoggerId loggerId)Remove a logger if you are finished with it.voidtransferLogs(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:BuildLoggerManagerReturns aBuildLoggerfor the given plan- Specified by:
getLoggerin interfaceBuildLoggerManager
-
getLogger
@NotNull public @NotNull SimpleBuildLogger getLogger(@NotNull @NotNull ResultKey resultKey)
Description copied from interface:BuildLoggerManagerReturns aBuildLoggerfor the given result. Does not guarantee a persistent logger.- Specified by:
getLoggerin interfaceBuildLoggerManager- Returns:
-
getLoggerWithoutLogAccess
@NotNull public <T extends Key> @NotNull BuildLoggerWithoutLogAccess getLoggerWithoutLogAccess(@NotNull @NotNull LoggerId<T> loggerId)
Description copied from interface:BuildLoggerManagerReturns aBuildLoggerWithoutLogAccessfor the givenLoggerId- Specified by:
getLoggerWithoutLogAccessin interfaceBuildLoggerManager
-
getLoggerWithoutLogAccess
@NotNull public @NotNull BuildLoggerWithoutLogAccess getLoggerWithoutLogAccess(@NotNull @NotNull Key resultKey)
Description copied from interface:BuildLoggerManagerReturns aBuildLoggerWithoutLogAccessfor the given result- Specified by:
getLoggerWithoutLogAccessin interfaceBuildLoggerManager- Returns:
-
removeBuildLogger
public void removeBuildLogger(PlanKey planKey)
Description copied from interface:BuildLoggerManagerRemoves plan logger for given plan key.- Specified by:
removeBuildLoggerin interfaceBuildLoggerManager
-
removeBuildLogger
public void removeBuildLogger(PlanResultKey buildResultKey)
Description copied from interface:BuildLoggerManagerRemoves 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:
removeBuildLoggerin interfaceBuildLoggerManager
-
removeLogger
public void removeLogger(LoggerId loggerId)
Description copied from interface:BuildLoggerManagerRemove a logger if you are finished with it.- Specified by:
removeLoggerin interfaceBuildLoggerManager- Parameters:
loggerId- of the logger to remove
-
removeLogger
public void removeLogger(@NotNull @NotNull ResultKey resultKey)Description copied from interface:BuildLoggerManagerRemove a logger if you are finished with it.- Specified by:
removeLoggerin interfaceBuildLoggerManager
-
transferLogs
public void transferLogs(BuildLogger buildLogger, CommonContext buildContext)
Description copied from interface:BuildLoggerManagerTransfers log to the final location. Called when the build/deployment is finished.- Specified by:
transferLogsin interfaceBuildLoggerManager
-
-