Share via


SPClaimProvider.FillSchema Method

When implemented in a derived class, fills the schema of the entity. The schema is used by People Picker control to display the entity data.

Namespace:  Microsoft.SharePoint.Administration.Claims
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Protected MustOverride Sub FillSchema ( _
    schema As SPProviderSchema _
)
'Usage
Dim schema As SPProviderSchema

Me.FillSchema(schema)
protected abstract void FillSchema(
    SPProviderSchema schema
)

Parameters

Remarks

Claims can be displayed in the People Picker control and that implementation is sometimes referred to as a claims picker. If you want to implement a claims picker, you must implement this method. In addition, you must also implement FillClaimTypes(), FillClaimValueTypes(), and FillEntityTypes() methods in the SPClaimProvider, class.For more information, see How to: Create a Claims Provider.

In the following example, the FillSchema method returns two schema elements: Email and JobTitle (these are fields in the PeopleEditorEntityDataKeys class). The claims provider will return to People Picker control the entities as well as the email and job title information.

Sample code provided by: Andy Li, Microsoft Corporation.

Examples

protected override void FillSchema(SPProviderSchema schema)
{
    schema.AddSchemaElement(new SPSchemaElement(PeopleEditorEntityDataKeys.Email,
                                                "Email",
                                                 SPSchemaElementType.TableViewOnly));
    schema.AddSchemaElement(new SPSchemaElement(PeopleEditorEntityDataKeys.JobTitle,
                                    "JobTitle",
                                     SPSchemaElementType.TableViewOnly));

}

See Also

Reference

SPClaimProvider Class

SPClaimProvider Members

Microsoft.SharePoint.Administration.Claims Namespace