1 / 16

Module 12 Working with SharePoint Server Profiles and Taxonomy APIs

Module 12 Working with SharePoint Server Profiles and Taxonomy APIs. Module Overview. User Profiles Taxonomies Lab: Working with User Profiles and Taxonomies Programmatically. Lesson 1: User Profiles. Overview of User Profiles and Personal Sites Enterprise Search and People Search

bryanne
Télécharger la présentation

Module 12 Working with SharePoint Server Profiles and Taxonomy APIs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Module 12 Working with SharePoint Server Profiles and Taxonomy APIs

  2. Module Overview • User Profiles • Taxonomies • Lab: Working with User Profiles and Taxonomies Programmatically

  3. Lesson 1: User Profiles • Overview of User Profiles and Personal Sites • Enterprise Search and People Search • Retrieving User Profile Properties • Updating User Profile Properties • Creating Personal Sites Programmatically

  4. Overview of User Profiles and Personal Sites • Each SharePoint user can have a profile • Profile properties • Property behavior • Profile properties can be imported and synchronized • Active Directory • LDAP directory service • Business Connectivity Services entities • Each SharePoint user can have a personal site • Content • Profile properties display • Organizational structure • Colleagues • In Common With feature

  5. Enterprise Search and People Search • People Search is based on indexing user data • Profile properties • Ask Me About values • Social network • Content in personal sites • Enterprise Search incorporates people-related features • Author refiners • Links to personal sites • Presence indicators • FAST Search 2010 for SharePoint includes user contexts • Location • Ask Me About values

  6. Retrieving User Profile Properties • SharePoint 2010 includes new ways of working with user profiles string emailAddr = string.Empty; string personalSite = string.Empty; SPServiceContextsvrCtx = SPServiceContext.Current; uMan = new UserProfileManager(svrCtx); foreach (UserProfileuProfile in uMan) { ProfileSubtypePropertyManagerpropMan = uMan.DefaultProfileSubtypeProperties; string accountName = uProfile["AccountName"].Value.ToString(); if (uProfile["WorkEmail"].Value != null) { emailAddr = uProfile["WorkEmail"].Value.ToString(); } if (uProfile["PersonalSpace"].Value != null) { personalSite = uProfile["PersonalSpace"].Value.ToString(); } }

  7. Updating User Profile Properties • Retrieving a specific profile • GetProfile is overloaded with different options • Set values and then call Commit() SPServiceContextsvrCtx = SPServiceContext.Current; uMan = new UserProfileManager(svrCtx); UserProfileuserProfile = (UserProfile)uMan.GetProfile(true)); string accountName = userProfile["AccountName"].Value.ToString(); intiPos = accountName.IndexOf("\\"); accountName = accountName.Substring(iPos + 1); string updatedEmail = accountName + "@sharepoint.com"; userProfile["WorkEmail"].Value = updatedEmail; userProfile.Commit();

  8. Creating Personal Sites Programmatically • Reference the user’s profile • Call CreatePersonalSite • Privacy issues UserProfileuserProfile = (UserProfile)uMan.GetUserProfile(true)); userProfile.CreatePersonalSite();

  9. Lesson 2: Taxonomies • Overview of Taxonomies • Enterprise Search and Taxonomic Terms • Retrieving Taxonomies Programmatically • Creating Taxonomic Terms Programmatically

  10. Overview of Taxonomies • Business analysts, compliance officers, and other business users define terms and structures for an organization • Hierarchies, categories, and terms are created in the Managed Metadata Service application • Site designers, administrators, and developers can specify list columns as a type of managed metadata

  11. Enterprise Search and Taxonomic Terms • Metadata is extremely important to enterprise search accuracy • Missing or bad values negatively affect the search experience • Requiring users to provide metadata helps improve the search experience • Providing a taxonomy of terms provides consistency for the search experience

  12. Retrieving Taxonomies Programmatically • Taxonomic terms are arranged hierarchically • Session • Store • Group • TermSet • Term SPSitethisSite = SPContext.Current.Site; TaxonomySession session = new TaxonomySession(thisSite); foreach(TermStoretStore in session.TermStores) { Console.WriteLine("Term Store:" + tStore.Name); foreach(Group tGroup in tStore.Groups) { Console.WriteLine(" Group:" + tGroup.Name); foreach(TermSettSet in tGroup.TermSets) { Console.WriteLine(" TermSet:" + tSet.Name); foreach(Term term in tSet.Terms) { Console.WriteLine(" Term:" + term.Name); } } } }

  13. Creating Taxonomic Terms Programmatically • Taxonomic terms are localizable • Creating Groups • Creating TermSets • Creating Terms SPSitethisSite = SPContext.Current.Site; TaxonomySession session = new TaxonomySession(thisSite); Group myGroup = tStore.CreateGroup("My Group"); TermSetmyTermSet = myGroup.CreateTermSet("My Term Set"); Term myTerm = myTermSet.CreateTerm("My Term", 1033);

  14. Lab: Working with User Profiles and Taxonomies Programmatically • Exercise 1: Managing User Profiles • Exercise 2: Working with User Profiles Programmatically Logon information Estimated time: 45 minutes

  15. Lab Review • How did you create user profiles in the user interface? • What did you achieve programmatically with user profiles and personal sites?

  16. Module Review • In this module, you have learned to: • Work with user profiles programmatically • Work with taxonomies programmatically

More Related