Sharepoint学习笔记—习题系列--70-573习题解析 -(Q127-Q130)
Question 127
You create a custom list named Products.
You need to perform a Representational State Transfer (REST) query that returns the first product in the list.
Which URL should you use?
A. http://intranet/_vti_bin/ListData.svc/Products(1)
B. http://intranet/_vti_bin/ListData.svc/Products $filter=1
C. http://intranet/Lists/Products/AllItems.aspx contents=1
D. http://intranet/Lists/Products/ListData.svc $expand=1
解析:
本题是想要返回列表中的第一条记录(ID值为1)。
在Question126中我们已经看了关于REST的基本知识点,下面直接分析各选项:
选项A. http://intranet/_vti_bin/ListData.svc/Products(1) 获取Product列表中ID值为1的Item.
选项B. http://intranet/_vti_bin/ListData.svc/Products $filter=1 此用法不对,一般语法 是/_vti_bin/ListData.svc/ListName?$filter=COLUMN1 eq 'VALUE11’ 即通过某列的值进行过滤查找。
选项C. http://intranet/Lists/Products/AllItems.aspx contents=1 这明显不是REST的表达
选项D. http://intranet/Lists/Products/ListData.svc $expand=1此用法不对,Expand的作用类似于JOIN,例如:如果要返回两个List(Building与 Rooms)的Items,则使用$expand 扩展:/_vti_bin/ListData.svc/Building?$expand=Rooms
所以本题目正确选项应该是A
参考:
http://msdn.microsoft.com/en-us/library/ff798339.aspx
Question 128
You create two custom lists named Offices and Rooms.
Rooms has the following columns:
Title
Capacity
Equipment
Offices has the following columns:
Title
Rooms (a lookup to the Title column in the Rooms list)
Rooms: Capacity
Rooms: Equipment
You need to perform a Representational State Transfer (REST) query that returns a list of all the offices that have rooms with a capacity of 10. The query results must include the room titles and the equipment in each room.
Which URL should you choose?
A. /_vti_bin/ListData.svc/Offices $expand=Rooms&$filter=Rooms/Capacity eq 10
B. /_vti_bin/ListData.svc/Offices &$filter=Rooms/Capacity eq 10
C. /_vti_bin/ListData.svc/Rooms $expand=Offices&$filter=Rooms/Capacity eq 10
D. /_vti_bin/ListData.svc/Rooms &$filter=Offices/Capacity eq 10
解析:
本题涉及到两列表的连接,所以必然要用到Expand方法。所以直接可以排除选项B,D。
又根据题意:需要返回所有拥有接客量为10的房间的Office记录,即:是Rooms跟Office连接,Office是主表,Rooms是从表,返回Office列表项记录,Expand之后跟的应该是从表,所以选项A为答案。
所以本题目正确选项应该是A
参考:
http://msdn.microsoft.com/en-us/library/ff798339.aspx
Question 129
You need to create a Microsoft .NET Framework console application that queries a list by using the SharePoint client object model.
Which two assemblies should you reference? (Each correct answer presents part of the solution. Choose two.)
A. Microsoft.Office.Sharepoint.ClientExtensions.dll
B. Microsoft.SharePoint.Client.dll
C. Microsoft.SharePoint.Client.Runtime.dll
D. Microsoft.SharePoint.Client.Silverlight.Runtime.dll
解析:
本题是想建立一个基于.NET Framework的控制台应用程序去访问Sharepoint的列表资源。
涉及到Sharepoint的客户端对象模型。
使用 SharePoint Foundation 2010 托管客户端对象模型,您可以设计客户端应用程序,以便无需在运行 Microsoft SharePoint Foundation 2010 的服务器上安装代码即可访问 SharePoint 内容。例如,您可以构建新类别的应用程序,其中包括编写基于 Microsoft .NET Framework 的应用程序、丰富的交互式 Web 部件、Microsoft Silverlight 应用程序以及在 SharePoint Web 部件中运行客户端的 ECMAScript(JavaScript、JScript) 应用程序。
若要构建Windows 控制台托管的客户端对象模型应用程序,您必须添加对以下两个程序集的引用:Microsoft.SharePoint.Client.dll 和 Microsoft.SharePoint.Client.Runtime.dll。安装 SharePoint Foundation 时将会在服务器上安装这两个程序集。这两个程序集位于以下目录中:
%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\ISAPI
对于 SharePoint Foundation Beta 和 Microsoft SharePoint Server 2010 Beta,您必须复制这两个程序集并将其放到开发客户端计算机上的方便位置。在设置使用 SharePoint Foundation 2010 托管客户端对象模型的项目时,必须通过浏览找到这两个程序集才能添加对它们的引用。
所以本题目正确选项应该是B.C
参考:
SharePoint 2010: Introducing the Client Object Model
http://www.chakkaradeep.com/post/SharePoint-2010-Introducing-the-Client-Object-Model.aspx
http://msdn.microsoft.com/zh-cn/library/ee857094(v=office.14).aspx
Question 130
You need to delete the previous versions of all documents in a document library.
The deleted versions of the documents must be retained in the SharePoint Recycle Bin.
What should you do?
A. For the document library, call the Recycle method.
B. For the document library, call the Delete method.
C. For each document, call the DeleteAll method of the Versions property.
D. For each document, call the RecycleAll method of the Versions property.
解析:
本题是想把被删除的某文档库中的文档保留在Sharepoint的回收箱中,在代码中如何实现。
直接来看各选项提供的相应方法:
选项A. For the document library, call the Recycle method. 此方法用于回收列表(Recycle the List),并返回被收回的列表的GUID。
选项B. For the document library, call the Delete method. 此方法用于删除列表(Delete the List)。
其中选项A.B均是基于SPDocumentLibrary类上的方法。
选项C. For each document, call the DeleteAll method of the Versions property. 此方法用于删除除了当前版本以外的所有的文档列表项。
选项D. For each document, call the RecycleAll method of the Versions property. 此方法用于回收除了当前版本以外的所有的文档列表项。
其中选项C.D均是基于SPListItemVersionCollection类上的方法。
Recycle与Delete的区别是:Recycle要进回收站,Delete则是直接删除掉,再也找不回来。
所以本题目正确选项应该是D
参考:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitemversioncollection.recycleall.aspx
http://msdn.microsoft.com/zh-cn/library/microsoft.sharepoint.splist.recycle(v=office.12).aspx
http://msdn.microsoft.com/zh-cn/library/microsoft.sharepoint.spdocumentlibrary_members(v=office.12).aspx
Sharepoint学习笔记—习题系列--70-573习题解析 -(Q127-Q130)的更多相关文章
- Sharepoint学习笔记—ECM系列—文档列表的Metedata Navigation与Key Filter功能的实现
如果一个文档列表中存放了成百上千的文档,想要快速的找到你想要的还真不是件容易的事,Sharepoint提供了Metedata Navigation与Key Filter功能可以帮助我们快速的过滤和定位 ...
- Sharepoint学习笔记—ECM系列--文档集(Document Set)的实现
文档集是 SharePoint Server 2010 中的一项新功能,它使组织能够管理单个可交付文档或工作产品(可包含多个文档或文件).文档集是特殊类型的文件夹,它合并了唯一的文档集属性以及文件夹和 ...
- Sharepoint学习笔记—习题系列--70-576习题解析 --索引目录
Sharepoint学习笔记—习题系列--70-576习题解析 为便于查阅,这里整理并列出了70-576习题解析系列的所有问题,有些内容可能会在以后更新. 需要事先申明的是: 1. ...
- Sharepoint学习笔记—习题系列--70-573习题解析 --索引目录
Sharepoint学习笔记—习题系列--70-573习题解析 为便于查阅,这里整理并列出了我前面播客中的关于70-573习题解析系列的所有问题,有些内容可能会在以后更新, ...
- Deep Learning(深度学习)学习笔记整理系列之(五)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- Deep Learning(深度学习)学习笔记整理系列之(八)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- Deep Learning(深度学习)学习笔记整理系列之(七)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- Deep Learning(深度学习)学习笔记整理系列之(六)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- Deep Learning(深度学习)学习笔记整理系列之(四)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- Deep Learning(深度学习)学习笔记整理系列之(三)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
随机推荐
- 为android项目集成maven
为什么要为android项目增加maven集成功能呢?这里我想到几个主要理由: 部署测试人员和开发人员的角色分离,让他们摆脱eclipse开发环境设置android sdk环境,直接在服务器上运行一个 ...
- google chrome set
"D:\Program Files\Google\Chrome\Application\chrome_bk.exe" --start-maximized --user-data-d ...
- Android UI开发第四十一篇——墨迹天气3.0引导界面及动画实现
周末升级了墨迹天气,看着引导界面做的不错,模仿一下,可能与原作者的代码实现不一样,但是实现的效果还是差不多的.先分享一篇以前的文章,android动画的基础知识,<Android UI开发第十二 ...
- 【PRML读书笔记-Chapter1-Introduction】1.1 Example:Polynomial Curve Fitting
书中给出了一个典型的曲线拟合的例子,给定一定量的x以及对应的t值,要你判断新的x对应的t值多少. 任务就是要我们去发现潜在的曲线方程:sin(2πx) 这时就需要概率论的帮忙,对于这种不确定给t赋何值 ...
- Guzzle – 构建 RESTful Web 服务的 PHP HTTP 框架
Guzzle 减轻了发送 HTTP 请求和创建 Web 服务客户端的痛苦.它包含建立一个强大的网络服务客户端的工具,包括:服务描述定义的输入和输出的 API,资源迭代器遍历分页资源,尽可能有效地发送大 ...
- Vue基础---->VueJS的使用(二)
组件(Component)是 Vue.js 最强大的功能之一.组件可以扩展 HTML 元素,封装可重用的代码.在较高层面上,组件是自定义元素,Vue.js 的编译器为它添加特殊功能.今天我们就来学习一 ...
- 【rational rose】用例图
- mysql批量生成修改表和列注释语句
当我们在一个数据库修改完备注后,需要将其导致另一个服务器上的数据库中,需要生成批量执行语句,方便操作,注意用change 或modified 进行列的属性修改时,没有写全的话会造成其它属性的丢失,如 ...
- SpringMVC核心——参数获取与Servlet资源获取问题
一.SpringMVC 使用 @PathVariable.@RequestParam.@RequestHeader.@CookieValue 等来解决参数获取问题. 1. @PathVariable: ...
- [水煮 ASP.NET Web API2 方法论](3-5)路由约束
问题 怎么样限制路由中参数的值. 解决方案 ASP.NET WEB API 允许我们通过 IHttpRouteConstraint 接口设置路由约束.集中式路由和直接式路由都可以使用 IHttpRou ...