Micro Focus Content Manager SDK 9.4
|
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...
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... | |
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(); }
HP.HPTRIM.SDK.TrimObjectChangeNotifier.TrimObjectChangeNotifier | ( | string | datasetId | ) |
Creates a TrimObjectChangeNotifier instance.
datasetId | Dataset identifier for which notifications are being requested. |
HP.HPTRIM.SDK.TrimObjectChangeNotifier.TrimObjectChangeNotifier | ( | string | datasetId, |
BaseObjectTypes | objectType | ||
) |
Creates a TrimObjectChangeNotifier instance.
datasetId | Dataset identifier for which notifications are being requested. |
objectType | Object type for which notifications are being requested. |
HP.HPTRIM.SDK.TrimObjectChangeNotifier.TrimObjectChangeNotifier | ( | string | datasetId, |
BaseObjectTypesList | objectTypes | ||
) |
Creates a TrimObjectChangeNotifier instance.
datasetId | Dataset identifier for which notifications are being requested. |
objectTypes | List of object types for which notifications are being requested. |
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.
notifications | List of object change notifications. |
OnTrimObjectChangeEventHandler HP.HPTRIM.SDK.TrimObjectChangeNotifier.OnTrimObjectChange |
OnTrimObjectChange is the event that is fired when object change notifications arrive.