Class SubscriptionsCollection
- java.lang.Object
-
- jetbrains.buildServer.serverSide.tracker.SubscriptionsCollection
-
public class SubscriptionsCollection extends Object
Represents serializable subscriptions collection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SubscriptionsCollection.SubscriptionFactory
-
Constructor Summary
Constructors Constructor Description SubscriptionsCollection()
Constructor.SubscriptionsCollection(String serializedSubscription)
Creates subscriptions collection from the string
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<EventSubscription>
getSubscriptions()
Returns subscriptions collectionint
getTotalNumberOfEvents(EventTracker tracker)
Returns total number of events corresponding to contained subscriptionsString
serialize()
Serializes this collection of subscriptions to stringvoid
subscribeOnBuildTypeEvent(TrackerEventType event, String buildTypeId)
Adds subscription on build configuration related event for specified build configurationvoid
subscribeOnEvent(TrackerEventType event)
Adds subscription on an eventvoid
subscribeOnProjectEvent(TrackerEventType event, String projectId)
Adds subscription on project related event for specified projectvoid
subscribeOnUserEvent(TrackerEventType event, long userId)
Adds subscription on user related event for specified user
-
-
-
Constructor Detail
-
SubscriptionsCollection
public SubscriptionsCollection()
Constructor.
-
SubscriptionsCollection
public SubscriptionsCollection(@NotNull String serializedSubscription) throws IllegalArgumentException
Creates subscriptions collection from the string- Parameters:
serializedSubscription
- serialized collection of subscriptions- Throws:
IllegalArgumentException
- if deserialization failed
-
-
Method Detail
-
subscribeOnProjectEvent
public void subscribeOnProjectEvent(@NotNull TrackerEventType event, @NotNull String projectId)
Adds subscription on project related event for specified project- Parameters:
event
- eventprojectId
- project id
-
subscribeOnBuildTypeEvent
public void subscribeOnBuildTypeEvent(@NotNull TrackerEventType event, @NotNull String buildTypeId)
Adds subscription on build configuration related event for specified build configuration- Parameters:
event
- eventbuildTypeId
- build configuration id
-
subscribeOnUserEvent
public void subscribeOnUserEvent(@NotNull TrackerEventType event, long userId)
Adds subscription on user related event for specified user- Parameters:
event
- eventuserId
- id of the user
-
subscribeOnEvent
public void subscribeOnEvent(@NotNull TrackerEventType event)
Adds subscription on an event- Parameters:
event
- event
-
serialize
public String serialize()
Serializes this collection of subscriptions to string- Returns:
- serialized collection of subscriptions
-
getSubscriptions
public Collection<EventSubscription> getSubscriptions()
Returns subscriptions collection- Returns:
- subscriptions collection
-
getTotalNumberOfEvents
public int getTotalNumberOfEvents(@NotNull EventTracker tracker)
Returns total number of events corresponding to contained subscriptions- Parameters:
tracker
- event tracker- Returns:
- total number of events
-
-