Interface PolledTriggerContext
-
- All Known Implementing Classes:
PolledTriggerContextImpl
,VcsTriggerContext
public interface PolledTriggerContext
Context of the polled build trigger call
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BuildCustomizer
createBuildCustomizer(SUser user)
Creates aBuildCustomizer
instance that should be used to trigger a build: the returned customizer is preconfigured with custom parameters specified in the trigger settings.SBuildType
getBuildType()
Build configuration for which the trigger is calledlong
getCurrentTime()
since processing trigger may take some time, trigger implementations shouldn't useSystem.currentTimeMillis()
for time Otherwise unnecessary triggering may occur if trigger depends on time.CustomDataStorage
getCustomDataStorage()
Returns custom data storage associated with build configuration and trigger descriptor.Logger
getLogger()
Returns logger which can be used to log trigger related activity.Date
getPreviousCallTime()
Time of the previous call of the trigger, can be null if this is the first time the trigger is calledBuildTriggerDescriptor
getTriggerDescriptor()
Build trigger settings
-
-
-
Method Detail
-
getBuildType
@NotNull SBuildType getBuildType()
Build configuration for which the trigger is called- Returns:
- see above
-
getTriggerDescriptor
@NotNull BuildTriggerDescriptor getTriggerDescriptor()
Build trigger settings- Returns:
- see above
-
getPreviousCallTime
@Nullable Date getPreviousCallTime()
Time of the previous call of the trigger, can be null if this is the first time the trigger is called- Returns:
- see above
-
getCurrentTime
long getCurrentTime()
since processing trigger may take some time, trigger implementations shouldn't useSystem.currentTimeMillis()
for time Otherwise unnecessary triggering may occur if trigger depends on time. Instead ofSystem.currentTimeMillis()
use this method- Returns:
- current time in milliseconds for this trigger processing (like
System.currentTimeMillis()
) - Since:
- 2022.04
-
getCustomDataStorage
@NotNull CustomDataStorage getCustomDataStorage()
Returns custom data storage associated with build configuration and trigger descriptor. This storage can be used for remembering the per build type state of the build trigger.- Returns:
- custom data storage for the pair: build configuration and trigger descriptor
-
createBuildCustomizer
@NotNull BuildCustomizer createBuildCustomizer(@Nullable SUser user)
Creates aBuildCustomizer
instance that should be used to trigger a build: the returned customizer is preconfigured with custom parameters specified in the trigger settings.- Parameters:
user
- optional user, will beBuildCustomizerFactory.createBuildCustomizer(SBuildType, SUser)
- Since:
- 2021.1
- See Also:
BuildTriggerService.supportsBuildCustomization()
-
getLogger
@NotNull Logger getLogger()
Returns logger which can be used to log trigger related activity. Note the provided logger will automatically prepend all messages with id of the build configuration where the trigger belongs.- Returns:
- see above
- Since:
- 2021.1
-
-