FilterBase, classe (Microsoft.Office.Server.ApplicationRegistry.Runtime)
Provides an abstract base class for filters in the Business Data Catalog.
Espace de noms : Microsoft.Office.Server.ApplicationRegistry.Runtime
Assembly : Microsoft.SharePoint.Portal (dans microsoft.sharepoint.portal.dll)
Syntaxe
'Déclaration
<SerializableAttribute> _
<DefaultMemberAttribute("Item")> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
Public MustInherit Class FilterBase
'Utilisation
Dim instance As FilterBase
[SerializableAttribute]
[DefaultMemberAttribute("Item")]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)]
public abstract class FilterBase
Remarques
Filters are annotations on methods that capture the parameters users or the system provides to restrict the instances that are returned. The metadata author 'tags' a particular 'slot' or field in an input parameter to a back-end API with the filterdescriptor and then when the user or system sets the value on the filter, that value is written into the field when the method is executed, overriding the default value for that field. A method can support zero or more filters.
Line-of-business (LOB) systems provide various filtering mechanisms. The Business Data Catalog abstracts common patterns so that it can provide users with the same filtering semantics, regardless of the data source. The Business Data Catalog supports the following filters and filtering patterns:
Comparison filter Limits the instances returned to those where the specified condition is met.
Wildcard filter Limits the instances returned to those where field like value, where value may contain the asterisk (*) wildcard character. Users can use this filter type to present more user-friendly filters such as "starts with" and "contains".
Limit filter Limits the number of instances returned to n. SQL supports this filter with the SELECT TOP clause. By using a Limit filter, you can prevent long waits and time outs, and also prevent users from issuing bad queries that request a large amount of data.
UserContext filter Limits the instances by the current user's context. This filter tells the Business Data Catalog to append the current Microsoft Windows user's domain\username to the method call. In Forms authentication, the Business Data Catalog appends the forms authentication user name.
Username filter Limits the instances by a single sign-on (SSO) username. This filter tells the Business Data Catalog to pass the username from SSO as part of a parameter to the method call.
Password filter Works with the Username filter. This filter tells the Business Data Catalog to pass the password from SSO as part of a parameter to the method call.
Notes
The back-end method definition should support the filters. Only then can you, in a context-sensitive manner, use filters to reflect in the front-end Web server the functionality that is available in the back-end application. The metadata simply declares which filters a method supports.
UserProfile filter Specified in the FilterDescriptor definition. To use this simple filter, declare a filter of the type UserProfile" and add a System.String property with the name "UserProfilePropertyName", whose value is the name of a User Profile property. The Business Data Catalog looks up the current user's profile, reads the value of the property with this name, and plumbs that through to the back-end method that is invoked.
SSOTicket filter Tells the Business Data Catalog to pass the SSO ticket from SSO as part of a parameter to the method call.
LastIdSeen filter Enables chunking for IDEnumerator objects. For Web services and other non-streaming back-end applications, use the LastIdSeen filter in your IDEnumerator object, as shown in the following code example, to improve performance:
SELECT TOP 100 Id FROM Customers WHERE Id>=@LastIdSeen ORDER BY Id
Hiérarchie d'héritage
System.Object
Microsoft.Office.Server.ApplicationRegistry.Runtime.FilterBase
Microsoft.Office.Server.ApplicationRegistry.Runtime.SystemFilter
Microsoft.Office.Server.ApplicationRegistry.Runtime.UserInputFilter
Sécurité des threads
Les membres statiques publics de ce type (Shared en Visual Basic) sont sécurisés au niveau des threads. Il n'est pas garanti que les membres d'instance soient sécurisés au niveau des threads.
Voir aussi
Référence
Membres FilterBase
Microsoft.Office.Server.ApplicationRegistry.Runtime, espace de noms