jetbrains.buildServer.status
Interface StatusProvider


public interface StatusProvider

This class contains a set of methods used by various notifiers to represent it's status. WARNING: please don't use this class, most likely it will change in the future.


Method Summary
 ResponsibilityStatus getWatchedBuildsResponsibilityStatus(User user, Notificator notificator)
          Returns aggregated (worst) responsibility status of the builds watched by the user.
 Status getWatchedBuildsStatus(User user, java.lang.String notificatorType)
          Returns aggregated (worst) status of the builds watched by the user.
 Status getWatchedBuildsStatus(User user, java.lang.String notificatorType, jetbrains.buildServer.util.filters.Filter<BuildType> filter)
          Returns aggregated (worst) status of the builds watched by the user.
 java.util.SortedMap<SProject,java.util.List<SBuildType>> getWatchedBuildTypes(User user, java.lang.String notificatorType)
          Returns map of build configurations per project watched by the specified user.
 java.util.Collection<java.lang.Long> getWatchers(BuildType configuration, java.lang.String notificatorType)
          Returns collection of user ids who watch this configuration
 Status getWorstBuildTypesStatus(java.util.List<? extends BuildType> buildTypes)
          Returns aggregated (worst) status among specified build configurations.
 

Method Detail

getWatchedBuildsStatus

Status getWatchedBuildsStatus(User user,
                              java.lang.String notificatorType)
Returns aggregated (worst) status of the builds watched by the user. Watched builds are those which correspond to build configurations mentioned in the user notification rules NotificationRule for specified notificator.

Note: paused build configurations and personal builds are ignored and do not affect calculated status.

Parameters:
user - user for which status is calculated
notificatorType - type of notificator, see Notificator.getNotificatorType()
Returns:
worst status among all watched builds

getWatchedBuildsStatus

Status getWatchedBuildsStatus(User user,
                              java.lang.String notificatorType,
                              jetbrains.buildServer.util.filters.Filter<BuildType> filter)
Returns aggregated (worst) status of the builds watched by the user. Watched builds are those which correspond to build configurations mentioned in the user notification rules NotificationRule for specified notificator and accepted by the specified filter.

Note: paused build configurations and personal builds are ignored and do not affect calculated status.

Parameters:
user - user for which status is calculated
notificatorType - type of notificator, see Notificator.getNotificatorType()
filter - build confidurations filter
Returns:
worst status among filtered watched builds

getWatchedBuildsResponsibilityStatus

ResponsibilityStatus getWatchedBuildsResponsibilityStatus(User user,
                                                          Notificator notificator)
Returns aggregated (worst) responsibility status of the builds watched by the user. Watched builds are those which correspond to build configurations mentioned in the user notification rules NotificationRule for specified notificator.

Note: paused build configurations and personal builds are ignored and do not affect calculated status.

Parameters:
user - user for which status is calculated
notificator - notificator for which status is calculated
Returns:
worst status among all watched builds

getWorstBuildTypesStatus

Status getWorstBuildTypesStatus(java.util.List<? extends BuildType> buildTypes)
Returns aggregated (worst) status among specified build configurations.

Note: paused build configurations are ignored and do not affect calculated status.

Parameters:
buildTypes - build configurations to compute status on
Returns:
worst status among specified build configurations

getWatchedBuildTypes

java.util.SortedMap<SProject,java.util.List<SBuildType>> getWatchedBuildTypes(User user,
                                                                              java.lang.String notificatorType)
Returns map of build configurations per project watched by the specified user. Watched projects and build configurations are those mentioned in the user notification rules NotificationRule for specified notificator. The map includes paused build configurations and build configurations with running personal builds owned by specified user.

Projects in map are sorted according to user settings.

Parameters:
user - user, whose watched build configurations are returned
notificatorType - type of notificator, see Notificator.getNotificatorType()
Returns:
see above

getWatchers

java.util.Collection<java.lang.Long> getWatchers(BuildType configuration,
                                                 java.lang.String notificatorType)
Returns collection of user ids who watch this configuration

Parameters:
configuration - specified configuration
notificatorType - specified notificatir type, see Notificator.getNotificatorType()
Returns:
collection of all user ids for whom the configuration is watched for the given notificator type