Interface ISubscriptionService

All Superinterfaces:
IComponent, IInitializable, IMetaComponent, ISubscriptionList

public interface ISubscriptionService extends IMetaComponent, ISubscriptionList
Subscription service provides access to the subscription relationship between principals and information resources.
  • Method Details

    • subscribe

      IThingID subscribe(IThingID subscriberID, int deliveryModes, IThingID sourceID, IThingIDList criteriaIDs) throws MetaException
      Creates a Subscription on the specified resource for a subscriber
      Parameters:
      subscriberID - ThingID of the subscriber
      deliveryModes - Multi-valued int specifying how the notification is to be delivered. Valid values are:
      ISubscription.EMAIL_DELIVERY If the target is an IUser, an e-mail will be sent
      ISubscription.PORTAL_DELIVERY" If the target is an IUser, a notification will be placed in their Inbox
      sourceID - [optional] ThingID of the event source.
      criteriaIDs - A list of the application criteria thingID
      Returns:
      subscription IThingID
      Throws:
      MetaException
      See Also:
    • subscribe

      IThingID subscribe(IThingID subscriberID, int deliveryModes, IThingID sourceID, IThingIDList criteriaIDs, boolean recursive) throws MetaException
      Creates a Subscription on the specified resource for a subscriber
      Parameters:
      subscriberID - ThingID of the subscriber
      deliveryModes - Multi-valued int specifying how the notification is to be delivered. Valid values are:
      ISubscription.EMAIL_DELIVERY If the target is an IUser, an e-mail will be sent
      ISubscription.PORTAL_DELIVERY" If the target is an IUser, a notification will be placed in their Inbox
      sourceID - [optional] ThingID of the event source.
      criteriaIDs - A list of the application criteria thingID
      recursive - whether this is a recursive subscription
      Returns:
      subscription IThingID
      Throws:
      MetaException
      See Also:
    • subscribe

      IThingID subscribe(IThingID ownerID, IThingID groupID, int deliveryModes, IThingID sourceID, IThingIDList criteriaIDs) throws MetaException
      Creates a Subscription on the specified resource for a group
      Parameters:
      ownerID - The owner of the Subscription object - for permission evaluation
      groupID - ThingID of the group Available to the delivery agent specified in the 'delivery' parameter.
      deliveryModes - Multi-valued int specifying how the notification is to be delivered. Valid values are:
      ISubscription.EMAIL_DELIVERY If the target is an IUser, an e-mail will be sent
      ISubscription.PORTAL_DELIVERY" If the target is an IUser, a notification will be placed in their Inbox
      sourceID - ThingID of the event source.
      criteriaIDs - A list of the application criteria thingID
      Returns:
      subscription IThingID
      Throws:
      MetaException
      See Also:
    • subscribe

      IThingID subscribe(IThingID ownerID, IThingID groupID, int deliveryModes, IThingID sourceID, IThingIDList criteriaIDs, boolean isRecursive) throws MetaException
      Creates a Subscription on the specified resource for a group
      Parameters:
      ownerID - The owner of the Subscription object - for permission evaluation
      groupID - ThingID of the group Available to the delivery agent specified in the 'delivery' parameter.
      deliveryModes - Multi-valued int specifying how the notification is to be delivered. Valid values are:
      ISubscription.EMAIL_DELIVERY If the target is an IUser, an e-mail will be sent
      ISubscription.PORTAL_DELIVERY" If the target is an IUser, a notification will be placed in their Inbox
      sourceID - ThingID of the event source.
      criteriaIDs - A list of the application criteria thingID
      Returns:
      subscription IThingID
      Throws:
      MetaException
      See Also:
    • createPortletSubscription

      IThingID createPortletSubscription(IThingID subscriberID, IThingID sourceID, ICriterion customCriterion) throws MetaException
      Create a subscription for a portlet subscriber
      Parameters:
      subscriberID - The subscriber thingID
      sourceID - The resource thingID to monitor
      customCriterion - A list of criteria that describes the (property, operation, and status) tuple
      Returns:
      subscription IThingID
      Throws:
      MetaException
    • createPortletSubscription

      IThingID createPortletSubscription(IThingID subscriberID, IThingID sourceID, List<ICriterion> customCriterionList) throws MetaException
      Create a subscription for a portlet subscriber, if the portlet needs to have more than one criterion.
      Parameters:
      subscriberID - The subscriber thingID
      sourceID - The resource thingID to monitor
      customCriterionList - A list of criteria that describes (property, operation, and status) tuples
      Returns:
      Throws:
      MetaException
    • getSubscription

      ISubscription getSubscription(IThingID subscriptionID) throws MetaException
      Retrieves individual ISubscription specified by 'id'.
      Parameters:
      subscriptionID - Thing ID of ISubscription to retrieve
      Returns:
      null if ISubscription does not exist
      Throws:
      MetaException
    • unsubscribe

      void unsubscribe(IThingID subscription_thing_ID) throws MetaException
      Unsubscribe a specified subscription
      Parameters:
      subscription_thing_ID - Thing ID of the subscription to unsubscribe
      Throws:
      MetaException
    • getAppCriteria

      IThingIDList getAppCriteria(int xtypeid) throws MetaException
      Retrieve application criteria based on defined criterion type name e.g.
      Parameters:
      xtypeid - The XTYPE ID of the criteria folder
      Returns:
      IThingIDList A list of the criteria thingID
      Throws:
      MetaException
    • getAppCriteria

      IThingIDList getAppCriteria(String criterionTypeName) throws MetaException
      Retrieve application criteria based on defined criterion type name e.g. 'Folder', 'User', 'Service', 'Topic', 'Content', 'Page', 'Link', 'Form', 'Portlet','PortletType', and 'Basic'
      Parameters:
      criterionTypeName - The name of the criterion folder type
      Returns:
      A list of the criteria thingID
      Throws:
      MetaException
    • getAppCriteriaLayout

      String getAppCriteriaLayout(IThingID critID) throws MetaException
      Retrieve a criterion's associated JSP layout location
      Parameters:
      critID - The thingID of the criterion
      Returns:
      The layout location of the specified criterion
      Throws:
      MetaException
    • setAppCriteriaLayout

      void setAppCriteriaLayout(IThingID critID, String layoutLocation) throws MetaException
      Set the JSP layout location of the criterion's parent folder as thing info
      Parameters:
      critID - The criterionID
      layoutLocation - The new layout location for the specified criterion. This location has to be in layout="/ui/directory/template_file_without_extension" format For standard portal notification the layout info is stored as layout="/ui/notification/thing/%agent%/%operation%_%format%" in the criteria folder thing info. The extension is not defined, but assumed to be '.jsp'. For custom notification deployed by portlet, the portlet author can define this as layout="/ui/portlets/your_portlet/name_of_the_jsp"
      Throws:
      MetaException
    • createAppCriteriaFolder

      IThingID createAppCriteriaFolder(String folderName, String layout, String description) throws MetaException
      create a folder for a specified group of application criteria
      Parameters:
      folderName - The name of the criteria folder
      layout - The layout template of the criteria
      description - The description of the cirteria folder
      Returns:
      The folder thingID
      Throws:
      MetaException
    • createAppCriteria

      IThingID createAppCriteria(IThingID appCriteriaFolderID, String criterionName, String criterionInfo, String operationName, int operationCode, String property) throws MetaException
      create a criterion within the specified folder
      Parameters:
      appCriteriaFolderID - The folder thingID
      criterionName - The name of the criterion
      criterionInfo - The information of the criterion
      operationName - The name of the operation
      operationCode - The code of the operation
      property - The property of the operation
      Returns:
      ThingID of the criterion
      Throws:
      MetaException