Class SubscriptionsCollection
- java.lang.Object
-
- jetbrains.buildServer.serverSide.tracker.SubscriptionsCollection
-
public class SubscriptionsCollection extends java.lang.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(java.lang.String serializedSubscription)
Creates subscriptions collection from the string
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<EventSubscription>
getSubscriptions()
Returns subscriptions collectionint
getTotalNumberOfEvents(EventTracker tracker)
Returns total number of events corresponding to contained subscriptionsjava.lang.String
serialize()
Serializes this collection of subscriptions to stringvoid
subscribeOnBuildTypeEvent(TrackerEventType event, java.lang.String buildTypeId)
Adds subscription on build configuration related event for specified build configurationvoid
subscribeOnEvent(TrackerEventType event)
Adds subscription on an eventvoid
subscribeOnProjectEvent(TrackerEventType event, java.lang.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 java.lang.String serializedSubscription) throws java.lang.IllegalArgumentException
Creates subscriptions collection from the string- Parameters:
serializedSubscription
- serialized collection of subscriptions- Throws:
java.lang.IllegalArgumentException
- if deserialization failed
-
-
Method Detail
-
subscribeOnProjectEvent
public void subscribeOnProjectEvent(@NotNull TrackerEventType event, @NotNull java.lang.String projectId)
Adds subscription on project related event for specified project- Parameters:
event
- eventprojectId
- project id
-
subscribeOnBuildTypeEvent
public void subscribeOnBuildTypeEvent(@NotNull TrackerEventType event, @NotNull java.lang.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 java.lang.String serialize()
Serializes this collection of subscriptions to string- Returns:
- serialized collection of subscriptions
-
getSubscriptions
public java.util.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
-
-