Interface ISubscriptionService
- All Superinterfaces:
IComponent
,IInitializable
,IMetaComponent
,ISubscriptionList
Subscription service provides access to the subscription relationship between
principals and information resources.
-
Method Summary
Modifier and TypeMethodDescriptioncreateAppCriteria
(IThingID appCriteriaFolderID, String criterionName, String criterionInfo, String operationName, int operationCode, String property) create a criterion within the specified foldercreateAppCriteriaFolder
(String folderName, String layout, String description) create a folder for a specified group of application criteriacreatePortletSubscription
(IThingID subscriberID, IThingID sourceID, ICriterion customCriterion) Create a subscription for a portlet subscribercreatePortletSubscription
(IThingID subscriberID, IThingID sourceID, List<ICriterion> customCriterionList) Create a subscription for a portlet subscriber, if the portlet needs to have more than one criterion.getAppCriteria
(int xtypeid) Retrieve application criteria based on defined criterion type name e.g.getAppCriteria
(String criterionTypeName) Retrieve application criteria based on defined criterion type name e.g.getAppCriteriaLayout
(IThingID critID) Retrieve a criterion's associated JSP layout locationgetSubscription
(IThingID subscriptionID) Retrieves individual ISubscription specified by 'id'.void
setAppCriteriaLayout
(IThingID critID, String layoutLocation) Set the JSP layout location of the criterion's parent folder as thing infosubscribe
(IThingID subscriberID, int deliveryModes, IThingID sourceID, IThingIDList criteriaIDs) Creates a Subscription on the specified resource for a subscribersubscribe
(IThingID subscriberID, int deliveryModes, IThingID sourceID, IThingIDList criteriaIDs, boolean recursive) Creates a Subscription on the specified resource for a subscribersubscribe
(IThingID ownerID, IThingID groupID, int deliveryModes, IThingID sourceID, IThingIDList criteriaIDs) Creates a Subscription on the specified resource for a groupsubscribe
(IThingID ownerID, IThingID groupID, int deliveryModes, IThingID sourceID, IThingIDList criteriaIDs, boolean isRecursive) Creates a Subscription on the specified resource for a groupvoid
unsubscribe
(IThingID subscription_thing_ID) Unsubscribe a specified subscriptionMethods inherited from interface com.webmethods.portal.system.IComponent
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
Methods inherited from interface com.webmethods.portal.system.init.IInitializable
init, shutdown
Methods inherited from interface com.webmethods.portal.service.meta2.IMetaComponent
getMetaContext, setMetaContext
Methods inherited from interface com.webmethods.portal.service.meta2.subscription.ISubscriptionList
getGroupOwnerSubscriptions, getGroupSubscriberSubscriptionsForResource, getResourceSubscriptions, getResourceSubscriptions, getSubscriberOwnerSubscriptions, getSubscriberSubscriptions, getSubscriberSubscriptionsForSource
-
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 subscriberdeliveryModes
- 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 InboxsourceID
- [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 subscriberdeliveryModes
- 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 InboxsourceID
- [optional] ThingID of the event source.criteriaIDs
- A list of the application criteria thingIDrecursive
- 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 evaluationgroupID
- 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 InboxsourceID
- 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 evaluationgroupID
- 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 InboxsourceID
- 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 thingIDsourceID
- The resource thingID to monitorcustomCriterion
- 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 thingIDsourceID
- The resource thingID to monitorcustomCriterionList
- A list of criteria that describes (property, operation, and status) tuples- Returns:
- Throws:
MetaException
-
getSubscription
Retrieves individual ISubscription specified by 'id'.- Parameters:
subscriptionID
- Thing ID of ISubscription to retrieve- Returns:
- null if ISubscription does not exist
- Throws:
MetaException
-
unsubscribe
Unsubscribe a specified subscription- Parameters:
subscription_thing_ID
- Thing ID of the subscription to unsubscribe- Throws:
MetaException
-
getAppCriteria
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
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
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
Set the JSP layout location of the criterion's parent folder as thing info- Parameters:
critID
- The criterionIDlayoutLocation
- 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 folderlayout
- The layout template of the criteriadescription
- 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 thingIDcriterionName
- The name of the criterioncriterionInfo
- The information of the criterionoperationName
- The name of the operationoperationCode
- The code of the operationproperty
- The property of the operation- Returns:
- ThingID of the criterion
- Throws:
MetaException
-