The AlertTemplate class defines defines the logical behavior of a specific type of alert. Derive from this class to implement new templates for alerts.
The following table shows the constructors of the AlertTemplate class and a brief description of each.
|AlertTemplate||Initializes a new instance of the AlertTemplate class. This constructor is protected.|
|AlertTemplate(Microsoft.SharePoint.Portal.Alerts.Alert)||Initializes a new instance of the AlertTemplate class with the specified Alert object. This constructor is protected.|
The following table shows the protected methods of the AlertTemplate class and a brief description of each.
|CreateQuery||Override to create a query that describes alerts that use this template.|
|GetAlertType||Override to get the alert type that this template is implements.|
The following table shows the public methods of the AlertTemplate class and a brief description of each.
|ApplyTemplate||Applies the current template settings to the specified alert object.|
The following table shows the public properties of the AlertTemplate class, the data type of each property, and a brief description of each.
|ConditionText||String||Gets a user-friendly description of the query that describes alerts created with this template.|
The following table shows the protected properties of the AlertTemplate class, the data type of each property, and a brief description of each.
|RankingEnabled||Boolean||Gets a flag that indicates whether alerts created from this template have relevance ranking enabled.|
Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.
The AlertTemplate class is the base class for all types of alert templates. Derive from the AlertTemplate class to create a distiction between how information about an alert type is rendered in the user interface (UI), and the logical aspects of how the type is implemented. The AlertType class defines the behavior of an alert type in the UI. The AlertTemplate is used by the AlertType to create the alert. The AlertTemplate can be used by other OM level class to create alerts of that type. For example, the FolderAlertType uses the FolderAlertTemplate to create folder alerts. OM level code can also use the FolderAlertTemplate to create folder alerts. The choice to differentiate between the type and template is meant to allow OM level access for creating and editing alerts. One can still implement a AlertType and not implement an alert template. The goal of these classes is to alow OM level creation and editing of alerts.
You can use this class to apply type-specific information to an alert object and to read that type-specific information from the alert. By implementing new alert templates, you can extend the product to support any kind of alert.
Platforms: Microsoft Windows Server 2003
Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)
Security: Code Access Security