Class RemoteRunOnBranchTriggerService
- java.lang.Object
-
- jetbrains.buildServer.buildTriggers.BuildTriggerService
-
- jetbrains.buildServer.buildTriggers.vcs.remoteRun.RemoteRunOnBranchTriggerService
-
- All Implemented Interfaces:
PropertiesProcessor
,ServerExtension
,TeamCityExtension
public class RemoteRunOnBranchTriggerService extends BuildTriggerService implements PropertiesProcessor
- Author:
- dmitry.neverov
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RemoteRunOnBranchTriggerService.BranchyVcs
BranchyVcs is a VCS with special branch supportstatic interface
RemoteRunOnBranchTriggerService.ErrorListener
-
Field Summary
Fields Modifier and Type Field Description static String
REMOTE_RUN_ON_BRANCH_TRIGGER
-
Constructor Summary
Constructors Constructor Description RemoteRunOnBranchTriggerService(EventDispatcher<BuildServerListener> dispatcher, VcsManager vcsManager, VcsContextLocator vcsContextLocator, RepositoryStateManager repositoryStateManager, UserModel userManager, RemoteRunBranchTriggerCache cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
describeTrigger(BuildTriggerDescriptor trigger)
Returns human readable description of the provided build trigger settingsMap<String,RemoteRunOnBranchTriggerService.BranchyVcs>
getBranchyVcses()
BuildTriggeringPolicy
getBuildTriggeringPolicy()
Returns policy used by build trigger to trigger builds.Map<String,String>
getDefaultTriggerProperties()
Returns default properties to use when trigger is createdString
getDisplayName()
Returns name of this trigger to show in UI.String
getEditParametersUrl()
Returns path to jsp or to custom controller which will return trigger edit parameters page To resolve paths in plugin, seePluginDescriptor.getPluginResourcesPath(String)
String
getName()
Returns trigger namePropertiesProcessor
getTriggerPropertiesProcessor()
Returns processor for trigger properties.Collection<InvalidProperty>
process(Map<String,String> properties)
Will be called when user attempts to save properties from the user interface or when runner parameters are used to compute agent compatibility for a build configuration.boolean
supportsBuildCustomization()
Specifies whether this triggers allows users to set custom parameters for triggered builds.-
Methods inherited from class jetbrains.buildServer.buildTriggers.BuildTriggerService
isAvailable, isMultipleTriggersPerBuildTypeAllowed
-
-
-
-
Field Detail
-
REMOTE_RUN_ON_BRANCH_TRIGGER
public static final String REMOTE_RUN_ON_BRANCH_TRIGGER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RemoteRunOnBranchTriggerService
public RemoteRunOnBranchTriggerService(@NotNull EventDispatcher<BuildServerListener> dispatcher, @NotNull VcsManager vcsManager, @NotNull VcsContextLocator vcsContextLocator, @NotNull RepositoryStateManager repositoryStateManager, @NotNull UserModel userManager, @NotNull RemoteRunBranchTriggerCache cache)
-
-
Method Detail
-
getName
@NotNull public String getName()
Description copied from class:BuildTriggerService
Returns trigger name- Specified by:
getName
in classBuildTriggerService
- Returns:
- trigger name
-
getDisplayName
@NotNull public String getDisplayName()
Description copied from class:BuildTriggerService
Returns name of this trigger to show in UI.- Specified by:
getDisplayName
in classBuildTriggerService
- Returns:
- see above
-
getEditParametersUrl
public String getEditParametersUrl()
Description copied from class:BuildTriggerService
Returns path to jsp or to custom controller which will return trigger edit parameters page To resolve paths in plugin, seePluginDescriptor.getPluginResourcesPath(String)
- Overrides:
getEditParametersUrl
in classBuildTriggerService
- Returns:
- see above
- See Also:
PluginDescriptor
-
describeTrigger
@NotNull public String describeTrigger(@NotNull BuildTriggerDescriptor trigger)
Description copied from class:BuildTriggerService
Returns human readable description of the provided build trigger settings- Specified by:
describeTrigger
in classBuildTriggerService
- Parameters:
trigger
- trigger- Returns:
- see above
-
getTriggerPropertiesProcessor
public PropertiesProcessor getTriggerPropertiesProcessor()
Description copied from class:BuildTriggerService
Returns processor for trigger properties. Properties processor performs validation function and is called when trigger is edited or created.- Overrides:
getTriggerPropertiesProcessor
in classBuildTriggerService
- Returns:
- see above
-
process
public Collection<InvalidProperty> process(Map<String,String> properties)
Description copied from interface:PropertiesProcessor
Will be called when user attempts to save properties from the user interface or when runner parameters are used to compute agent compatibility for a build configuration. Properties map passed as argument can be verified or modified by the processor (for example, one could remove all properties with empty values from this map). If processor was called during saving properties to a configuration file, then modified map will be stored without changes.- Specified by:
process
in interfacePropertiesProcessor
- Parameters:
properties
- properties to process- Returns:
- collection of invalid properties, if this collection is not empty properties will not be saved into the configuration file.
-
getDefaultTriggerProperties
public Map<String,String> getDefaultTriggerProperties()
Description copied from class:BuildTriggerService
Returns default properties to use when trigger is created- Overrides:
getDefaultTriggerProperties
in classBuildTriggerService
- Returns:
- see above
-
supportsBuildCustomization
public boolean supportsBuildCustomization()
Description copied from class:BuildTriggerService
Specifies whether this triggers allows users to set custom parameters for triggered builds. If the returned value is true then thePolledBuildTrigger.triggerBuild(PolledTriggerContext)
should usePolledTriggerContext.createBuildCustomizer(jetbrains.buildServer.users.SUser)
to create triggered build promotions.- Overrides:
supportsBuildCustomization
in classBuildTriggerService
-
getBuildTriggeringPolicy
@NotNull public BuildTriggeringPolicy getBuildTriggeringPolicy()
Description copied from class:BuildTriggerService
Returns policy used by build trigger to trigger builds.- Specified by:
getBuildTriggeringPolicy
in classBuildTriggerService
- Returns:
- build triggering policy
-
getBranchyVcses
public Map<String,RemoteRunOnBranchTriggerService.BranchyVcs> getBranchyVcses()
-
-