Package wt.notify

Interface NotificationManager

All Known Implementing Classes:
StandardNotificationManager

@RemoteInterface public interface NotificationManager
NotificationManager provides client invokable methods to notification services. These methods are executed on the server side. The methods support manipulation and execution of the notification rules and lists.

Supported API: true

Extendable: false
  • Method Details

    • createNotificationRule

      void createNotificationRule(AdminDomainRef domain_ref, String type_id, String event_key, Vector principal_refs) throws WTException
      Creates a notification policy rule defining which users and groups should be notified when a specified event occurs for an object of a specified type, within a domain.

      Supported API: true
      Parameters:
      domain_ref - reference to the domain the rule is for
      type_id - logical or persisted type identifier
      event_key - event key (defined in the wt.admin.adminEventResource resource bundle)
      principal_refs - principal references for notification recipients (Vector of WTPrincipalReference)
      Throws:
      WTException
    • deleteNotificationRule

      void deleteNotificationRule(AdminDomainRef domain_ref, String type_id, String event_key) throws WTException
      Deletes a notification policy rule defining which users and groups should be notified when a specified event occurs for an object of a specified type, within a domain.

      Supported API: true
      Parameters:
      domain_ref - reference to the domain the rule is for
      type_id - logical or persisted type identifier
      event_key - event key (defined in the wt.admin.adminEventResource resource bundle)
      Throws:
      WTException
    • updateNotificationRule

      void updateNotificationRule(AdminDomainRef domain_ref, String type_id, String event_key, Vector principal_refs) throws WTException
      Updates a notification policy rule defining which users and groups should be notified when a specified event occurs for an object of a specified type, within a domain.

      Supported API: true
      Parameters:
      domain_ref - reference to the domain the rule is for
      type_id - logical or persisted type identifier
      event_key - event key (defined in the wt.admin.adminEventResource resource bundle)
      principal_refs - principal references for notification recipients (Vector of WTPrincipalReference)
      Throws:
      WTException
    • updateNotificationLists

      void updateNotificationLists(Selector selector) throws WTException
      Deprecated.
      Update the list of the selector and all lists associated with selectors that are more specific than the given one.

      This method is no longer needed. The createNotificationRule, deleteNotificationRule, and updateNotificationRule methods update the lists.

      Supported API: true

      Parameters:
      selector -
      Throws:
      WTException
      See Also:
    • subscribeToObject

      void subscribeToObject(Vector subscribers, ObjectSubscription subscription) throws WTException
      Deprecated.
      This api was for pre-R9.0 subscriptions. As of R9.0 use one of the supported createObjectSubscription apis to create subscriptions.
      Subscribes to object event. Subscribers is a vector of principals (users and groups), teams and subscriber objects (or references to them). ObjectSubscription contains the subscription information. If the ObjectSubscription object is persistent then the key of the newly created subscriptions will be the same; otherwise a new key is generated. This latter feature allows the user of this method to "add" subscriptions to a user action. A side effect of this method is that the target object's event set may be updated (if a subscription for an event not already in the event set is added).

      Supported API: true
      Parameters:
      subscribers -
      subscription -
      Throws:
      WTException
    • unsubscribeToObject

      void unsubscribeToObject(Vector subscriptions) throws WTException
      Deprecated.
      This api was for pre-R9.0 subscriptions. As of R9.0 use one of the supported unsubscribe apis to unsubscribe from subscriptions.
      Deletes all object subscriptions passed as argument.

      Supported API: true
      Parameters:
      subscriptions -
      Throws:
      WTException
    • createObjectSubscription

      CompositeNotificationSubscription createObjectSubscription(NotificationSubscription subscriptionAttributes, NotifySubscriptionRecipient subscriber, Notifiable targetObject, HashMap<String,WTStringMap> eventKeysAndAttributeValueMaps, boolean subscribeAllVersions) throws WTException
      Creates a notification subscription for an object. When subscribing to an object, events are selected for the object and when any of those events occur for the object the subscription is satisfied. When a subscription is satisfied a notification email is sent to the principal subscribers; for ObjectSubscriptionListener subscribers a method is called for the subscribed object and the object performs whatever action is desired.

      Supported API: true
      Parameters:
      subscriptionAttributes - Required. The NotificationSubscription object for this subscription. Set the object attributes to the desired values if the default values are not sufficient.
      subscriber - Required. The subscription recipient. The subscriber specified in the NotifySubscriptionRecipient must be a user, group, organization, or ObjectSubscriptionListener object.
      targetObject - Required, The target object for this subscription.
      eventKeysAndAttributeValueMaps - Map containing the events being subscribed to and, optionally, attribute name/value pairs that also apply for the event. The map keys are the events being subscribed to. The map values are optional WTStringMaps which contain attribute name/value pairs that also apply for an event. If you don't want an attribute for an event, add the event to the map as the key and null as the value. If you do want an attribute, add a WTStringMap as the value where its key is the attribute name and its value is the attribute value. If an attribute is specified for an event, the subscription will only fire when the event occurs for the target object if the target has the specified attribute and the target's attribute value is the same as the specified value.
      subscribeAllVersions - Boolean to indicate if the subscription applies to all versions, present and future, of the specified object or just the current version of the specified object. Specify true to indicate the subscription applies to all versions of an object.
      Returns:
      CompositeNotificationSubscription
      Throws:
      WTException
      See Also:
    • createObjectSubscriptions

      CompositeNotificationSubscription createObjectSubscriptions(NotificationSubscription subscriptionAttributes, WTCollection subscribers, WTCollection targetObjects, HashMap<String,WTStringMap> eventKeysAndAttributeValueMaps, boolean subscribeAllVersions) throws WTException
      Creates notification subscriptions for one or more objects. When subscribing to an object, events are selected for the object and when any of those events occur for the object the subscription is satisfied. When a subscription is satisfied a notification email is sent to the principal subscribers; for ObjectSubscriptionListener subscribers a method is called for the subscribed object and the object performs whatever action is desired.

      Supported API: true
      Parameters:
      subscriptionAttributes - Required. The NotificationSubscription object for this subscription. Set the object attributes to the desired values if the default values are not sufficient.
      subscribers - Required. The subscription recipients. The collection must contain NotifySubscriptionRecipient objects. The subscriber specified in each NotifySubscriptionRecipient must be a user, group, organization, or ObjectSubscriptionListener object. The recipients can be a mix of users, groups, and ObjectSubscriptionListeners.
      targetObjects - Required. Collection containing the objects to be subscribed to.
      eventKeysAndAttributeValueMaps - Map containing the events being subscribed to and, optionally, attribute name/value pairs that also apply for the event. The map keys are the events being subscribed to. The map values are optional WTStringMaps which contain attribute name/value pairs that also apply for an event. If you don't want an attribute for an event, add the event to the map as the key and null as the value. If you do want an attribute, add a WTStringMap as the value where its key is the attribute name and its value is the attribute value. If an attribute is specified for an event, the subscription will only fire when the event occurs for the target object if the target has the specified attribute and the target's attribute value is the same as the specified value.
      subscribeAllVersions - Boolean to indicate if the subscription applies to all versions, present and future, of the specified object or just the current version of the specified object. Specify true to indicate the subscription applies to all versions of an object.
      Returns:
      CompositeNotificationSubscription
      Throws:
      WTException
      See Also:
    • createTypeBasedContainerSubscriptions

      CompositeNotificationSubscription createTypeBasedContainerSubscriptions(NotificationSubscription subscriptionAttributes, WTCollection subscribers, WTCollection targetContainers, ArrayList<String> targetTypes, HashMap<String,WTStringMap> eventKeysAndAttributeValueMaps) throws WTException
      Creates notification subscriptions for one or more containers. When subscribing to a container, events and types are selected for the container. When any of the events occur for an object that resides in the container AND is one of the selected types, the subscription is satisfied. When a subscription is satisfied a notification email is sent to the principal subscribers; for ObjectSubscriptionListener subscribers a method is called for the subscribed object and the object can perform whatever action is desired. When subscribing to a container, if the container's type is one of the types specified, the subscription will apply to the container itself (e.g., if a specified event occurs on the container, the subscription is satisfied).

      Supported API: true
      Parameters:
      subscriptionAttributes - Required. The NotificationSubscription object for this subscription. Set the object attributes to the desired values if the default values are not sufficient.
      subscribers - Required. The subscription recipients. The collection must contain NotifySubscriptionRecipient objects. The subscriber specified in each NotifySubscriptionRecipient must be a user, group, organization, or ObjectSubscriptionListener object. The recipients can be a mix of users, groups, and ObjectSubscriptionListeners.
      targetContainers - Required. Collection containing the containers to be subscribed to.
      targetTypes - List of type names being subscribed to in each container. The type names are specified in internal type name format (e.g., wt.part.WTPart).
      eventKeysAndAttributeValueMaps - Map containing the events being subscribed to and, optionally, attribute name/value pairs that also apply for the event. The map keys are the events being subscribed to. The map values are optional WTStringMaps which contain attribute name/value pairs that also apply for an event. If you don't want an attribute for an event, add the event to the map as the key and null as the value. If you do want an attribute, add a WTStringMap as the value where its key is the attribute name and its value is the attribute value. If an attribute is specified for an event, the subscription will only fire when the event occurs for the target object if the target has the specified attribute and the target's attribute value is the same as the specified value.
      Returns:
      CompositeNotificationSubscription
      Throws:
      WTException
      See Also:
    • createTypeBasedFolderSubscriptions

      CompositeNotificationSubscription createTypeBasedFolderSubscriptions(NotificationSubscription subscriptionAttributes, WTCollection subscribers, WTCollection targetFolders, ArrayList<String> targetTypes, HashMap<String,WTStringMap> eventKeysAndAttributeValueMaps, boolean includeSubfolders) throws WTException
      Creates notification subscriptions for one or more folders. When subscribing to a folder, events and types are selected for the folder. When any of the events occur for an object that resides in the folder AND is one of the selected types, the subscription is satisfied. When a subscription is satisfied a notification email is sent to the principal subscribers; for ObjectSubscriptionListener subscribers a method is called for the subscribed object and the object can perform whatever action is desired. When subscribing to a folder, if the folder type is one of the types specified, the subscription will apply to the folder itself and any folders contained in the folder (e.g., if a specified event occurs on the folder itself, the subscription is satisfied OR if a specified event occurs on a folder contained in the folder, the subscription is satisfied).

      Supported API: true
      Parameters:
      subscriptionAttributes - Required. The NotificationSubscription object for this subscription. Set the object attributes to the desired values if the default values are not sufficient.
      subscribers - Required. The subscription recipients. The collection must contain NotifySubscriptionRecipient objects. The subscriber specified in each NotifySubscriptionRecipient must be a user, group, organization, or ObjectSubscriptionListener object. The recipients can be a mix of users, groups, and ObjectSubscriptionListeners.
      targetFolders - Required. Collection containing the folders to be subscribed to.
      targetTypes - List of type names being subscribed to in each folder. The type names are specified in internal type name format (e.g., wt.part.WTPart).
      eventKeysAndAttributeValueMaps - Map containing the events being subscribed to and, optionally, attribute name/value pairs that also apply for the event. The map keys are the events being subscribed to. The map values are optional WTStringMaps which contain attribute name/value pairs that also apply for an event. If you don't want an attribute for an event, add the event to the map as the key and null as the value. If you do want an attribute, add a WTStringMap as the value where its key is the attribute name and its value is the attribute value. If an attribute is specified for an event, the subscription will only fire when the event occurs for the target object if the target has the specified attribute and the target's attribute value is the same as the specified value.
      includeSubfolders - Currently, this parameter is unsupported and is ignored.
      Returns:
      CompositeNotificationSubscription
      Throws:
      WTException
      See Also:
    • deleteSubscription

      void deleteSubscription(NotificationSubscription subscription) throws WTException
      Deletes the subscription for the input NotificationSubscription object and also deletes all of its associated subscription recipients and subscription targets (the NotifySubscriptionRecipient and NotifySubscritpionTarget objects).

      Supported API: true
      Parameters:
      subscription - Required. The NotificationSubscription object representing the subscription to be deleted.
      Throws:
      WTException
    • deleteSubscription

      void deleteSubscription(ObjectReference subscriptionRef) throws WTException
      Deletes the subscription for the input NotificationSubscription reference and also deletes all of its associated subscription recipients and subscription targets (the NotifySubscriptionRecipient and NotifySubscritpionTarget objects).

      Supported API: true
      Parameters:
      subscriptionRef - Required. Reference to the subscription's NotificationSubscription object.
      Throws:
      WTException
      See Also:
    • deleteSubscriptions

      void deleteSubscriptions(WTSet subscriptions) throws WTException
      Deletes the subscriptions for the set of input NotificationSubscription objects (or referenced) and also deletes each subscription's associated subscription recipients and subscription targets (the NotifySubscriptionRecipient and NotifySubscritpionTarget objects).

      Supported API: true
      Parameters:
      subscriptions - Required. Set containing the NotificationSubscription objects (or references to the objects) for the subscriptions to be deleted.
      Throws:
      WTException
      See Also:
    • unsubscribe

      void unsubscribe(NotificationSubscription subscription, Persistable subscriber, boolean deleteSubscription) throws WTException
      Unsubscribes the specified subscriber from the specified subscription.

      Supported API: true
      Parameters:
      subscription - Required. The subscription's NotificationSubscription object.
      subscriber - Required. The subscriber object being unsubscribed from the subscription.
      deleteSubscription - If true, the subscription is deleted if there are no more subscribers after unsubscribing the specified subscriber.
      Throws:
      WTException
    • unsubscribe

      void unsubscribe(ObjectReference subscriptionRef, WTReference subscriberRef, boolean deleteSubscription) throws WTException
      Unsubscribes the specified subscriber from the specified subscription.

      Supported API: true
      Parameters:
      subscription - Required. Reference to the subscription's NotificationSubscription object.
      subscriber - Required. Reference to the subscriber object being unsubscribed from the subscription.
      deleteSubscription - If true, the subscription is deleted if there are no more subscribers after unsubscribing the specified subscriber.
      Throws:
      WTException
      See Also:
    • getNotificationSubscription

      CompositeNotificationSubscription getNotificationSubscription(ObjectIdentifier subscriptionOID, NotificationSubscription.CheckAccess checkAccess) throws WTException
      Returns the CompositeNotificationSubscription that matched the input NotificationSubscription OID. A CompositeNotificationSubscription contains all the parts that make up a Notification Service subscription (the NotificationSubscription is one of those parts).

      The subscription returned is subject to access control. The subscription is returned only if the Session User 1) has Read access for the NotificationSubscription object or 2) is one of the subscription recipients or a member of a subscribed Group.

      If no matching subscriptions are found either an empty collection or null is returned.

      Supported API: true

      Parameters:
      subscriptionOID - The OID of the NotificationSubscription object for the subscription to be returned. If the value is null or the NotificationSubscription object no longer exists, null is returned.
      checkAccess - By default the subscription object is returned only if the Session User has Read access to the subscription object or is one of the subscribers. This parameter indicates wihether additional read access checks should be done for each subscription subscriber or target. Possible values are:
      • CheckAccess.SUBSCRIPTION_SUBSCRIBER_OBJECTS - Only include a subscription recipient if the Session user has Read access to the object referenced by the subscriberRef.
      • CheckAccess.SUBSCRIPTION_TARGET_OBJECTS - Only include a subscription target if the Session user has Read access to the object referenced by the targetRef.
      • CheckAccess.SUBSCRIPTION_SUBSCRIBER_AND_TARGET_OBJECTS - Do both of the above access checks.
      If null is specified, no additional access checks are done.
      Returns:
      CompositeNotificationSubscription
      Throws:
      WTException
      See Also:
    • getNotificationSubscriptions

      Collection<CompositeNotificationSubscription> getNotificationSubscriptions(String subscriptionName, NotificationSubscription.CheckAccess checkAccess) throws WTException
      Returns a collection containing the CompositeNotificationSubscriptions that matched the input subscription name. A CompositeNotificationSubscription contains all the parts that make up a Notification Service subscription.

      The subscriptions returned are subject to access control. A matching subscription is included in the return collection only if the Session User 1) has Read access for the NotificationSubscription object for the subscription or 2) is one of the subscription recipients or a member of a subscribed Group.

      If no matching subscriptions are found either an empty collection or null is returned.

      Supported API: true

      Parameters:
      subscriptionName - The subscription name to search for. If the value is null, an empty collection is returned. If no subscriptions are found for the name, an empty collection or null is returned.
      checkAccess - By default subscription objects are included in the return collection only if the Session User has Read access to the subscription object or is one of the subscribers. This parameter indicates wihether additional read access checks should be done for each subscription subscriber or target. Possible values are:
      • CheckAccess.SUBSCRIPTION_SUBSCRIBER_OBJECTS - Only include a subscription recipient if the Session user has Read access to the object referenced by the subscriberRef.
      • CheckAccess.SUBSCRIPTION_TARGET_OBJECTS - Only include a subscription target if the Session user has Read access to the object referenced by the targetRef.
      • CheckAccess.SUBSCRIPTION_SUBSCRIBER_AND_TARGET_OBJECTS - Do both of the above access checks.
      If null is specified, no additional access checks are done.
      Returns:
      Collection
      Throws:
      WTException
    • getNotificationSubscriptions

      Collection<CompositeNotificationSubscription> getNotificationSubscriptions(Notifiable target, Persistable subscriber, String eventKey, String subscriptionKey) throws WTException
      Deprecated.
      Instead use: getNotificationSubscriptions(ObjectReference targetRef, ObjectReference subscriberRef, String eventKey, String subscriptionKey)
      Returns a collection containing the CompositeNotificationSubscriptions that matched the input search criteria. A CompositeNotificationSubscription contains all the parts that make up a Notification Service subscription.

      The subscriptions returned are subject to access control. A matching subscription is included in the return collection only if the Session User 1) has Read access for the NotificationSubscription object for the subscription or 2) is one of the subscription recipients or a member of a subscribed Group.

      If no matching subscriptions are found either an empty collection or null is returned.

      Supported API: true

      Parameters:
      target - The target of the subscription to search for. If null, target is not part of the search criteria and all targets for any subscriptions matching the other input parameters are returned.
      subscriber - The subcriber to search for. If null, subscriber is not part of the search criteria and all subscriberss for any subscriptions matching the other input parameters are returned. Any subscriptions that have Owner Ref or a Group as one of the subscribers are not resolved to see if the input subscriber is the subscription target object owner or a member of a subscribed group.
      eventKey - The target event key to search for. If null, event key is not part of the search criteria.
      subscriptionKey - The subscriptionKey value to match. If null, subscriptionKey is not part of the search criteria.
      Returns:
      Collection
      Throws:
      WTException
    • getNotificationSubscriptions

      Collection<CompositeNotificationSubscription> getNotificationSubscriptions(ObjectReference targetRef, ObjectReference subscriberRef, String eventKey, String subscriptionKey) throws WTException
      Returns a collection containing the CompositeNotificationSubscriptions that matched the input search criteria. A CompositeNotificationSubscription contains all the parts that make up a Notification Service subscription.

      The subscriptions returned are subject to access control. A matching subscription is included in the return collection only if the Session User 1) has Read access for the NotificationSubscription object for the subscription or 2) is one of the subscription recipients or a member of a subscribed Group.

      If no matching subscriptions are found either an empty collection or null is returned.

      Supported API: true

      Parameters:
      targetRef - The target of the subscription to search for. If null, targetRef is not part of the search criteria and all targets for any subscriptions matching the other input parameters are returned.
      subscriberRef - The subcriber to search for. If null, subscriberRef is not part of the search criteria and all subscribers for any subscriptions matching the other input parameters are returned. Any subscriptions that have a Group as one of the subscribers are not resolved to see if the input subscriber is a member of a subscribed group.
      eventKey - The target event key to search for. If null, event key is not part of the search criteria.
      subscriptionKey - The subscriptionKey value to match. If null, subscriptionKey is not part of the search criteria.
      Returns:
      Collection
      Throws:
      WTException
    • getNotificationSubscriptions

      Deprecated.
      Instead use: getNotificationSubscriptions( ObjectReference targetRef, String eventKey, ObjectReference subscriberRef, SubscriberRole subscriberRole, IncludeOwnerRefSubscriber includeOwnerRefSubscriber, IncludeSubscribersParentGroups includeSubscribersParentGroups, SubscriberType returnSubscriberType, DeliveryMethod deliveryMethod, String subscriptionKey, AddTargetMetaData addTargetMetaData, CheckAccess checkAccess )
      Returns a collection containing the CompositeNotificationSubscriptions that matched the input search criteria. A CompositeNotificationSubscription contains all the parts that make up a Notification Service subscription.

      The subscriptions returned are subject to access control. A matching subscription is included in the return collection only if the Session User 1) has Read access for the NotificationSubscription object for the subscription or 2) is one of the subscription recipients or a member of a subscribed Group.

      If no matching subscriptions are found either an empty collection or null is returned.

      Supported API: true

      Parameters:
      target - The target object of the subscription to match. If null is specified, target object is not part of the search criteria and all targets for any subscriptions matching the other input parameters are returned.
      eventKey - The target event key to match. If null is specified, event key is not part of the search criteria.
      subscriber - The subscription subcriber (also referred to as the recipient) to search for. If null is specified, subscriber is not part of the search criteria.
      subscriberRole - The role the input subscriber plays in subscriptions to search for. Possible values are:
      • SubscriberRole.OWNER - include subscriptions where the input subscriber is the subscription Owner, but may or may not be a subscriber
      • SubscriberRole.NOT_OWNER - include subscriptions where the input subscriber is NOT the subscription Owner, but may or may not be a subscriber
      • SubscriberRole.SUBSCRIBER - include subscriptions where the input subscriber is one of the subscribers, but may or may not be the Owner
      • SubscriberRole.SUBSCRIBER_AND_NOT_OWNER - include subscriptions where the input subscriber is one of the subscribers AND is NOT the Owner
      • SubscriberRole.OWNER_AND_SUBSCRIBER - include subscriptions where the input subscriber is the Owner AND one of the subscribers
      • SubscriberRole.OWNER_OR_SUBSCRIBER - include subscriptions where the input subscriber is either the Owner OR one of the subscribers.
      If null is specified, this value defaults to SUBSCRIBER. This parameter is ignored if subscriber is null.
      includeOwnerRefSubscriber - Subscriptions can have the subscriber WTPrincipalReference.OWNER that represents the Principal that owns the subscription target. This parameter indicates whether any WTPrincipalReference.OWNER subscribers should be resolved to the subscription target owner and compared to the subscriber parameter as part of the processing to determine whether the input subscriber is one of the subscription recipients. Possible values are:
      • IncludeOwnerRefSubscribers.YES
      • IncludeOwnerRefSubscribers.NO
      If null is specified, this value defaults to YES. This parameter is ignored if the subscriber parameter isn't a WTPrincipal or is null.
      includeSubscribersParentGroups - For subscriber values that are principal's this parameter indicates whether the subscriber parent groups should be included in the list of subscription subscribers when searching for subscriptions. Possible values are:
      • IncludeSubscribersParentGroups.YES
      • IncludeSubscribersParentGroups.NO
      If null is specified, this value defaults to YES. This parameter is ignored if the subscriber parameter isn't a WTPrincipal or is null.
      returnSubscriberType - Indicates the type of subscriber to match. Subscribers can be either Principals or Listener objects. Possible values are:
      • ReturnSubscriberType.PRINCIPAL_SUBSCRIBER
      • ReturnSubscriberType.LISTENER_SUBSCRIBER
      • ReturnSubscriberType.ANY_SUBSCRIBER
      If null is specified, this value defaults to ANY_SUBSCRIBER.
      deliveryMethod - Indicates the subscription delivery method value to match. Possible values are:
      • DeliveryMethod.IMMEDIATE
      • DeliveryMethod.SCHEDULED
      • DeliveryMethod.ANY
      If null is specified, this value defaults to ANY.
      subscriptionKey - The subscriptionKey value to match. If null is specified, subscriptionKey is not part of the search criteria.
      addTargetMetaData - Indicates whether each CompositeNotificationSubscription object in the return collection should include meta data for each of their contained subscription targets. Currently, the meta data for each subscription target includes: target data type and the data type display string. Possible values are:
      • AddTargetMetaData.YES
      • AddTargetMetaData.NO
      If null is specified, this value defaults to NO.
      checkAccess - By default subscription objects are included in the return collection only if the Session User has Read access to the subscription object or is one of the subscribers. This parameter indicates wihether additional read access checks should be done for each subscription subscriber or target. Possible values are:
      • CheckAccess.SUBSCRIPTION_SUBSCRIBER_OBJECTS - Only include a subscription recipient if the Session user has Read access to the object referenced by the subscriberRef.
      • CheckAccess.SUBSCRIPTION_TARGET_OBJECTS - Only include a subscription target if the Session user has Read access to the object referenced by the targetRef.
      • CheckAccess.SUBSCRIPTION_SUBSCRIBER_AND_TARGET_OBJECTS - Do both of the above access checks.
      If null is specified, no additional access checks are done.
      Returns:
      Collection
      Throws:
      WTException
    • getNotificationSubscriptions

      Returns a collection containing the CompositeNotificationSubscriptions that matched the input search criteria. A CompositeNotificationSubscription contains all the parts that make up a Notification Service subscription.

      The subscriptions returned are subject to access control. A matching subscription is included in the return collection only if the Session User 1) has Read access for the NotificationSubscription object for the subscription or 2) is one of the subscription recipients or a member of a subscribed Group.

      If no matching subscriptions are found either an empty collection or null is returned.

      Supported API: true

      Parameters:
      targetRef - Reference to the target object of the subscription to match. If null is specified, target object is not part of the search criteria and all targets for any subscriptions matching the other input parameters are returned.
      eventKey - The target event key to match. If null is specified, event key is not part of the search criteria.
      subscriberRef - Reference to the subscription subcriber to search for. If null is specified, subscriber is not part of the search criteria.
      subscriberRole - The role the input subscriber plays in subscriptions to search for. Possible values are:
      • SubscriberRole.OWNER - include subscriptions where the input subscriber is the subscription Owner, but may or may not be a subscriber
      • SubscriberRole.NOT_OWNER - include subscriptions where the input subscriber is NOT the subscription Owner, but may or may not be a subscriber
      • SubscriberRole.SUBSCRIBER - include subscriptions where the input subscriber is one of the subscribers, but may or may not be the Owner
      • SubscriberRole.SUBSCRIBER_AND_NOT_OWNER - include subscriptions where the input subscriber is one of the subscribers AND is NOT the Owner
      • SubscriberRole.OWNER_AND_SUBSCRIBER - include subscriptions where the input subscriber is the Owner AND one of the subscribers
      • SubscriberRole.OWNER_OR_SUBSCRIBER - include subscriptions where the input subscriber is either the Owner OR one of the subscribers.
      If null is specified, this value defaults to SUBSCRIBER. This parameter is ignored if subscriberRef is null.
      includeOwnerRefSubscriber - Subscriptions can have the subscriber WTPrincipalReference.OWNER that represents the Principal that owns the subscription target. This parameter indicates whether any WTPrincipalReference.OWNER subscribers should be resolved to the subscription target owner and compared to the subscriber parameter as part of the processing to determine whether the input subscriber is one of the subscription recipients. Possible values are:
      • IncludeOwnerRefSubscribers.YES
      • IncludeOwnerRefSubscribers.NO
      If null is specified, this value defaults to YES. This parameter is ignored if the subscriber parameter isn't a WTPrincipal or is null.
      includeSubscribersParentGroups - For subscriber values that are principals this parameter indicates whether the subscriber parent groups should be included in the list of subscription subscribers when searching for subscriptions. Possible values are:
      • IncludeSubscribersParentGroups.YES
      • IncludeSubscribersParentGroups.NO
      If null is specified, this value defaults to YES. This parameter is ignored if the subscriber parameter isn't a WTPrincipal or is null.
      returnSubscriberType - Indicates the type of subscriber to match. Subscribers can be either Principals or Listener objects. Possible values are:
      • ReturnSubscriberType.PRINCIPAL_SUBSCRIBER
      • ReturnSubscriberType.LISTENER_SUBSCRIBER
      • ReturnSubscriberType.ANY_SUBSCRIBER
      If null is specified, this value defaults to ANY_SUBSCRIBER.
      deliveryMethod - Indicates the subscription delivery method value to match. Possible values are:
      • DeliveryMethod.IMMEDIATE
      • DeliveryMethod.SCHEDULED
      • DeliveryMethod.ANY
      If null is specified, this value defaults to ANY.
      subscriptionKey - The subscriptionKey value to match. If null is specified, subscriptionKey is not part of the search criteria.
      addTargetMetaData - Indicates whether each CompositeNotificationSubscription object in the return collection should include meta data for each of their contained subscription targets. Currently, the meta data for each subscription target includes: target data type and the data type display string. Possible values are:
      • AddTargetMetaData.YES
      • AddTargetMetaData.NO
      If null is specified, this value defaults to NO.
      checkAccess - By default subscription objects are included in the return collection only if the Session User has Read access to the subscription object or is one of the subscribers. This parameter indicates wihether additional read access checks should be done for each subscription subscriber or target. Possible values are:
      • CheckAccess.SUBSCRIPTION_SUBSCRIBER_OBJECTS - Only include a subscription recipient if the Session user has Read access to the object referenced by the subscriberRef.
      • CheckAccess.SUBSCRIPTION_TARGET_OBJECTS - Only include a subscription target if the Session user has Read access to the object referenced by the targetRef.
      • CheckAccess.SUBSCRIPTION_SUBSCRIBER_AND_TARGET_OBJECTS - Do both of the above access checks.
      If null is specified, no additional access checks are done.
      Returns:
      Collection
      Throws:
      WTException
    • getNotificationSubscriptionRecipients

      WTCollection getNotificationSubscriptionRecipients(ObjectReference targetRef, ObjectReference subscriberRef, String eventKey, String subscriptionKey) throws WTException
      Query API to return only References to the WTPrincipal or ObjectSubscriptionListener objects that are the recipients for any subscription found satisfying the input parameters. The purpose of this API is to avoid the overhead of returning full CompositeNotificationSubscription objects when the caller only needs the subscriber object references.

      Supported API: true
      Parameters:
      targetRef - The target of the subscription to search for. If null, targetRef is not part of the search criteria.
      subscriberRef - The subcriber to search for. Subscribers must be either a WTPrincipal or ObjectSubscriptionListener. If null, subscriberRef is not part of the serach criteria and all subscriber references for any subscriptions matching the other input parameters are returned.
      eventKey - The target event key to search for. If null, event key is not part of the search criteria.
      subscriptionKey - The subscriptionKey value to match. If null, subscriptionKey is not part of the search criteria.
      Returns:
      WTCollection
      Throws:
      WTException
    • getNotificationSubscriptionTargets

      WTCollection getNotificationSubscriptionTargets(ObjectReference targetRef, ObjectReference subscriberRef, String eventKey, String subscriptionKey) throws WTException
      Query API to return only References to the Notifiable objects that are the targets for any subscription found satisfying the input parameters. The purpose of this API is to avoid the overhead of returning full CompositeNotificationSubscription objects when the caller only needs the target object references.

      Supported API: true
      Parameters:
      targetRef - The target of the subscription to search for. If null, targetRef is not part of the search criteria and all target references for any subscriptions matching the other input parameters are returned.
      subscriberRef - The subcriber to search for. Subscribers must be either a WTPrincipal or ObjectSubscriptionListener. If null, subscriber is not part of the serach criteria.
      eventKey - The target event key to search for. If null, event key is not part of the search criteria.
      subscriptionKey - The subscriptionKey value to match. If null, subscriptionKey is not part of the search criteria.
      Returns:
      WTCollection
      Throws:
      WTException
    • getSubscriptionsForTarget

      Collection<CompositeNotificationSubscription> getSubscriptionsForTarget(Notifiable target, boolean includeAllTargets) throws WTException
      Deprecated.
      Instead use: getSubscriptionsForTarget(ObjectReference targetRef, boolean includeAllTargets)
      Returns the collection of subscriptions for the input target object reference. Any subscription that contains the input target object as one of the subscription targets is included in the returned collection of subscriptions. The returned Collection contains CompositeNotificationSubscription objects.

      Supported API: true
      Parameters:
      target -
      includeAllTargets - Boolean to indicate if the returned CompositeNotificationSubscriptions should contain all of the subscription targets or only the targets that matched the input target reference. If true, all subscription targets are included with each CompositeNotificationSubscription.
      Returns:
      Collection
      Throws:
      WTException
    • getSubscriptionsForTarget

      Collection<CompositeNotificationSubscription> getSubscriptionsForTarget(ObjectReference targetRef, boolean includeAllTargets) throws WTException
      Returns the collection of subscriptions for the input target object reference. Any subscription that contains the input target object as one of the subscription targets is included in the returned collection of subscriptions. The returned Collection contains CompositeNotificationSubscription objects.

      Supported API: true
      Parameters:
      targetRef - The target object reference. Any subscription that includes this target object is returned.
      includeAllTargets - Boolean to indicate if the returned CompositeNotificationSubscriptions should contain all of the subscription targets or only the targets that matched the input target reference. If true, all subscription targets are included with each CompositeNotificationSubscription.
      Returns:
      Collection
      Throws:
      WTException
    • hasNotificationSubscriptions

      boolean hasNotificationSubscriptions(ObjectReference targetRef, String eventKey, ObjectReference subscriberRef, NotificationSubscription.IncludeOwnerRefSubscriber includeOwnerRefSubscriber, NotificationSubscription.IncludeSubscribersParentGroups includeSubscribersParentGroups) throws WTException
      Returns a boolean indicating whether any subscriptions exists for the input search criteria. You can specify any combination of target, subscriber, and eventKey. If all are null, false is returned. If the return value is true, one or more subscriptions exist that satisfy the input search criteria.

      Supported API: true
      Parameters:
      targetRef - Reference to the target of the subscription to search for. If null , subscription target is not part of the search criteria.
      eventKey - The target event key to search for. If null, event key is not part of the search criteria.
      subscriberRef - Reference to the subscription subcriber to search for. If null is specified, subscriber is not part of the search criteria.
      includeOwnerRefSubscriber - Subscriptions can have the subscriber WTPrincipalReference.OWNER that represents the Principal that owns the subscription target. This parameter indicates whether any WTPrincipalReference.OWNER subscribers should be resolved to the subscription target owner and compared to the subscriber parameter as part of the processing to determine whether the input subscriber is one of the subscription recipients. Possible values are:
      • IncludeOwnerRefSubscribers.YES
      • IncludeOwnerRefSubscribers.NO
      If null is specified, this value defaults to YES. This parameter is ignored if the subscriber parameter isn't a WTPrincipal or is null.
      includeSubscribersParentGroups - For subscriber values that are principals this parameter indicates whether the subscriber parent groups should be included in the list of subscription subscribers when searching for subscriptions. Possible values are:
      • IncludeSubscribersParentGroups.YES
      • IncludeSubscribersParentGroups.NO
      If null is specified, this value defaults to YES. This parameter is ignored if the subscriber parameter isn't a WTPrincipal or is null.
      Returns:
      boolean
      Throws:
      WTException
    • createTypeBasedFolderSubscriptions

      WebCompositeNotificationSubscription createTypeBasedFolderSubscriptions(wt.notify.WebNotificationSubscription subscriptionAttributes, WTCollection subscribers, WTCollection targetFolders, ArrayList<String> targetTypes, HashMap<String,WTStringMap> eventKeysAndAttributeValueMaps, boolean includeSubfolders) throws WTException
      Creates notification subscriptions for one or more folders. When subscribing to a folder, events and types are selected for the folder. When any of the events occur for an object that resides in the folder AND is one of the selected types, the subscription is satisfied. When a subscription is satisfied a notification email is not sent to the principal subscribers but it fetch payload data and will invoke webhook url When subscribing to a folder, if the folder type is one of the types specified, the subscription will apply to the folder itself and any folders contained in the folder (e.g., if a specified event occurs on the folder itself, the subscription is satisfied OR if a specified event occurs on a folder contained in the folder, the subscription is satisfied).

      Supported API: true
      Parameters:
      subscriptionAttributes - Required. The WebNotificationSubscription object for this subscription. Set the object attributes to the desired values if the default values are not sufficient.
      subscribers - Required. The subscription recipients. The collection must contain NotifySubscriptionRecipient objects. The subscriber specified in each NotifySubscriptionRecipient must be a user, group, organization, or ObjectSubscriptionListener object. The recipients can be a mix of users, groups, and ObjectSubscriptionListeners.
      targetFolders - Required. Collection containing the folders to be subscribed to.
      targetTypes - List of type names being subscribed to in each container. The type names should be in persistedType format.
      eventKeysAndAttributeValueMaps - Map containing the events being subscribed to and, optionally, attribute name/value pairs that also apply for the event. The map keys are the events being subscribed to. The map values are optional WTStringMaps which contain attribute name/value pairs that also apply for an event. If you don't want an attribute for an event, add the event to the map as the key and null as the value. If you do want an attribute, add a WTStringMap as the value where its key is the attribute name and its value is the attribute value. If an attribute is specified for an event, the subscription will only fire when the event occurs for the target object if the target has the specified attribute and the target's attribute value is the same as the specified value.
      includeSubfolders - Currently, this parameter is unsupported and is ignored.
      Returns:
      WebCompositeNotificationSubscription
      Throws:
      WTException
    • createTypeBasedContainerSubscriptions

      WebCompositeNotificationSubscription createTypeBasedContainerSubscriptions(wt.notify.WebNotificationSubscription subscriptionAttributes, WTCollection subscribers, WTCollection targetContainers, ArrayList<String> targetTypes, HashMap<String,WTStringMap> eventKeysAndAttributeValueMaps) throws WTException
      Creates notification subscriptions for one or more containers. When subscribing to a container, events and types are selected for the container. When any of the events occur for an object that resides in the container AND is one of the selected types, the subscription is satisfied. When a subscription is satisfied a notification email is not sent to the principal subscribers but it fetch payload data and will invoke webhook url When subscribing to a container, if the container's type is one of the types specified, the subscription will apply to the container itself (e.g., if a specified event occurs on the container, the subscription is satisfied).

      Supported API: true
      Parameters:
      subscriptionAttributes - Required. The WebCompositeNotificationSubscription object for this subscription. Set the object attributes to the desired values if the default values are not sufficient.
      subscribers - Required. The subscription recipients. The collection must contain NotifySubscriptionRecipient objects. The subscriber specified in each NotifySubscriptionRecipient must be a user, group, organization, or ObjectSubscriptionListener object. The recipients can be a mix of users, groups, and ObjectSubscriptionListeners.
      targetContainers - Required. Collection containing the containers to be subscribed to.
      targetTypes - List of type names being subscribed to in each container. The type names should be in persistedType format.
      eventKeysAndAttributeValueMaps - Map containing the events being subscribed to and, optionally, attribute name/value pairs that also apply for the event. The map keys are the events being subscribed to. The map values are optional WTStringMaps which contain attribute name/value pairs that also apply for an event. If you don't want an attribute for an event, add the event to the map as the key and null as the value. If you do want an attribute, add a WTStringMap as the value where its key is the attribute name and its value is the attribute value. If an attribute is specified for an event, the subscription will only fire when the event occurs for the target object if the target has the specified attribute and the target's attribute value is the same as the specified value.
      Returns:
      WebCompositeNotificationSubscription
      Throws:
      WTException