|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.StandardManager
wt.notify.StandardNotificationManager
Standard implementation of the notification service interfaces. It is mainly responsible for the capturing and queuing of notifications. It also maintains a notification list cache for performance reasons.
Use the newStandardNotificationManager
static factory method(s),
not the StandardNotificationManager
constructor, to construct
instances of this class. Instances must be constructed using the static
factory(s), in order to ensure proper initialization of the instance.
Supported API: true
Extendable: false
Nested Class Summary | |
(package private) class |
StandardNotificationManager.CheckinListener
-- Listener class to listen to checkins of Notifiable objects: - if the original object is Notifiable and has subscriptions, then its subscriptions are moved to the working copy (checked in object). |
(package private) class |
StandardNotificationManager.DeletionListener
-- Listener class to listen to deletion of objects: - if deleted object is Notifiable, checks if there are associated subscriptions and deletes them |
(package private) class |
StandardNotificationManager.DomainListener
-- Listener class to listen to domain events: - updates notification lists to reflect domain hierarchy changes - deletes notification lists when a domain is deleted |
(package private) class |
StandardNotificationManager.IterationListener
-- Listener class to listen to new iterations of Notifiable objects: - copies subscriptions to the new iteration if the iteration is for a new version; if TRANSFER_ON_REVISE is true, copies all subscriptions and if false, copies only the NEW VERSION subscriptions |
(package private) class |
StandardNotificationManager.NotificationEventListener
-- Listener class for notification (policy and object): - if the there is a non-empty notification list for the object's domain, type, state and event then a request for notification is sent. |
Field Summary | |
private static String |
ADMIN_RESOURCE
|
private static String |
CHECKIN_EVENT
|
private static String |
CLASSNAME
|
private static String |
CREATE_EVENT
|
private static String |
MODIFY_EVENT
|
private static String |
NEW_VERSION_EVENT
|
private static String |
NOTIFICATION_QUEUE_NAME
Notification queue name. |
private static String |
NOTIFICATION_SCHEDULE_QUEUE_NAME
Name of the queue that holds expiration requests for object subscriptions. |
private ProcessingQueue |
notificationQueue
|
private ScheduleQueue |
notificationScheduleQueue
|
private static String |
NOTIFY_STRING
|
private static NotificationListCache |
notifyCache
|
private static WTProperties |
notifyProperties
|
private static String |
OBJECT_NOTIFICATION_TEMPLATE
|
private static String |
POLICY_NOTIFICATION_TEMPLATE
|
private static long |
QUEUE_INTERVAL
|
private static String |
RESOURCE
|
private static String |
SB_CHECKIN_EVENT
|
private static String |
SENDER_EMAIL
|
private static String |
STATE_ATTRIBUTE_NAME
|
private static boolean |
TRANSFER_ON_REVISE
|
private static Hashtable |
typeEventTable
|
private static boolean |
USE_QUEUE
|
private static boolean |
USE_TEMPLATE
|
private static boolean |
VERBOSE
|
private static boolean |
VERBOSE_EXECUTION
|
private static boolean |
VERBOSE_POLICY
|
Fields inherited from class wt.services.StandardManager |
|
Fields inherited from interface wt.services.Manager |
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE |
Constructor Summary | |
StandardNotificationManager()
|
Method Summary | |
protected void |
addEventToObject(ObjectReference target_ref,
String event_key)
Updates the event set of the object passed as argument by the count given. |
NotificationRule |
addNotificationRule(Selector selector,
NotificationSet set)
Deprecated. |
protected void |
addSubscriberToObject(ObjectReference ref,
ObjectSubscription subscription,
WTPrincipal owner)
Subscribes to an object given a reference to the subscriber and a subscription object. |
protected static void |
addUserSubscription(ObjectSubscription subscription,
Vector equiv_subs,
Vector dist_lists)
Updates vectors of subscriptions and distribution lists with the content of the subscritpion passed as argument. |
private void |
constructRuleSet(NotificationList list,
Selector selector)
Constructs a rule set for the given list and selector. |
static void |
copyCheckinSubscription(ObjectIdentifier obj_id,
ObjectIdentifier predecessor_id)
Does actual copying of checkin event subscriptions to a new iteration. |
static void |
copySubscriptions(ObjectIdentifier target_obj_id,
ObjectIdentifier source_obj_id)
|
static Notification |
createNotification(ObjectSubscription subscription,
DistributionList subscribers)
Creates notification. |
private NotificationList |
createNotificationList(Selector selector)
Creates notification policy list for the given selector. |
void |
createNotificationRule(AdminDomainRef domain_ref,
String type_id,
String event_key,
Hashtable attribute_value_map,
Vector principal_refs)
Creates a notification rule defining which users and groups should be notified when a specified event occurs for an object of a specified type, within a domain. |
void |
createNotificationRule(AdminDomainRef domain_ref,
String type_id,
String event_key,
Vector principal_refs)
Creates a notification rule defining which users and groups should be notified when a specified event occurs for an object of a specified type, within a domain. |
private static void |
createNotifyCache()
|
private static void |
debug(String displayObject)
|
private static void |
debug(String displayObject,
boolean printStackTrace)
|
private static void |
debug(String methodName,
String displayObject)
|
private static void |
debug(String methodName,
String displayObject,
boolean printStackTrace)
|
private void |
deleteNotificationLists(AdminDomainRef domain_ref)
Deletes the notification lists for a domain. |
void |
deleteNotificationRule(AdminDomainRef domain_ref,
String type_id,
String event_key)
Deletes a notification rule defining which users and groups should be notified when a specified event occurs for an object of a specified type, within a domain. |
void |
deleteNotificationRule(AdminDomainRef domain_ref,
String type_id,
String event_key,
Hashtable attribute_value_map)
Deletes a notification rule defining which users and groups should be notified when a specified event occurs for an object of a specified type, within a domain. |
void |
deleteNotificationRules(AdminDomainRef domain_ref)
Deletes all notification rules within a domain. |
protected void |
deleteSubscriptions(WTSet targets)
Deletes subscriptions associated with object passed as argument. |
private static boolean |
equivalent(ObjectSubscription subs1,
ObjectSubscription subs2)
|
private static boolean |
equivalent(String str1,
String str2)
|
static String |
eventToString(String event)
Debugging method. |
static void |
expireSubscription(ObjectIdentifier obj_id,
Timestamp time)
Deletes the subscription passed as argument. |
protected static boolean |
filterSubscription(ObjectIdentifier obj_id,
ObjectSubscription subscription)
Returns true if target's attribute-value pair matches that of the subscription; otherwise returns false. |
String |
getConceptualClassname()
Deprecated. |
private static Vector |
getExistingSubscribers(ObjectSubscription subscription)
|
String |
getMessage(WTUser user,
String template,
Object ctxt)
Returns the notification message given its name. |
NotificationList |
getNotificationList(Selector selector)
Returns the notification list for a given selector. |
protected NotificationList |
getNotificationList(String event_type,
Object target_object)
Auxiliary method used to retirve the notification list. |
NotificationRule |
getNotificationRule(Selector selector)
Returns notification rule given the selector. |
Enumeration |
getNotificationRules(AdminDomainRef domain_ref)
Returns all the notification policy rules for the specified domain in the form of an enumeration. |
Enumeration |
getNotificationSets(WTStringSet rule_set,
ObjectIdentifier obj_id)
Returns an enumeration of NotificationSet from notification
rules in the rule set that match the specified object, as far as attribute
values are concerned. |
private static NotificationListCache |
getNotifyCache()
|
WTStringSet |
getRelevantEvents(Object target)
Returns all events that are relevant for a specific object. |
private AttributeValueSelector |
getRuleSelector(AdminDomainRef domain_ref,
String type_id,
String event_key,
Hashtable attribute_value_map)
Gets a notification rule selector for the specified domain, type, event, and attribute map. |
protected static Enumeration |
getSubscriptions(ObjectIdentifier target_id,
String event_key)
Returns all subscriptions for the object and event. |
Enumeration |
getSubscriptions(Object subscriber,
Notifiable target,
String event_key)
Returns all subscriptions for a given subscriber, target and event key. |
private static Hashtable |
getTypeEventTable(WTProperties properties)
Sets the type event table, that maps types into sets of events. |
ArrayList |
getUserSubscriptions(WTUser user,
Notifiable target)
Returns the subscriptions for a specific object, for which the subscriber is a principal. |
private static boolean |
isNewVersion(Object target_obj)
Returns whether a target object is indeed a new version (necessary given that NEW_VERSION events are emitted even when the new object isn't a new version). |
static void |
moveNewVersionSubscription(ObjectIdentifier obj_id,
ObjectIdentifier predecessor_id)
Does actual subscription copying from a target object to another. |
static void |
moveSubscriptions(ObjectIdentifier target_obj_id,
ObjectIdentifier source_obj_id)
Moves subscriptions to a target object from its predecessor. |
static StandardNotificationManager |
newStandardNotificationManager()
No-arg constructor. |
static void |
notifyObjectEvent(ObjectIdentifier obj_id,
String event_key)
Gets the subscriptions associated with the object and event. |
static void |
notifyObjectSubscription(ObjectIdentifier subs_id)
Carries out the actual notification based on object subscriptions for non-user subscribers. |
static void |
notifyPolicyEvent(ObjectIdentifier obj_id,
String event_key,
WTStringSet rule_set)
Gets the notification sets for notification policy rules associated with the object and event. |
static void |
notifyPolicyListener(ObjectIdentifier obj_id,
String event_key,
ObjectIdentifier listener_id)
Carries out the actual notification based on notification policy rules for non-user subscribers. |
protected void |
performStartupProcess()
Manager initialization: mostly subscription to events of interest. |
static void |
processSend(Notification notification)
Sends a queued notification request. |
void |
queueCopyCheckinSubscription(Iterated target,
Iterated predecessor)
Queues copying of checkin event subscriptions to a new iteration. |
void |
queueMoveNewVersionSubscription(Notifiable target,
ObjectReference predecessor_ref)
Queues moving a subscription to the new version event to a new iteration. |
void |
queueMoveNewVersionSubscription(WTList targets,
WTList predecessor_refs)
Multi-object version of this method. |
void |
queueMoveSubscriptions(Notifiable target,
ObjectReference predecessor_ref)
Queues a request to move subscriptions from one target object to another. |
void |
queueMoveSubscriptions(WTList targets,
WTList predecessors)
Multi-Object version of the API to Queue requests to move subscriptions from one target object to another. |
private void |
queueNotification(String method_name,
Class[] argTypes,
ArrayList args)
Multi-object version of this method. |
private void |
queueNotification(String method_name,
Class[] argTypes,
Object[] args)
Adds an entry to the notification queue. |
void |
queueObjectNotification(Notifiable target,
String event_key)
Queues a notification generated from an object subscription. |
void |
queueObjectNotification(WTList targets,
String event_key)
Multi-object version of this method. |
void |
queueObjectSubscriptionNotification(ObjectSubscription subscription)
Queues a subscription object for an event that has occurred when the subscriber is an ObjectSubscriptionListener (as
opposed to a user). |
void |
queuePolicyListenerNotification(ObjectIdentifier obj_id,
String event_key,
NotificationSet set)
Queues a request for notification of an event that has occurred, based on a notification policy rule, when the subscriber is an ObjectSubscriptionListener
(as opposed to a user). |
void |
queuePolicyNotification(Notifiable target,
String event_key,
NotificationList list)
Queues a notification of an event generated based on a notification policy rule. |
void |
queuePolicyNotification(WTList targets,
String event_key,
WTList lists)
Multi-object version of this method. |
void |
queueSubscriptionExpiration(ObjectSubscription subscription)
Queues a request to delete a subscription at the expiration time. |
private String |
recipientsToString(EnumeratorVector principal_refs)
|
protected void |
registerListeners()
Creates and registers event listeners. |
protected static void |
removeObjectEvent(ObjectIdentifier obj_id,
String event_key)
Removes event from object set. |
protected void |
resolveSubscriber(Object subscriber_obj,
Vector subscribers)
Adds references to users corresponding to the subscribe_obj passed as an argument, to the subscribers Vector. |
protected static boolean |
sameTime(Timestamp time1,
Timestamp time2)
Returns true if the two timestamps differ by less than one second. |
void |
send(Notification notification)
Sends an email message to the recipients specified by the notification's distribution list. |
protected static void |
sendObjectNotification(ObjectSubscription subscription,
DistributionList subscribers)
Constructs and queues notification. |
protected static void |
sendPolicyNotification(ObjectIdentifier obj_id,
String event_key,
NotificationSet set)
Constructs and queues policy notification. |
protected ObjectSubscription |
setAdhocRights(ObjectSubscription subscription,
WTPrincipal owner)
Sets add hoc rights to owner and subscriber (if a user) to read/write/delete subscription. |
protected void |
startNotificationQueue()
Starts notification queue. |
protected void |
startScheduleQueue()
Starts schedule queue. |
private void |
subscribeToAllEvents(KeyedEventListener listener)
Subscribes to all events to be listened to. |
void |
subscribeToObject(Vector subscribers,
ObjectSubscription subscription)
Subscribes to object event. |
static String |
targetToString(ObjectReference target_ref)
Produces identifying information about a target object. |
void |
unsubscribeToObject(Vector subscriptions)
Deletes all object subscriptions passed as argument. |
private void |
updateNotificationList(NotificationList list)
Updates the specified notification list. |
private void |
updateNotificationLists(AdminDomainRef domain_ref)
Updates all existing notification lists for the domain passed as argument and its descendents. |
void |
updateNotificationLists(Selector selector)
Deprecated. |
void |
updateNotificationRule(AdminDomainRef domain_ref,
String type_id,
String event_key,
Hashtable attribute_value_map,
Vector principal_refs)
Updates a notification rule defining which users and groups should be notified when a specified event occurs for an object of a specified type, within a domain. |
void |
updateNotificationRule(AdminDomainRef domain_ref,
String type_id,
String event_key,
Vector principal_refs)
Updates a notification rule defining which users and groups should be notified when a specified event occurs for an object of a specified type, within a domain. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private static final String NOTIFICATION_QUEUE_NAME
private static final String NOTIFICATION_SCHEDULE_QUEUE_NAME
private ProcessingQueue notificationQueue
private ScheduleQueue notificationScheduleQueue
private static NotificationListCache notifyCache
private static final String STATE_ATTRIBUTE_NAME
private static final String NOTIFY_STRING
private static Hashtable typeEventTable
private static final String CHECKIN_EVENT
private static final String CREATE_EVENT
private static final String MODIFY_EVENT
private static final String NEW_VERSION_EVENT
private static final String SB_CHECKIN_EVENT
private static final String OBJECT_NOTIFICATION_TEMPLATE
private static final String POLICY_NOTIFICATION_TEMPLATE
private static final String ADMIN_RESOURCE
private static boolean VERBOSE
private static boolean VERBOSE_EXECUTION
private static boolean VERBOSE_POLICY
private static boolean USE_QUEUE
private static boolean USE_TEMPLATE
private static boolean TRANSFER_ON_REVISE
private static long QUEUE_INTERVAL
private static String SENDER_EMAIL
private static WTProperties notifyProperties
Constructor Detail |
public StandardNotificationManager()
Method Detail |
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class StandardManager
public static StandardNotificationManager newStandardNotificationManager() throws WTException
WTException
protected void performStartupProcess() throws ManagerException
performStartupProcess
in class StandardManager
ManagerException
public static void expireSubscription(ObjectIdentifier obj_id, Timestamp time) throws WTException
This method should be private and non static, but since it is invoked
by Reflection to handle queued requests it must be public.
Supported API: false
obj_id
- time
-
WTException
public static void moveSubscriptions(ObjectIdentifier target_obj_id, ObjectIdentifier source_obj_id) throws WTException
This method should be private and non static, but since it is invoked
by Reflection to handle queued requests it must be public.
Supported API: false
target_obj_id
- the target object.source_obj_id
- the source object.
WTException
public static void notifyObjectEvent(ObjectIdentifier obj_id, String event_key) throws WTException
This method should be private and non static, but since it is invoked
by Reflection to handle queued requests it must be public.
Supported API: false
obj_id
- event_key
-
WTException
public static void notifyObjectSubscription(ObjectIdentifier subs_id) throws WTException
This method should be private and non static, but since it is invoked
by Reflection to handle queued requests it must be public.
Supported API: false
subs_id
-
WTException
public static void notifyPolicyEvent(ObjectIdentifier obj_id, String event_key, WTStringSet rule_set) throws WTException
This method should be private and non static, but since it is invoked
by Reflection it must be public.
Supported API: false
obj_id
- event_key
- rule_set
-
WTException
public static void notifyPolicyListener(ObjectIdentifier obj_id, String event_key, ObjectIdentifier listener_id) throws WTException
This method should be private and non static, but since it is invoked
by Reflection to handle queued requests it must be public.
Supported API: false
obj_id
- event_key
- listener_id
-
WTException
public static void processSend(Notification notification) throws WTException
This method should be private and non static, but since it is invoked
by Reflection it must be public.
Supported API: false
notification
-
WTException
public void createNotificationRule(AdminDomainRef domain_ref, String type_id, String event_key, Vector principal_refs) throws WTException
createNotificationRule
in interface NotificationManager
domain_ref
- reference to the domain the rule is fortype_id
- logical or persisted type identifierevent_key
- event key (defined in the wt.admin.adminEventResource
resource bundle)principal_refs
- principal references for notification recipients (Vector
of WTPrincipalReference
)
WTException
public void createNotificationRule(AdminDomainRef domain_ref, String type_id, String event_key, Hashtable attribute_value_map, Vector principal_refs) throws WTException
createNotificationRule
in interface NotificationManager
domain_ref
- reference to the domain the rule is fortype_id
- logical or persisted type identifierevent_key
- event key (defined in the wt.admin.adminEventResource
resource bundle)attribute_value_map
- attribute name, value pairs to select an object (name is Hashtable
key); may be nullprincipal_refs
- principal references for notification recipients (Vector
of WTPrincipalReference
)
WTException
public void deleteNotificationRule(AdminDomainRef domain_ref, String type_id, String event_key) throws WTException
deleteNotificationRule
in interface NotificationManager
domain_ref
- reference to the domain the rule is fortype_id
- logical or persisted type identifierevent_key
- event key (defined in the wt.admin.adminEventResource
resource bundle)
WTException
public void deleteNotificationRule(AdminDomainRef domain_ref, String type_id, String event_key, Hashtable attribute_value_map) throws WTException
deleteNotificationRule
in interface NotificationManager
domain_ref
- reference to the domain the rule is fortype_id
- logical or persisted type identifierevent_key
- event key (defined in the wt.admin.adminEventResource
resource bundle)attribute_value_map
- attribute name, value pairs to select an object (name is Hashtable
key); may be null
WTException
public void deleteNotificationRules(AdminDomainRef domain_ref) throws WTException
This method is intended for testing purposes only, to support automated
tests that need to reinitialize the testing environment.
Supported API: false
deleteNotificationRules
in interface NotificationManager
domain_ref
- reference to the domain the rule is for
WTException
public void updateNotificationRule(AdminDomainRef domain_ref, String type_id, String event_key, Vector principal_refs) throws WTException
updateNotificationRule
in interface NotificationManager
domain_ref
- reference to the domain the rule is fortype_id
- logical or persisted type identifierevent_key
- event key (defined in the wt.admin.adminEventResource
resource bundle)principal_refs
- principal references for notification recipients (Vector
of WTPrincipalReference
)
WTException
public void updateNotificationRule(AdminDomainRef domain_ref, String type_id, String event_key, Hashtable attribute_value_map, Vector principal_refs) throws WTException
updateNotificationRule
in interface NotificationManager
domain_ref
- reference to the domain the rule is fortype_id
- logical or persisted type identifierevent_key
- event key (defined in the wt.admin.adminEventResource
resource bundle)attribute_value_map
- attribute name, value pairs to select an object (name is Hashtable
key); may be nullprincipal_refs
- principal references for notification recipients (Vector
of WTPrincipalReference
)
WTException
public NotificationList getNotificationList(Selector selector) throws WTException
getNotificationList
in interface NotificationManager
selector
-
WTException
public void updateNotificationLists(Selector selector) throws WTException
This method is no longer needed. The createNotificationRule, deleteNotificationRule,
and updateNotificationRule methods update the lists.
Supported API: true
updateNotificationLists
in interface NotificationManager
selector
-
WTException
createNotificationRule(AdminDomainRef domain_ref, String type_id,
String event_key, Vector principal_refs)
,
deleteNotificationRule(AdminDomainRef domain_ref, String type_id,
String event_key)
,
updateNotificationRule(AdminDomainRef domain_ref, String type_id,
String event_key, Vector principal_refs)
public NotificationRule addNotificationRule(Selector selector, NotificationSet set) throws WTException
addNotificationRule
in interface NotificationManager
selector
- set
-
WTException
createNotificationRule(AdminDomainRef domain_ref, String type_id,
String event_key, Vector principal_refs)
public NotificationRule getNotificationRule(Selector selector) throws WTException
getNotificationRule
in interface NotificationManager
selector
-
WTException
public Enumeration getNotificationRules(AdminDomainRef domain_ref) throws WTException
getNotificationRules
in interface NotificationManager
domain_ref
-
WTException
public String getMessage(WTUser user, String template, Object ctxt) throws WTException
getMessage
in interface NotificationManager
user
- template
- ctxt
-
WTException
public void send(Notification notification) throws NotificationException, WTException
The message is not sent right away but queued into the notification
queue for asynchronous processing.
Supported API: false
send
in interface NotificationManager
notification
-
NotificationException
WTException
public void subscribeToObject(Vector subscribers, ObjectSubscription subscription) throws WTException
subscribeToObject
in interface NotificationManager
subscribers
- subscription
-
WTException
public void unsubscribeToObject(Vector subscriptions) throws WTException
unsubscribeToObject
in interface NotificationManager
subscriptions
-
WTException
public Enumeration getSubscriptions(Object subscriber, Notifiable target, String event_key) throws WTException
getSubscription (subs, null, null)
returns all subscriptions for the given subscriber, for all targets and events. In particular, getSubscriptions (null, null, null) returns all existing subscriptions.
The subscriber must be a user, a reference to a user, a subscriber
object or a reference to a subscriber object.
Supported API: false
getSubscriptions
in interface NotificationManager
subscriber
- target
- event_key
-
WTException
public WTStringSet getRelevantEvents(Object target) throws WTException
WTReference
, then the object is retrieved
and used rather than the reference itself.
getRelevantEvents
in interface NotificationManager
target
-
WTException
public ArrayList getUserSubscriptions(WTUser user, Notifiable target) throws WTException
getUserSubscriptions
in interface NotificationManager
user
- target
-
WTException
public Enumeration getNotificationSets(WTStringSet rule_set, ObjectIdentifier obj_id) throws WTException
NotificationSet
from notification
rules in the rule set that match the specified object, as far as attribute
values are concerned.
getNotificationSets
in interface NotificationManagerSvr
rule_set
- rule setobj_id
- identifier of object to compare against rule set
WTException
public void queueMoveSubscriptions(Notifiable target, ObjectReference predecessor_ref) throws WTException
queueMoveSubscriptions
in interface NotificationManagerSvr
target
- predecessor_ref
-
WTException
public void queueMoveSubscriptions(WTList targets, WTList predecessors) throws WTException
queueMoveSubscriptions
in interface NotificationManagerSvr
targets
- predecessors
- Collection of predecessor objects or object references; this method works with either.
WTException
public void queueObjectNotification(Notifiable target, String event_key) throws WTException
queueObjectNotification
in interface NotificationManagerSvr
target
- event_key
-
WTException
public void queueObjectNotification(WTList targets, String event_key) throws WTException
queueObjectNotification
in interface NotificationManagerSvr
targets
- event_key
-
WTException
public void queueObjectSubscriptionNotification(ObjectSubscription subscription) throws WTException
ObjectSubscriptionListener
(as
opposed to a user). When the request is processed, the subscriber's
notifyObjectEvent method is called.
queueObjectSubscriptionNotification
in interface NotificationManagerSvr
subscription
-
WTException
public void queuePolicyListenerNotification(ObjectIdentifier obj_id, String event_key, NotificationSet set) throws WTException
ObjectSubscriptionListener
(as opposed to a user). When the request is processed, the subscriber's
notifyObjectEvent method is called.
queuePolicyListenerNotification
in interface NotificationManagerSvr
obj_id
- event_key
- set
-
WTException
public void queuePolicyNotification(Notifiable target, String event_key, NotificationList list) throws WTException
queuePolicyNotification
in interface NotificationManagerSvr
target
- event_key
- list
-
WTException
public void queuePolicyNotification(WTList targets, String event_key, WTList lists) throws WTException
queuePolicyNotification
in interface NotificationManagerSvr
targets
- event_key
- lists
-
WTException
public void queueSubscriptionExpiration(ObjectSubscription subscription) throws WTException
queueSubscriptionExpiration
in interface NotificationManagerSvr
subscription
-
WTException
private void queueNotification(String method_name, Class[] argTypes, Object[] args) throws WTException
method_name
- name of method for processing queued request.argTypes
- argument types.
WTException
private void queueNotification(String method_name, Class[] argTypes, ArrayList args) throws WTException
method_name
- name of method for processing queued request.argTypes
- argument types.
WTException
private AttributeValueSelector getRuleSelector(AdminDomainRef domain_ref, String type_id, String event_key, Hashtable attribute_value_map) throws WTException
domain_ref
- reference to the domain the rule is fortype_id
- logical or persisted type identifierevent_key
- event key (defined in the wt.admin.adminEventResource
resource bundle)attribute_value_map
- attribute name, value pairs to select an object
WTException
private void constructRuleSet(NotificationList list, Selector selector) throws WTException
list
- notification list.selector
- selector.
WTException
- if the selector is not appropriate for a list or
if there was a problem retrieving or creating the list.private NotificationList createNotificationList(Selector selector) throws WTException
selector
- selector to be associated with the list.
WTException
- if the selector is not appropriate for a list or
if there was a problem retrieving or creating the list.private void deleteNotificationLists(AdminDomainRef domain_ref) throws WTException
domain_ref
-
WTException
private void updateNotificationList(NotificationList list) throws WTException
list
-
WTException
- if there was a problem retrieving or creating
the list.private static boolean isNewVersion(Object target_obj) throws WTException
target_obj
-
WTException
public void queueMoveNewVersionSubscription(Notifiable target, ObjectReference predecessor_ref) throws WTException
target
- predecessor_ref
-
WTException
public void queueMoveNewVersionSubscription(WTList targets, WTList predecessor_refs) throws WTException
WTException
public static void moveNewVersionSubscription(ObjectIdentifier obj_id, ObjectIdentifier predecessor_id) throws WTException
This method should be private and non static, but since it is invoked
by Reflection it must be public.
Supported API: false
obj_id
- predecessor_id
-
WTException
protected void resolveSubscriber(Object subscriber_obj, Vector subscribers) throws WTException
A subscriber object can be one of:
subscriber_obj
- represents one or more users.subscribers
- Vector of subscriber references
WTException
protected void addSubscriberToObject(ObjectReference ref, ObjectSubscription subscription, WTPrincipal owner) throws WTException
ref
- reference to subscriber.subscription
- subscription object used as a basis of the one to be constructed
and persistedowner
- user responsible for creating the subscriptions
WTException
protected ObjectSubscription setAdhocRights(ObjectSubscription subscription, WTPrincipal owner) throws WTException
subscription
- subscription object to be added ad hoc rights.owner
- user responsible for creating the subscriptions
WTException
protected void addEventToObject(ObjectReference target_ref, String event_key) throws WTException
event_key
- event key to be added to object.
WTException
protected void registerListeners() throws WTException
WTException
protected void startNotificationQueue() throws WTException
WTException
protected void startScheduleQueue() throws WTException
WTException
protected NotificationList getNotificationList(String event_type, Object target_object) throws WTException
event_type
- target_object
-
WTException
protected static void removeObjectEvent(ObjectIdentifier obj_id, String event_key) throws WTException
obj_id
- identifier of target objectevent_key
- event key to be removed
WTException
private static NotificationListCache getNotifyCache()
private static void createNotifyCache()
protected static Enumeration getSubscriptions(ObjectIdentifier target_id, String event_key) throws WTException
target_id
- identifier of target objectevent_key
- event key
WTException
protected static void addUserSubscription(ObjectSubscription subscription, Vector equiv_subs, Vector dist_lists) throws WTException
subscription
- subscription objectequiv_subs
- vector of subscriptions no two of them equivalentdist_lists
- vector of distribution lists, each one corresponding to a different
subscription
WTException
protected static void sendObjectNotification(ObjectSubscription subscription, DistributionList subscribers) throws WTException
subscription
- subscription objectsubscribers
- notification recipients
WTException
public static Notification createNotification(ObjectSubscription subscription, DistributionList subscribers) throws WTException
subscription
- subscription objectsubscribers
- notification recipients
WTException
protected static void sendPolicyNotification(ObjectIdentifier obj_id, String event_key, NotificationSet set) throws WTException
set
- notification set
WTException
protected static boolean sameTime(Timestamp time1, Timestamp time2) throws WTException
time1
- timestamptime2
- timestamp
WTException
protected static boolean filterSubscription(ObjectIdentifier obj_id, ObjectSubscription subscription) throws WTException
subscription
- subscription object
WTException
protected void deleteSubscriptions(WTSet targets) throws WTException
targets
- Collection of Notifiables that are the targets of the event.
WTException
public static String targetToString(ObjectReference target_ref)
private void subscribeToAllEvents(KeyedEventListener listener) throws WTException
WTException
private static Hashtable getTypeEventTable(WTProperties properties) throws WTException
WTException
public static String eventToString(String event)
public void queueCopyCheckinSubscription(Iterated target, Iterated predecessor) throws WTException
target
-
WTException
public static void copyCheckinSubscription(ObjectIdentifier obj_id, ObjectIdentifier predecessor_id) throws WTException
This method should be private and non static, but since it is invoked
by Reflection it must be public.
Supported API: false
obj_id
- predecessor_id
-
WTException
private static Vector getExistingSubscribers(ObjectSubscription subscription) throws WTException
WTException
private static boolean equivalent(ObjectSubscription subs1, ObjectSubscription subs2) throws WTException
WTException
private static boolean equivalent(String str1, String str2)
private void updateNotificationLists(AdminDomainRef domain_ref) throws WTException
domain_ref
-
WTException
private String recipientsToString(EnumeratorVector principal_refs)
public static void copySubscriptions(ObjectIdentifier target_obj_id, ObjectIdentifier source_obj_id) throws WTException
WTException
private static void debug(String displayObject)
private static void debug(String methodName, String displayObject)
private static void debug(String displayObject, boolean printStackTrace)
private static void debug(String methodName, String displayObject, boolean printStackTrace)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |