1. Trang chủ
  2. » Công Nghệ Thông Tin

Thủ thuật Sharepoint 2010 part 97 potx

11 146 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 11
Dung lượng 0,94 MB

Nội dung

Creating a BCS Solution  731 available for external content types, the type and options for configuring permissions on objects, and the specific steps to configuring authentication and authorization. Interested administrators are encouraged to review the information referenced in Table 24-3. An understanding of this informa- tion is not required to get starting using BCS, and readers can complete the hands-on exercise in the section “Creating a BCS Solution” without this knowledge. TABLE 243: BCS Security Topics and References TOPIC REFERENCE Planning SharePoint 2010 Authentication http://technet.microsoft.com/en-us/library/ cc262350(office.14).aspx BCS Security Overview http://technet.microsoft.com/en-us/library/ ee661743(office.14).aspx. BCS Authentication http://msdn.microsoft.com/en-us/library/ ms566523(office.14).aspx BCS Authorization http://msdn.microsoft.com/en-us/library/ ms497953(office.14).aspx BCS Permissions http://blogs.msdn.com/bcs/archive/2009/11/24/ permissions-in-business-connectivity-services.aspx CREATING A BCS SOLUTION In this section, you’ll create an example solution that illustrates the concepts of external content types and external lists. BCS solutions are created using SharePoint Designer 2010 and Visual Studio 2010. These solutions can be packaged as a Visual Studio Tools for Office (VSTO) package that is eas- ily distributed to SharePoint Workspace, Word, and Outlook 2010 client desktops by leveraging the ClickOnce capabilities in the.NET Framework. BCS also exposes APIs to extend solution packaging to target additional clients. A BCS solution can be created using SharePoint Designer 2010, an external data source, and SharePoint Server 2010. The following exercise creates a BCS solution that requires the following: The Business Data Connectivity Service application and proxy must be created and started.  This can be checked by browsing to the Manage Service Applications web page in Central Administration. A service application instance can be created using the wizard as part of the installation, as shown in Chapter 4. A new service application instance can also be created manually or by using PowerShell. The manual approach was demonstrated in Chapter 20 and discussed in Chapter 7, so readers are encouraged to review this information if necessary. SQL Server 2008 must be installed on the same physical server as SharePoint Server 2010,  including an instance of the Northwind database. The Northwind database can be down- loaded and installed from http://msdn.microsoft.com/en-us/library/ms143221.aspx. If SQL Server is installed on a server other than the SharePoint server, then you need to create 732  CHAPTER 24 BUsiNess coNNectivity services iN sharePoiNt 2010 a target application in the SSS. This is also discussed in Chapter 20 as part of configuring PerformancePoint Services. SharePoint Designer 2010 must be installed on either the same SharePoint server or another  computer that has access to the SharePoint server. Creating an External Content Type An external content type can be created using SharePoint Designer (SPD) 2010. In the following example, using SPD, you will create an ECT named Products that is based on the Products table in the Northwind SQL Server sample database: 1. Browse to a SharePoint site you have created previously or create a new website for use with this exercise. This example uses a website called Inside SharePoint 2010. 2. Start SharePoint Designer 2010 and click the Open Site button (see Figure 24-1). When the Open Site dialog appears, enter the URL of your website and click Open. SPD should dis- play a dialog while the website is loading. Once the site is loaded, review the different types of information displayed. If you are familiar with SharePoint Designer 2007, then you will notice a big difference with SPD 2010. The most obvious is the Ribbon navigation at the top and the new navigation pane on the left-hand side, which displays all of the SharePoint objects that you can create and edit in SPD. See Chapter 22 for full details of SPD. FIGURE 241 3. Begin the process of creating an ECT by clicking External Content Types in the navigation pane. An empty tab called External Content Types should be added to the display, as shown in Figure 24-2. Note that the Ribbon has changed, as it is also contextual, as you have seen throughout SharePoint Server 2010. 4. Open the content type designer by clicking the External Content Type button on the Ribbon. Creating a BCS Solution  733 FIGURE 242 5. For your new content type, specify the Name, Display Name, and the Office Item Type, as shown in Figure 24-3. The Office Item Type determines the Outlook behavior that you can associate with this content type. You won’t be using Outlook for this example, so select Generic List. The Offline Sync for external list field option enables the content type to be taken offline in Outlook or SharePoint Workspace. FIGURE 243 6. The next step is to specify the data source for the content type. Click the Click here to dis- cover external data sources and define operations link, which will display the Operation Designer page shown in Figure 24-4. 7. Click the Add Connection button and choose SQL Server for the Data Source Type in the External Data Source Type Selection dialog. Notice that the other two options are .NET Type and WCF Service. Click the OK button when finished. 8. The next step is to configure the SQL Server Connection dialog. Enter the name of your data- base server in the Database Server box and Northwind for the Database Name in the SQL Server Connection dialog. Note that Connect with User’s Identity is the default authentica- tion mode for connecting to the database. Referred to as pass-through authentication, this 734  CHAPTER 24 BUsiNess coNNectivity services iN sharePoiNt 2010 is the simplest type of authentication to confi gure, and all you need for this exercise. Click OK when fi nished. This should establish a connection to the Northwind database, and an object called Northwind should be added to the Data Source Explorer window as shown in Figure 24-5. Expand the Northwind object to display the Tables, Views, and Routines object hierarchy. Expand the Tables object and select the Products table. FIGURE 244 In the SQL Server Connection dialog, other than Connect with User’s Identity, two other options are available: Connect with Impersonated Windows Identity, and Connect with Impersonated Custom Identity. If you choose either of these options, the grayed-out Secure Store Application ID box is enabled and you have to enter a value. If your SQL Server instance were on a different server than the SharePoint server, then you would need to confi gure a secure store tar- get application and use the secure store to access the database, and you would need to create a target application for the Northwind database in the SSS before you create the external content type in SPD. Once you have confi gured the target application, you would use the target application ID value in the ID box inside the connection dialog. Creating a BCS Solution  735 FIGURE 245 9. Next you define the types of CRUD operations that can be performed on this content type. You should see a window to the right of the Data Source Explorer labeled External Content Type Operations. This window should be empty, because no operations have been defined yet. 10. Right-click the Products table in the Data Source Explorer and notice the different types of oper- ations that can be created. Select the Create All Operations option, as shown in Figure 24-6. The Create All Operations command is only available for creating commands on SQL Server tables and views. Once you select the menu option, this should display the All Operations wizard. The Create, Read Item, Update, Delete, and Read List operations will be automatically created. You also have the option to manually create each operation, as you probably noticed when you viewed each of the options on the shortcut menu. Creating a subset of operations is valuable if you don’t want to allow users to perform all of the CRUD operations or if the database does not support certain operations. 11. Click the Next button to configure the parameters. The Parameters Configuration dialog, shown in Figure 24-7, is displayed. By default, all the columns in the Products table are selected. For this example, keep the default selections. Enable this option for all of the fields except the Discontinued field. This is accomplished by selecting each field and enabling the option. This will make the field available in the External Content Type Picker. Click Next when you are finished. The Filter Parameters Configuration dialog should be displayed. 736  CHAPTER 24 BUsiNess coNNectivity services iN sharePoiNt 2010 FIGURE 246 FIGURE 247 Creating a BCS Solution  737 12. The Filter Parameters Configuration dialog enables you to define filters that will limit the number of items — in this case, table rows — that are returned by the operation from the external data source. You should always specify a limit filter during a Read operation. To add a limit filter, click Add Filter Parameter. In the Properties pane, click (Click to Add). Add the value SQL Limit Filter for the name of the new filter in the Filter Configuration dialog. Select the Limit option for the Filter Type field, and then click OK. 13. Specify a value of 500 in the Default Value field. This will limit the number of rows returned by an operation to 500. Click the Finish button. You will be returned to the Operation Designer page and you should see that the External Content Type Operations window is now populated with the operations you just created, as shown in Figure 24-8. FIGURE 248 14. Click the Save button using the floppy disk icon above the Ribbon or the Save option from the File tab. This will store the Products external content type definition in the BDC metadata store on the SharePoint Server. 15. Browse to the Business Data Connectivity Service web page in Central Administration. You will notice that a Products external content type has been created, as shown in Figure 24-9. You can click on the Products hyperlink to view the ECT information. 16. To view the XML model definition that was automatically created for you when SPD cre- ated the ECT, select the drop-down menu at the top of the page and choose the BDC models option. If you don’t see the drop-down menu, make sure you are using the Edit tab on the Ribbon. On the BDC models page, you should see a single entry named SharePointDesigner- northwind-Administrator, or something similar. Click the menu associated with this entry and select the Export BDC Model option. This page is shown in Figure 24-10. 738  CHAPTER 24 BUsiNess coNNectivity services iN sharePoiNt 2010 FIGURE 249 FIGURE 2410 17. Click the Export button and save the BDC model definition file to a location of your choice so you can view the definition. Once the file is saved, open the file using the Notepad applica- tion; you should see something similar to Figure 24-11. If you have ever created a Business Data Catalog application definition file in SharePoint 2007, you know that this is not very easy, and SPD has done all the work for you. Creating an External List SPD can be used to create an external list but the following walk-through utilizes the web browser to illustrate this process: 1. Browse to the SharePoint website you used to create the Products external content type. 2. Click the View All Site Content option from the Site Actions menu. Creating a BCS Solution  739 3. Click the Create button at the top of the All Site Content page. 4. On the Create web page, filter the display options by clicking the List option in the Filter By category on the left-hand side of the page. Select the External List option, and click the Create button to display the New page, shown in Figure 24-12. If the External List option is not shown, you may need to activate the Team Collaboration Lists feature for the website. (As a reminder, to activate this feature, click the Manage site features link in the Site Actions section of the Site Settings page of the site, and activate the Team Collaboration Lists feature.) FIGURE 2411 FIGURE 2412 740  CHAPTER 24 BUsiNess coNNectivity services iN sharePoiNt 2010 5. Enter a name and a description for the external list on the New page. Leave the Navigation section with the default value. In the Data source configuration section, click the external content type picker icon, which is the icon without the checkmark to the far right of the text box in Figure 24-13. Clicking the icon will reveal the External Content Type Picker dialog shown in Figure 24-14. FIGURE 2413 FIGURE 2414 6. In the External Content Type Picker dialog, select the Products content type and click OK. After the new external list is configured, click the Create button. 7. Navigate to the site and browse to the external list you just created if you’re not already there and you should see the data from the Products table in the Northwind database, as shown in Figure 24-15. This completes the exercise demonstrating how a BCS solution uses an external content type and an external list to view external data. [...]... chapter SharePoint Server 2010 uses BCS as the foundation for SharePoint 2010 Search crawl functionality and social computing by augmenting User Profile Service functionality SharePoint Search is discussed in Chapter 14, and the User Profile Service is discussed in Chapter 17, so the information below is specific to how BCS affects these two services and their capability Search Service SharePoint 2010. .. handlers that were used in previous versions of SharePoint Protocol handlers are very difficult to create and generally need to be written in C++, which negatively impacted handlers that were available for the wide variety of external systems that are in use today Connectors also support richer crawl options than protocol handlers in previous versions of SharePoint For example, they support the full-crawl . a SharePoint site you have created previously or create a new website for use with this exercise. This example uses a website called Inside SharePoint 2010. 2. Start SharePoint Designer 2010. this chapter. SharePoint Server 2010 uses BCS as the foundation for SharePoint 2010 Search crawl functionality and social computing by augmenting User Profile Service functionality. SharePoint. the SharePoint server, then you need to create 732  CHAPTER 24 BUsiNess coNNectivity services iN sharePoiNt 2010 a target application in the SSS. This is also discussed in Chapter 20 as part

Ngày đăng: 02/07/2014, 12:20