public interface ISubscribableMechanics extends IViewableMechanics
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_FORMAT_EMAIL |
static String |
CONTENT_FORMAT_EMAIL_DIGEST |
static String |
CONTENT_FORMAT_PORTAL_INBOX |
static String |
CONTENT_FORMAT_PORTAL_INBOX_DIGEST |
static String |
HEADER_FROM |
static String |
HEADER_SUBJECT |
static String |
HEADER_TO |
COMMENTS_LINK_TYPE, CONTENT_LINK_TYPE, DEFAULT_ORDER, DEFAULT_PAGE_SIZE, DEFAULT_SORT, DETAILS_LINK_TYPE, LARGE_ICON_TYPE, LINK_TYPE, LINK_TYPE_COMMENTS, LINK_TYPE_CONTENT, LINK_TYPE_DETAILS, LINK_TYPE_EDIT, LINK_TYPE_HELP, LINK_TYPE_HELP_MAXIMIZED, LINK_TYPE_MAXIMIZED, LINK_TYPE_MINIMIZED, LINK_TYPE_PERMISSIONS, LINK_TYPE_PORTAL_CONTENT, LINK_TYPE_PORTLET_STANDALONE, LINK_TYPE_PROPERTIES, LINK_TYPE_RESTORED, LINK_TYPE_SUBSCRIPTIONS, LINK_TYPE_THUMBNAILS, LINK_TYPE_VERSIONS, PERMISSIONS_LINK_TYPE, PORTAL_CONTENT_LINK_TYPE, PROPERTIES_LINK_TYPE, PROPERTY_LINK_TARGET, PROPERTY_OWNER_NAME, PROPERTY_PARENT_NAME, PROPERTY_TOOLTIP, REFERENCE_ICON_TYPE, SUBSCRIPTIONS_LINK_TYPE, THUMBNAIL_ICON_TYPE, THUMBNAILS_LINK_TYPE, VERSIONS_LINK_TYPE
Modifier and Type | Method and Description |
---|---|
boolean |
canDeliverToPrincipal(IURI principalURI,
IURI targetURI,
IThingID criteriaID,
INotificationSourceEvent event)
Determines if the notification could be delivered to the end user.
|
boolean |
canEditSubscription(IURI itemId,
IThingID userId)
Returns true if the specified user can add, edit, or remove a subscription the the specified resource.
|
boolean |
canListSubscriptions(IURI itemId,
IThingID userId,
Map<?,?> capabilities)
Returns true if the specified user can list the subscriptions to the specified resource.
|
boolean |
canViewSubscription(IURI itemId,
IThingID userId,
Map<?,?> capabilities,
IThingID subscriberId)
Returns true if the specified user can view specified principal's subscription to the specified resource.
|
void |
checkEditSubscription(IURI itemId,
IThingID userId)
Throws a
PortalAccessException if the specified user cannot add, edit, or remove a subscription the the specified resource. |
void |
checkListSubscriptions(IURI itemId,
IThingID userId,
Map<?,?> capabilities)
Throws a
PortalAccessException if the specified user cannot list the subscriptions to the specified resource. |
void |
checkViewSubscription(IThingID pageId,
IThingID userId,
Map<?,?> capabilities,
IThingID subscriberId)
Deprecated.
|
void |
checkViewSubscription(IURI itemId,
IThingID userId,
Map<?,?> capabilities,
IThingID subscriberId)
Throws a
PortalAccessException if the specified user cannot view specified principal's subscription to the specified resource. |
IThingID |
createAppCriteria(IThingID appCriteriaFolderID,
String criterionName,
String criterionInfo,
String operationName,
int operationCode,
String property)
Create a criterion within the specified folder
|
IThingID |
createAppCriteriaFolder(String folderName,
String layout,
String description)
Create a folder to contain a list of application criteria
|
IThingID |
createPortletSubscription(IThingID subscriberPortlet,
IThingID source,
ICriterion crit)
Create a subscription for a portlet subscriber
|
IThingID |
createPortletSubscription(IThingID subscriberPortlet,
IThingID source,
List<ICriterion> criteria)
Create a subscription for a portlet subscriber
|
void |
disable(IThingID subscriptionId)
Disables the specified subscription.
|
void |
disable(IThingID itemId,
IThingID subscriberId)
Disables the subscription for the specified resource to the specified principal.
|
void |
disableBySystem(IThingID subscriptionId)
Disables the specified subscription,
and marks it as disabled by the system (rather than by the principal).
|
void |
disableBySystem(IThingID itemId,
IThingID subscriberId)
Disables the subscription for the specified resource to the specified principal,
and marks it as disabled by the system (rather than by the principal).
|
void |
enable(IThingID subscriptionId)
Enables the specified subscription.
|
void |
enable(IThingID itemId,
IThingID subscriberId)
Enables the subscription for the specified resource to the specified principal.
|
void |
fireGetAppCriteriaEvent(String criteriaFolderName,
IThingID userId,
int status)
Fires a get criterion event
|
void |
fireGetSubscriptionEvent(IThingID subscriptionId,
IThingID userId,
int status)
Fires a getsubscription event.
|
void |
fireSetSubscriptionEvent(IThingID subscriptionId,
IThingID userId,
int status)
Fires a set subscribe event.
|
void |
fireUnsubscribeEvent(IThingID subscriptionId,
IThingID userId,
int status)
Fires a unsubscribe event.
|
void |
fireViewSubscriptionEvent(IThingID subscriptionId,
IThingID userId,
int status)
Fires a view subscription event.
|
void |
generateNotificationContent(Writer content,
String contentFormat,
String contentType,
IURI targetId,
IThingID criteriaID,
INotificationSourceEvent event,
Locale locale)
Generates notification content for the specified target resource, user,
subscription, and event.
|
Map<String,String> |
generateNotificationHeaders(String contentFormat,
IURI targetId,
IThingID criteriaID,
INotificationSourceEvent event,
Locale locale)
Generates MIME headers for notification.
|
IThingIDList |
getAppCriteria(String criteriaFolderName)
Get application criteria based on the name of the criteria folder
|
IThingID |
getGroupSubscription(IThingID itemId,
IThingID subscriberID,
IThingID ownerID)
Get a subscription for the specified subscriber on the specified resource
|
IThingID |
getSubscription(IThingID itemId,
IThingID subscriberID)
Get a subscription for the specified subscriber on the specified resource
|
IListView<IView> |
listSubscriptions(IThingID pageId,
int start,
int length)
Returns a page of subscriptions to the specified resource.
|
IListView<IView> |
listSubscriptions(IThingID pageId,
IThingID userId,
int start,
int length)
Returns a page of subscriptions to the specified resource,
filtered for the specified user.
|
IThingID |
setGroupSubscription(IThingID itemId,
IThingID ownerId,
IThingID groupId,
int deliveryMethods,
IThingIDList criteria)
Set group subscription
|
IThingID |
setGroupSubscription(IThingID itemId,
IThingID ownerId,
IThingID groupId,
int deliveryMethods,
IThingIDList criteria,
boolean isRecursive)
Set group subscription
|
IThingID |
setSubscription(IThingID itemId,
IThingID userId,
int deliveryMethods,
IThingIDList criteria)
Throws a
PortalAccessException if the specified user cannot set a subscription the the specified resource. |
IThingID |
setSubscription(IThingID itemId,
IThingID userId,
int deliveryMethods,
IThingIDList criteria,
boolean recursive)
Creates a subscription for a thing
|
void |
unsubscribe(IThingID subscriptionId)
Unsubscribes the specified subscription ID
|
void |
unsubscribe(IThingID itemId,
IThingID subscriberId)
Unsubscribes the specified principal from the specified resource for the specified rule.
|
IView |
viewSubscription(IURI itemId,
IThingID subscriberId)
Returns the standard view of a subscription for the specified subscriber to the specified resource.
|
canView, checkView, createPagingCookie, fireViewEvent, getCss, getCss, getDefaultLinkType, getFormattedProperty, getHierachicalUri, getIcon, getIcon, getLink, getLink, getListProperty, getListPropertyHTML, getListPropertyJS, isEnabled, view, view
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
init, shutdown
static final String HEADER_SUBJECT
static final String HEADER_TO
static final String HEADER_FROM
static final String CONTENT_FORMAT_EMAIL
static final String CONTENT_FORMAT_PORTAL_INBOX
static final String CONTENT_FORMAT_EMAIL_DIGEST
static final String CONTENT_FORMAT_PORTAL_INBOX_DIGEST
boolean canViewSubscription(IURI itemId, IThingID userId, Map<?,?> capabilities, IThingID subscriberId) throws PortalException
itemId
- IURI of the resourceuserId
- ThingID of the viewercapabilities
- reservedsubscriberId
- ThingID of the subscriberPortalException
@Deprecated void checkViewSubscription(IThingID pageId, IThingID userId, Map<?,?> capabilities, IThingID subscriberId) throws PortalException, PortalAccessException
checkViewSubscription(IURI, IThingID, Map, IThingID)
insteadPortalAccessException
if the specified user cannot view specified principal's subscription to the specified resource.pageId
- reserveduserId
- ThingID of the viewercapabilities
- reservedsubscriberId
- ThingID of the subscriberPortalException,
- PortalAccessExceptionPortalException
PortalAccessException
void checkViewSubscription(IURI itemId, IThingID userId, Map<?,?> capabilities, IThingID subscriberId) throws PortalException, PortalAccessException
PortalAccessException
if the specified user cannot view specified principal's subscription to the specified resource.itemId
- IURI of the resourceuserId
- ThingID of the viewercapabilities
- reservedsubscriberId
- ThingID of the subscriberPortalException,
- PortalAccessExceptionPortalException
PortalAccessException
boolean canListSubscriptions(IURI itemId, IThingID userId, Map<?,?> capabilities) throws PortalException
itemId
- IURI of the resourceuserId
- ThingID of user to list subscriptionscapabilities
- reservedPortalException
void checkListSubscriptions(IURI itemId, IThingID userId, Map<?,?> capabilities) throws PortalException, PortalAccessException
PortalAccessException
if the specified user cannot list the subscriptions to the specified resource.itemId
- IURI of the resourceuserId
- ThingID of the usercapabilities
- reservedPortalException,
- PortalAccessExceptionPortalException
PortalAccessException
boolean canEditSubscription(IURI itemId, IThingID userId) throws PortalException
itemId
- IURI of the resourceuserId
- ThingID of the userPortalException
void checkEditSubscription(IURI itemId, IThingID userId) throws PortalException, PortalAccessException
PortalAccessException
if the specified user cannot add, edit, or remove a subscription the the specified resource.itemId
- IURI of the resourceuserId
- ThingID of the userPortalException,
- PortalAccessExceptionPortalException
PortalAccessException
void fireGetSubscriptionEvent(IThingID subscriptionId, IThingID userId, int status) throws PortalException
subscriptionId
- Resource whose subscription was viewed.userId
- User who viewed the subscription.status
- Status of the event (sucessful, denied, error).PortalException
void fireViewSubscriptionEvent(IThingID subscriptionId, IThingID userId, int status) throws PortalException
subscriptionId
- Resource whose subscription was viewed.userId
- User who viewed the subscription.status
- Status of the event (sucessful, denied, error).PortalException
void fireSetSubscriptionEvent(IThingID subscriptionId, IThingID userId, int status) throws PortalException
subscriptionId
- userId
- User adding or modifing the subscription.status
- Status of the event (sucessful, denied, error).PortalException
void fireUnsubscribeEvent(IThingID subscriptionId, IThingID userId, int status) throws PortalException
subscriptionId
- Resource to which the subscription was removed.userId
- User removing the subscription.status
- Status of the event (sucessful, denied, error).PortalException
void fireGetAppCriteriaEvent(String criteriaFolderName, IThingID userId, int status) throws PortalException
criteriaFolderName
- The folder name that contains the criteriauserId
- status
- PortalException
IThingID createPortletSubscription(IThingID subscriberPortlet, IThingID source, ICriterion crit) throws PortalException
subscriberPortlet
- source
- crit
- PortalException
IThingID createPortletSubscription(IThingID subscriberPortlet, IThingID source, List<ICriterion> criteria) throws PortalException
subscriberPortlet
- source
- criteria
- list of ICriterion
PortalException
IThingID getSubscription(IThingID itemId, IThingID subscriberID) throws PortalException
itemId
- The resource thingIDsubscriberID
- The subscriber's thingIDPortalException
IThingID getGroupSubscription(IThingID itemId, IThingID subscriberID, IThingID ownerID) throws PortalException
itemId
- The resource thingIDsubscriberID
- The subscriber's thingIDownerID
- The owner's thingIDPortalException
IThingID setSubscription(IThingID itemId, IThingID userId, int deliveryMethods, IThingIDList criteria) throws PortalException
PortalAccessException
if the specified user cannot set a subscription the the specified resource.itemId
- The resource to monitoruserId
- The user thingID to receive notificationsdeliveryMethods
- email or portalinboxcriteria
- A list of specified criteria thingIDPortalException
IThingID setSubscription(IThingID itemId, IThingID userId, int deliveryMethods, IThingIDList criteria, boolean recursive) throws PortalException
itemId
- source thing IDuserId
- subscriber thing IDdeliveryMethods
- what is delivery method for subscription. See ISubscription
criteria
- list of subscription criteriasrecursive
- whether this is a recursive subscriptionPortalException
IThingID setGroupSubscription(IThingID itemId, IThingID ownerId, IThingID groupId, int deliveryMethods, IThingIDList criteria) throws PortalException
itemId
- The resource to monitorownerId
- The owner of the subscriptiongroupId
- The group to receive the notificationsdeliveryMethods
- Notification delivery methodscriteria
- criteria to matchPortalException
IThingID setGroupSubscription(IThingID itemId, IThingID ownerId, IThingID groupId, int deliveryMethods, IThingIDList criteria, boolean isRecursive) throws PortalException
itemId
- The resource to monitorownerId
- The owner of the subscriptiongroupId
- The group to receive the notificationsdeliveryMethods
- Notification delivery methodscriteria
- criteria to matchPortalException
void enable(IThingID itemId, IThingID subscriberId) throws PortalException
itemId
- Resource.subscriberId
- Principal.PortalException
void enable(IThingID subscriptionId) throws PortalException
subscriptionId
- Subscription to enable.PortalException
void disable(IThingID itemId, IThingID subscriberId) throws PortalException
itemId
- Resource.subscriberId
- Principal.PortalException
void disable(IThingID subscriptionId) throws PortalException
subscriptionId
- Subscription to disable.PortalException
void disableBySystem(IThingID itemId, IThingID subscriberId) throws PortalException
itemId
- Resource.subscriberId
- Principal.PortalException
void disableBySystem(IThingID subscriptionId) throws PortalException
subscriptionId
- Subscription to disable.PortalException
void unsubscribe(IThingID itemId, IThingID subscriberId) throws PortalException
itemId
- The resource to unsubscribe.subscriberId
- Principal to unsubscribe.PortalException
void unsubscribe(IThingID subscriptionId) throws PortalException
subscriptionId
- The subscription thingID to unsubscribe.PortalException
IView viewSubscription(IURI itemId, IThingID subscriberId) throws PortalException
itemId
- Subsbcribed resource.subscriberId
- Principal whose subscription to view.PortalException
IListView<IView> listSubscriptions(IThingID pageId, int start, int length) throws PortalException
pageId
- page id.start
- List starting index (0 for first item).length
- List length (<1 for all items).IView
items, or an empty list.PortalException
IListView<IView> listSubscriptions(IThingID pageId, IThingID userId, int start, int length) throws PortalException
pageId
- page id.userId
- User for which to filter.start
- List starting index (0 for first item).length
- List length (<1 for all items).IView
items, or an empty list.PortalException
IThingID createAppCriteriaFolder(String folderName, String layout, String description) throws PortalException
folderName
- The name of the criteria folderlayout
- The rendering layout templatedescription
- The description of the criteria folderPortalException
IThingID createAppCriteria(IThingID appCriteriaFolderID, String criterionName, String criterionInfo, String operationName, int operationCode, String property) throws PortalException
appCriteriaFolderID
- The application criteria folder thingIDcriterionName
- The name of the criterioncriterionInfo
- The information field of the criterionoperationName
- The name of the criterion operationoperationCode
- The code of the criterion operationproperty
- The property of the criterion operationPortalException
IThingIDList getAppCriteria(String criteriaFolderName) throws PortalException
criteriaFolderName
- The name of the criteria folderPortalException
boolean canDeliverToPrincipal(IURI principalURI, IURI targetURI, IThingID criteriaID, INotificationSourceEvent event) throws PortalException
principalURI
- user to deliver notification totargetURI
- target resource being notified aboutcriteriaID
- criteria ID being notified aboutevent
- notification source eventPortalException
void generateNotificationContent(Writer content, String contentFormat, String contentType, IURI targetId, IThingID criteriaID, INotificationSourceEvent event, Locale locale) throws PortalException
content
- Output stream to which to write notification content.contentType
- Content media type. May include charset.targetId
- Resource about which to notify (ie notification generated
because user subscribed to this resource).criteriaID
- ID of the criteria that matched for this subscription
e.g. "item is added" or "item is updated" or "item is deleted"event
- about which to notify user.PortalException
Map<String,String> generateNotificationHeaders(String contentFormat, IURI targetId, IThingID criteriaID, INotificationSourceEvent event, Locale locale) throws PortalException
targetId
- Resource about which to notify (ie notification generated
because user subscribed to this resource).criteriaID
- ID of the criteria that matched for this subscription
e.g. "item is added" or "item is updated" or "item is deleted"event
- Event about which to notify user.PortalException