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 ...
随机推荐
- java-Filter
java-Filter 过滤器是小型的Web组件,它们负责拦截请求以及响应,以便查看.提取或以某种方式操作正在客户机和服务器之间交换的数据.简单的说,过滤器就类似于客户端发送的web请求与服务器之间的 ...
- struts2 hello world
注意:仅需要如下这些jar包,否则启动时会出错 commons-lang3-3.2.jar commons-logging-1.1.3.jarcommons-logging-api-1.1.jarfr ...
- 没有找到cxcore100.dll,因此这个应用程序未能启动,重新安装应用程序可能会修复此问题
第一种情况: 出现这个问题多数是因为“环境变量PATH”未设置,虽然你可能在安装的过程中勾选了Add <...>\OpenCV\bin to the system PATH项!安装Open ...
- emacs工程管理,cedet ede插件自动构建Make,Automake
鉴于自己一直都是在做客户端开发方面的工作,服务端很多知识都随着时间淡忘了,最近有一个计划,用一些时间补一下基础.所以早上很早就起床,花了一点时间大致浏览了一下BSD socket的相关API,然后用G ...
- 爬虫技术 -- 进阶学习(九)使用HtmlAgilityPack获取页面链接(附c#代码及插件下载)
菜鸟HtmlAgilityPack初体验...弱弱的代码... Html Agility Pack是一个开源项目,为网页提供了标准的DOM API和XPath导航.使用WebBrowser和HttpW ...
- Sql [hierarchyid]类型如何动态插入层级数据
[hierarchyid] 是个不错的数据类型,能够方便的操作树型结构,网上找了很多资料没找到如何做到动态插入节点的例子,只好从MSDN认真看了下资料写出了一个DEMO CREATE TABLE Em ...
- Velocity魔法堂系列三:模板与宿主环境通信
一.前言 Velocity作为历史悠久的模板引擎不单单可以替代JSP作为Java Web的服务端网页模板引擎,而且可以作为普通文本的模板引擎来增强服务端程序文本处理能力.而且Velocity被移植到不 ...
- VC使用libcurl模拟登录CSDN并自动评论资源以获取积分
环境:Win7 64位+VC2008 软件及源码下载:(http://pan.baidu.com/s/1jGE52pK) 涉及到的知识点: C++多线程编程 libcurl的使用(包括发送http请求 ...
- 2015年百度之星初赛(1) --- D KPI
KPI Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submiss ...
- Brute Force --- UVA 10167: Birthday Cake
Problem G. Birthday Cake Problem's Link:http://uva.onlinejudge.org/index.php?option=com_onlinejudg ...