Click or drag to resize
OSIsoft, LLC

AFNotificationContactTemplate Class

The AFNotificationContactTemplate provides the definition used to create AFNotificationContact objects within an AFNotification or AFNotificationRuleSubscriber objects within an AFNotificationRule.

Inheritance Hierarchy
SystemObject
  OSIsoft.AFAFObject
    OSIsoft.AF.NotificationAFNotificationContactTemplate

Namespace:  OSIsoft.AF.Notification
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 2.10.8.440
Syntax
[SerializableAttribute]
public sealed class AFNotificationContactTemplate : AFObject, 
	IAFNotificationContact, IAFTransactable, IAFChangedEvent, IAFSecurable, IComparable<AFNotificationContactTemplate>

The AFNotificationContactTemplate type exposes the following members.

Constructors
  NameDescription
Public methodAFNotificationContactTemplate(AFContact, String)
Initializes a new instance of the class with default values.
Public methodAFNotificationContactTemplate(PISystem, String)
Initializes a new instance of the class with the specified name.
Top
Properties
  NameDescription
Public propertyAvailable
This property indicates whether the AFNotificationContact objects created from this template are available to receive notifications.
Public propertyCategoryString Obsolete.
This property is used by the AFNotificationContent object to determine if the AFNotificationContact is interested in the Category of the AFNotificationContent.
Public propertyCheckOutInfo
This read-only property returns the checked out status information for the object.
Public propertyConfigString
This property returns the current configuration of the contact's delivery channel as a string suitable for displaying to an end-user.
Public propertyContact
This read-only property gets the AFContact associated with the notification contact template.
Public propertyContactType
The type of the AFNotificationContact to create from this template.
Public propertyDeliveryChannel
The instance of the delivery channel that is associated with the AFNotificationContactTemplate to configure deliver notifications.
Public propertyDeliveryChannelPlugIn
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.
Public propertyDescription
Read/write property that provides a more detailed description of the object.
Public propertyEscalationTimeout
This property is for an EscalationAFNotificationContact to specify the retry interval if the notification send was not successful.
Public propertyExpirationPeriod Obsolete.
This property is for an IndividualAFNotificationContact to specify the expiration period for the notification.
Public propertyHasChildren
This read-only property returns if the notification contact template has child templates.
Public propertyID
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.)
Public propertyIdentity
This read-only property contains identity of the object.
(Inherited from AFObject.)
Public propertyIsDeleted
This read-only property indicates whether the object has been deleted.
(Inherited from AFObject.)
Public propertyIsDirty
This read-only property indicates whether the object has been modified since the last save to the PI AF Server.
Public propertyIsInternal
This property indicates that the AFNotificationContactTemplate is an internal template.
Public propertyIsNew
This read-only property indicates whether the object is new and has never been saved to the PI AF Server.
Public propertyMaximumRetries
This property is for an IndividualAFNotificationContact to specify the maximum number of times to retry sending the notification if it was not successful.
Public propertyMinimumAcknowledgements
This property is for an GroupAFNotificationContact to specify the minimum number of acknowledgments before the group is considered to be acknowledged.
Public propertyName
This property defines the name that identifies the object.
Public propertyNotificationContactTemplates
This property returns the collection of child notification contact templates.
Public propertyNotifyWhenInstanceEnded
This property is for an IndividualAFNotificationContact to specify that the notification contact should be notified when the instance of the notification ends.
Public propertyPISystem
This read-only property allows access to the PISystem associated with this object.
(Inherited from AFObject.)
Public propertyRetryInterval
This property is for an IndividualAFNotificationContact to specify the retry interval if the notification send was not successful.
Public propertySecurity
This read-only property returns the AFSecurity information for the object.
Public propertyUniqueID
Read-only property that provides the object's ID as a String.
(Inherited from AFObject.)
Top
Methods
  NameDescription
Public methodCode exampleApplyChanges
This method applies the changes to the object and makes those changes available to other objects for the current user.
Public methodCode exampleCheckIn
This method checks in (commits) all the changes to the object by saving the information to persistent storage.
Public methodCheckOut
This method locks the object so that its configuration can be modified.
Public methodStatic memberCheckOutNotificationContactTemplates
Check out the objects with the specified unique identifiers at the specified query date.
Public methodCompareTo(Object)
Compares this instance with a specified Object.
(Inherited from AFObject.)
Public methodCompareTo(AFObject)
Compares this instance with a specified AFObject.
(Inherited from AFObject.)
Public methodStatic memberDeleteNotificationContactTemplates
Delete the objects with the specified unique identifiers.
Public methodEquals(Object)
Determines whether the specified Object is equal to the current object.
(Inherited from AFObject.)
Public methodEquals(AFObject)
Indicates whether the current object is equal to another object of the same type.
(Inherited from AFObject.)
Public methodStatic memberFindNotificationContactTemplate
Retrieves the AFNotificationContactTemplate object with the specified unique identifier.
Public methodStatic memberFindNotificationContactTemplates(PISystem, Guid)
Performs a search within the PISystem to retrieve a collection of AFNotificationContactTemplate objects with the specified list of unique identifiers.
Public methodStatic memberFindNotificationContactTemplates(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.
Public methodStatic memberFindNotificationContactTemplatesByContact Obsolete.
Performs a search to retrieve a collection of all the AFNotificationContactTemplate objects that have the specified AFContact configured to receive the notification.
Public methodStatic memberFindNotificationContactTemplatesByDatabase Obsolete.
Retrieves AFNotificationContactTemplate objects referenced within the AFDatabase.
Public methodGetHashCode
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.)
Public methodGetPath
Returns the full path to the object, using just the names.
(Inherited from AFObject.)
Public methodGetPath(AFObject)
Returns the path to the object relative from another object.
(Inherited from AFObject.)
Public methodGetPath(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.)
Public methodGetSecurity
Gets the AFSecurity information of the specified security item associated with the object.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberLoadNotificationContactTemplates(IListAFNotificationContactTemplate)
Loads the specified list AFNotificationContactTemplate objects.
Public methodStatic memberLoadNotificationContactTemplates(PISystem, Guid)
Loads the AFNotificationContactTemplate objects with the specified unique identifiers.
Public methodPersist
This method returns the persistence string for the object.
(Inherited from AFObject.)
Public methodRefresh
Refreshes the client with any changes that have been made to the object since loaded.
Public methodToString
Returns a String that represents the current object.
(Inherited from AFObject.)
Public methodUndoCheckOut
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.
Top
Events
  NameDescription
Public eventCode exampleChanged
Event is raised when the object or one of its sub-objects is changed.
Top
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.

Note Note
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);
    }
}
Version Information

AFSDK

Supported in: 2.10.5, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6, 2.5, 2.4
See Also
Enabling Operational Intelligence