Micro Focus Content Manager SDK 9.4
HP.HPTRIM.SDK.TrimObjectChangeNotifier Class Reference

The TrimObjectChangeNotifier class provides a global notification mechanism for when Content Manager business objects are changed. The notifications specify the object type and the object URI of the changed object, and allows the recipient to take relevant actions, such as refreshing cached objects. More...

Inheritance diagram for HP.HPTRIM.SDK.TrimObjectChangeNotifier:
HP.HPTRIM.SDK.TrimObjectChangeNotifierBase

Public Member Functions

 TrimObjectChangeNotifier (string datasetId)
 Creates a TrimObjectChangeNotifier instance. More...
 
 TrimObjectChangeNotifier (string datasetId, BaseObjectTypes objectType)
 Creates a TrimObjectChangeNotifier instance. More...
 
 TrimObjectChangeNotifier (string datasetId, BaseObjectTypesList objectTypes)
 Creates a TrimObjectChangeNotifier instance. More...
 
delegate void OnTrimObjectChangeEventHandler (TrimObjectChangeList notifications)
 OnTrimObjectChangeEventHandler is the delegate type of the event that that is fired when object change notifications arrive. More...
 
- Public Member Functions inherited from HP.HPTRIM.SDK.TrimObjectChangeNotifierBase
void Dispose ()
 
 TrimObjectChangeNotifierBase (string dbid)
 
 TrimObjectChangeNotifierBase (string dbid, BaseObjectTypes objectType)
 
 TrimObjectChangeNotifierBase (string dbid, BaseObjectTypesList objectTypes)
 
void Start ()
 Start receiving notifications. More...
 
void Stop ()
 Stop receiving notifications. More...
 
delegate void SwigDelegateTrimObjectChangeNotifierBase_0 (global::System.IntPtr args)
 

Events

OnTrimObjectChangeEventHandler OnTrimObjectChange
 OnTrimObjectChange is the event that is fired when object change notifications arrive. More...
 

Detailed Description

The TrimObjectChangeNotifier class provides a global notification mechanism for when Content Manager business objects are changed. The notifications specify the object type and the object URI of the changed object, and allows the recipient to take relevant actions, such as refreshing cached objects.

The following is a simple example of how to use TrimObjectChangeNotifier.

private void Notifier_OnTrimObjectChange(TrimObjectChangeList changeList) { foreach (var change in changeList) { System.Console.WriteLine(String.Format( "Received TRIM object change notification. Object type: {0}, Object uri: {1}", change.ObjectType, change.ObjectUri)); } }

Database db = ...;

// Receive notifications whenever a record type is changed. BaseObjectTypes[] objectTypes = { BaseObjectTypes.RecordType };

using (TrimObjectChangeNotifier notifier = new TrimObjectChangeNotifier(db.getId(), objectTypes)) { notifier.OnTrimObjectChange += Notifier_OnTrimObjectChange; notifier.Start();

// ...

notifier.Stop(); }

Constructor & Destructor Documentation

HP.HPTRIM.SDK.TrimObjectChangeNotifier.TrimObjectChangeNotifier ( string  datasetId)

Creates a TrimObjectChangeNotifier instance.

Parameters
datasetIdDataset identifier for which notifications are being requested.
HP.HPTRIM.SDK.TrimObjectChangeNotifier.TrimObjectChangeNotifier ( string  datasetId,
BaseObjectTypes  objectType 
)

Creates a TrimObjectChangeNotifier instance.

Parameters
datasetIdDataset identifier for which notifications are being requested.
objectTypeObject type for which notifications are being requested.
HP.HPTRIM.SDK.TrimObjectChangeNotifier.TrimObjectChangeNotifier ( string  datasetId,
BaseObjectTypesList  objectTypes 
)

Creates a TrimObjectChangeNotifier instance.

Parameters
datasetIdDataset identifier for which notifications are being requested.
objectTypesList of object types for which notifications are being requested.

Member Function Documentation

delegate void HP.HPTRIM.SDK.TrimObjectChangeNotifier.OnTrimObjectChangeEventHandler ( TrimObjectChangeList  notifications)

OnTrimObjectChangeEventHandler is the delegate type of the event that that is fired when object change notifications arrive.

Parameters
notificationsList of object change notifications.

Event Documentation

OnTrimObjectChangeEventHandler HP.HPTRIM.SDK.TrimObjectChangeNotifier.OnTrimObjectChange

OnTrimObjectChange is the event that is fired when object change notifications arrive.