com.businessobjects.sdk.plugin.desktop.common
Interface IAlertSubscriptions

All Superinterfaces:
java.lang.Iterable

public interface IAlertSubscriptions
extends java.lang.Iterable

This interface exposes information about the subscription of principals (users and groups) to events. This interface can either be obtained from the event or from the principals subscribed to the event. Depending on how this interface was obtained, the IDs used by these methods either represent the SI_ID property of the events or the SI_ID property of the principals subscribed an event. If this interface was obtained from an event, the IDs represent the SI_ID properties of the principals subscribed to the event. If the interface was obtained from principal, the IDs represent the SI_ID properties of events that the principal is subscribed to. Use IEventBase.getAlertSubscriptions() to retrieve this interface from an event. Use ISystemPrincipal.getAlertSubscriptions() or com.crystaldecisions.sdk.plugin.desktop.user.IUserGroup#getAlertSubscriptions to retrieve this interface from a principal.

Since:
4.0

Method Summary
 IAlertSubscription add(int objID)
          Creates a subscription or returns the existing subscription.
 IAlertSubscription get(int objID)
          Returns a subscription.
 java.util.Set getAlertSubscriptionIDs()
          Returns the IDs associated with the alert subscription.
 java.util.Iterator iterator()
          Returns an iterator for this collection.
 boolean remove(int objID)
          Removes a subscription.
 int size()
          Returns the number of subscriptions in this collection.
 

Method Detail

getAlertSubscriptionIDs

java.util.Set getAlertSubscriptionIDs()
Returns the IDs associated with the alert subscription. If this interface was obtained from an event, this method returns the SI_ID properties of the principals subscribed to the event. If this interface was obtained from a principal, this method returns the SI_ID properties of the events that the principal is subscribed to.

Returns:
Set A list SI_ID properties of the event or principal subscribed to an event.

add

IAlertSubscription add(int objID)
Creates a subscription or returns the existing subscription. If this interface was obtained from an event, pass the SI_ID property of the principal to this method to subscribe the principal to the event. If this interface was obtained from a principal, pass the SI_ID property of the event to this method to subscribe the principal to this event.

Note that this call will not block you from creating subscriptions to an event that is not alerting-enabled. Subscribers to an event that is not alerting-enabled will not receive notifications for that event.

Parameters:
objID - The SI_ID property of the event or principal.
Returns:
An IAlertSubscription object that represents the subscription.
See Also:
IAlertSubscriptions.getAlertSubscriptionIDs()

get

IAlertSubscription get(int objID)
Returns a subscription. If this interface was obtained from an event, use the SI_ID property of the principal to obtain subscription details about the principal subscribed to the event. If this interface was obtained from a principal, pass the ID of the event to this method to obtain subscription details about the principal to the event.

Parameters:
objID - The ID of the event or principal.
Returns:
An IAlertSubscription object that represents the subscription of the principal to the event.
See Also:
IAlertSubscriptions.getAlertSubscriptionIDs()

remove

boolean remove(int objID)
Removes a subscription. If this interface was obtained from an event, pass the ID of the principal to this method to remove the subscription of the principal to the event. If this interface was obtained from a principal, pass the ID of the event to this method to remove the subscription of the principal to the event.

Parameters:
objID - The ID of the event or principal.
Returns:
true if the subscription was removed successfully, false otherwise.
See Also:
IAlertSubscriptions.getAlertSubscriptionIDs()

iterator

java.util.Iterator iterator()
Returns an iterator for this collection.

Specified by:
iterator in interface java.lang.Iterable
Returns:
An Iterator that is used to retrieve IAlertSubscription objects.

size

int size()
Returns the number of subscriptions in this collection. If this interface was obtained from an event, this method returns the number of principals that are subscribed to the event. If this interface was obtained from a principal, this method returns the number of events the principal is subscribed to.

Returns:
The number of alert subscriptions in this collection.