AFNotificationContactTemplate Class
- Last UpdatedNov 18, 2025
- 11 minute read
- PI System
- AF SDK 2024 R2
- Developer

Inheritance Hierarchy
Namespace: OSIsoft.AF.Notification
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
[SerializableAttribute] public sealed class AFNotificationContactTemplate : AFObject, IAFNotificationContact, IAFTransactable, IAFChangedEvent, IAFSecurable, IComparable<AFNotificationContactTemplate>
<SerializableAttribute> Public NotInheritable Class AFNotificationContactTemplate Inherits AFObject Implements IAFNotificationContact, IAFTransactable, IAFChangedEvent, IAFSecurable, IComparable(Of AFNotificationContactTemplate) Dim instance As AFNotificationContactTemplate
[SerializableAttribute] public ref class AFNotificationContactTemplate sealed : public AFObject, IAFNotificationContact, IAFTransactable, IAFChangedEvent, IAFSecurable, IComparable<AFNotificationContactTemplate^>
[<SealedAttribute>] [<SerializableAttribute>] type AFNotificationContactTemplate = class inherit AFObject interface IAFNotificationContact interface IAFTransactable interface IAFChangedEvent interface IAFSecurable interface IComparable<AFNotificationContactTemplate> end
The AFNotificationContactTemplate type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| AFNotificationContactTemplate(AFContact, String) |
Initializes a new instance of the class with default values.
| |
| AFNotificationContactTemplate(PISystem, String) |
Initializes a new instance of the class with the specified name.
|
Properties
| Name | Description | |
|---|---|---|
| Available |
This property indicates whether the AFNotificationContact objects created from this template
are available to receive notifications.
| |
| CategoryString | Obsolete.
This property is used by the AFNotificationContent object to determine if the
AFNotificationContact is interested in the Category of the AFNotificationContent.
| |
| CheckOutInfo |
This read-only property returns the checked out status information for the object.
| |
| ConfigString |
This property returns the current configuration of the contact's delivery channel
as a string suitable for displaying to an end-user.
| |
| Contact |
This read-only property gets the AFContact associated with the
notification contact template.
| |
| ContactType |
The type of the AFNotificationContact to create from this template.
| |
| DeliveryChannel |
The instance of the delivery channel that is associated with the
AFNotificationContactTemplate to configure deliver notifications.
| |
| DeliveryChannelPlugIn |
The delivery channel plugin property is used to specify which
delivery channel will be used in the AFNotificationContact created from this
AFNotificationContactTemplate to deliver the notification.
| |
| Description |
Read/write property that provides a more detailed description of the object.
| |
| EscalationTimeout |
This property is for an EscalationAFNotificationContact to specify the retry interval if the notification
send was not successful.
| |
| ExpirationPeriod | Obsolete.
This property is for an IndividualAFNotificationContact to specify the expiration period for
the notification.
| |
| HasChildren |
This read-only property returns if the notification contact
template has child templates.
| |
| ID |
Read-only property that provides a unique identifier for the object to be used for
quick access that is not dependent upon the index.
(Inherited from AFObject.) | |
| Identity |
This read-only property contains identity of the object.
(Inherited from AFObject.) | |
| IsDeleted |
This read-only property indicates whether the object has been deleted.
(Inherited from AFObject.) | |
| IsDirty |
This read-only property indicates whether the object has been modified since the
last save to the PI AF Server.
| |
| IsInternal |
This property indicates that the AFNotificationContactTemplate
is an internal template.
| |
| IsNew |
This read-only property indicates whether the object is new and has never been saved
to the PI AF Server.
| |
| MaximumRetries |
This property is for an IndividualAFNotificationContact to specify the maximum number of times
to retry sending the notification if it was not successful.
| |
| MinimumAcknowledgements |
This property is for an GroupAFNotificationContact to specify the minimum number of
acknowledgments before the group is considered to be acknowledged.
| |
| Name |
This property defines the name that identifies the object.
| |
| NotificationContactTemplates |
This property returns the collection of child notification contact templates.
| |
| NotifyWhenInstanceEnded |
This property is for an IndividualAFNotificationContact to specify that the notification
contact should be notified when the instance of the notification ends.
| |
| PISystem |
This read-only property allows access to the PISystem associated with this
object.
(Inherited from AFObject.) | |
| RetryInterval |
This property is for an IndividualAFNotificationContact to specify the retry interval if the notification
send was not successful.
| |
| Security |
This read-only property returns the AFSecurity information for the object.
| |
| UniqueID |
Read-only property that provides the object's ID as a String.
(Inherited from AFObject.) |
Methods
| Name | Description | |
|---|---|---|
| ApplyChanges |
This method applies the changes to the object and makes
those changes available to other objects for the current user.
| |
| CheckIn |
This method checks in (commits) all the changes to the object by saving
the information to persistent storage.
| |
| CheckOut |
This method locks the object so that its configuration can be modified.
| |
| CheckOutNotificationContactTemplates |
Check out the objects with the specified unique identifiers at the specified query date.
| |
| CompareTo(Object) |
Compares this instance with a specified Object.
(Inherited from AFObject.) | |
| CompareTo(AFObject) |
Compares this instance with a specified AFObject.
(Inherited from AFObject.) | |
| DeleteNotificationContactTemplates |
Delete the objects with the specified unique identifiers.
| |
| Equals(Object) |
Determines whether the specified Object is equal to the current object.
(Inherited from AFObject.) | |
| Equals(AFObject) |
Indicates whether the current object is equal to another object of the same type.
(Inherited from AFObject.) | |
| FindNotificationContactTemplate |
Retrieves the AFNotificationContactTemplate object with the specified unique identifier.
| |
| FindNotificationContactTemplates(PISystem, Guid) |
Performs a search within the PISystem to retrieve a collection
of AFNotificationContactTemplate objects with the specified list of unique identifiers.
| |
| FindNotificationContactTemplates(PISystem, String, AFSearchField, AFSortField, AFSortOrder, Int32) |
Performs a text search within the PISystem to retrieve a collection
of AFNotificationContactTemplate objects that match the specified query string.
| |
| FindNotificationContactTemplatesByContact | Obsolete.
Performs a search to retrieve a collection of all the AFNotificationContactTemplate
objects that have the specified AFContact configured to receive
the notification.
| |
| FindNotificationContactTemplatesByDatabase | Obsolete.
Retrieves AFNotificationContactTemplate objects referenced within
the AFDatabase.
| |
| GetHashCode |
Gets the hash code for this instance of the object which is suitable for use in hashing
algorithms and data structures like a hash table.
(Inherited from AFObject.) | |
| GetPath |
Returns the full path to the object, using just the names.
(Inherited from AFObject.) | |
| GetPath(AFObject) |
Returns the path to the object relative from another object.
(Inherited from AFObject.) | |
| GetPath(AFEncodeType, AFObject) |
Returns the path to the object relative from another object,
using the name and/or id as specified
by encodeType.
(Inherited from AFObject.) | |
| GetSecurity |
Gets the AFSecurity information of the specified security item
associated with the object.
| |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| LoadNotificationContactTemplates(IListAFNotificationContactTemplate) |
Loads the specified list AFNotificationContactTemplate objects.
| |
| LoadNotificationContactTemplates(PISystem, Guid) |
Loads the AFNotificationContactTemplate objects with the specified unique identifiers.
| |
| Persist |
This method returns the persistence string for the object.
(Inherited from AFObject.) | |
| Refresh |
Refreshes the client with any changes that have been made to the object since loaded.
| |
| ToString |
Returns a String that represents the current object.
(Inherited from AFObject.) | |
| UndoCheckOut |
This method discards all the changes to the object and all sub-objects since the
last call to CheckOut. Any changes since the check out will be lost.
|
Events
| Name | Description | |
|---|---|---|
| Changed |
Event is raised when the object or one of its sub-objects is changed.
|
Remarks
When using AFNotificationRule objects, a template specifies the value of the Name, Description, ContactType, and Subscribers properties of the AFNotificationRuleSubscriber created from this template. This template also provides default values for the other properties of the AFNotificationRuleSubscriber created from this template.
When using AFNotification objects, a template specifies the value of the Name, Description, ContactType, Available and NotificationContacts properties of the AFNotificationContact created from this template. This template also provides default values for the other properties of the AFNotificationContact created from this template.
| An AFNotificationContactTemplate is sometimes referred to a Delivery Endpoint, for example when importing/exporting in PI AF Builder. |
Examples
// This example demonstrates how to create a hierarchy of notification // contact templates and use them to create a hierarchy of notification // contacts in a new notification. Then information about the created // notification contacts is displayed. // Get the Database PISystems myPISystems = new PISystems(); PISystem myPISystem = myPISystems.DefaultPISystem; AFDatabase myDB = myPISystem.Databases.DefaultDatabase; // Create a Hierarchy of Notification Contact Templates AFNotificationContactTemplate myContactTemplate1 = new AFNotificationContactTemplate(myPISystem, "MyContact#1"); AFNotificationContactTemplate myContactTemplate2 = new AFNotificationContactTemplate(myPISystem, "MyContact#2"); AFNotificationContactTemplate myGroupContactTemplate = new AFNotificationContactTemplate(myPISystem, "MyGroup"); myGroupContactTemplate.ContactType = AFNotificationContactType.Group; myGroupContactTemplate.NotificationContactTemplates.Add(myContactTemplate1); myGroupContactTemplate.NotificationContactTemplates.Add(myContactTemplate2); // Create a Notification with Notification Contacts AFNotification myNotification = new AFNotification(myDB, "MyNotification"); myNotification.NotificationContacts.Add("MyLocalContact#1"); myNotification.NotificationContacts.Add(myGroupContactTemplate); // Display Information for the Created Notification Contacts foreach (AFNotificationContact item in myNotification.NotificationContacts) { Console.WriteLine("Name of Notification Contact = {0}", item.Name); foreach (AFNotificationContact subItem in item.NotificationContacts) { Console.WriteLine(" Name of Notification Contact = {0}", subItem.Name); } }
' This example demonstrates how to create a hierarchy of notification ' contact templates and use them to create a hierarchy of notification ' contacts in a new notification. Then information about the created ' notification contacts is displayed. ' Get the Database Dim myPISystems As PISystems = New PISystems Dim myPISystem As PISystem = myPISystems.DefaultPISystem Dim myDB As AFDatabase = myPISystem.Databases.DefaultDatabase ' Create a Hierarchy of Notification Contact Templates Dim myContactTemplate1 As AFNotificationContactTemplate = New AFNotificationContactTemplate(myPISystem, "MyContact#1") Dim myContactTemplate2 As AFNotificationContactTemplate = New AFNotificationContactTemplate(myPISystem, "MyContact#2") Dim myGroupContactTemplate As AFNotificationContactTemplate = New AFNotificationContactTemplate(myPISystem, "MyGroup") myGroupContactTemplate.ContactType = AFNotificationContactType.Group myGroupContactTemplate.NotificationContactTemplates.Add(myContactTemplate1) myGroupContactTemplate.NotificationContactTemplates.Add(myContactTemplate2) ' Create a Notification with Notification Contacts Dim myNotification As AFNotification = New AFNotification(myDB, "MyNotification") myNotification.NotificationContacts.Add("MyLocalContact#1") myNotification.NotificationContacts.Add(myGroupContactTemplate) ' Display Information for the Created Notification Contacts For Each item As AFNotificationContact In myNotification.NotificationContacts Console.WriteLine("Name of Notification Contact = {0}", item.Name) For Each subItem As AFNotificationContact In item.NotificationContacts Console.WriteLine(" Name of Notification Contact = {0}", subItem.Name) Next Next
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.