AlertTemplate Class

The AlertTemplate class defines defines the logical behavior of a specific type of alert. Derive from this class to implement new templates for alerts.

System.Object

Microsoft.SharePoint.Portal.Alerts.AlertTemplate

Public Constructors

The following table shows the constructors of the AlertTemplate class and a brief description of each.

Name Description
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.

Protected Methods

The following table shows the protected methods of the AlertTemplate class and a brief description of each.

Name Description
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.

Public Methods

The following table shows the public methods of the AlertTemplate class and a brief description of each.

Name Description
ApplyTemplate Applies the current template settings to the specified alert object.

Public Properties

The following table shows the public properties of the AlertTemplate class, the data type of each property, and a brief description of each.

Name Data Type Description
ConditionText String Gets a user-friendly description of the query that describes alerts created with this template.

Protected Properties

The following table shows the protected properties of the AlertTemplate class, the data type of each property, and a brief description of each.

Name Data Type Description
RankingEnabled Boolean Gets a flag that indicates whether alerts created from this template have relevance ranking enabled.

Thread Safety

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.

Remarks

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.

Requirements

Namespace: Microsoft.SharePoint.Portal.Alerts

Platforms: Microsoft Windows Server 2003

Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)

Security: Code Access Security