Sharepoint学习笔记—习题系列--70-576习题解析 -(Q1-Q3)

 这里我把从网上搜集到的针对Sharepoint 70-576的有关练习进行系统的解析,整理成一个系列, 分期、分批次共享出来,供大家研究。

    70-573考试注重的是"知道"相关知识点,而到了70-576则注重的是"应用"相关知识点;所以二者各有侧重。 

   这里需要事先申明的是:   1. 不要把本系列当成Sharepoint 70-576的应试题库。 

                                       2.  Sharepoint学习不是以考证为目的,真正的掌握必须要通过大量工程实践来达到。 

                                      3.  但是,通过做练习,可以帮助我们加深对Sharepoint相关知识点的认知与掌握,不失为一个复习与整理Sharepoint知识的好方法。 

                                   4.  所有的题目都是英文版的,但不会影响大家对题意的理解。

                        5.  由于解析篇幅限制,每篇文章涉及到的题目不会太多,题目数量也不会一致。 

                                  6.  所有的题目都按: 问题,解析,答案,参考 4个部分进行组织 

                                  7.  本系列是边收集,边整理,边解析,边发布,边更新; 所以需要一定的时间才能完成。 

                                  8. 在本系列积累到一定数量时,我会提供清单目录,但在此之前如果有兴趣,你可以自行归纳整理。

=====================================================================================================

 

Question 1
You are helping an organization’s executive team to design an automated approval process to standardize certain
documents. You have the following requirements:
.The documents must be reviewed and approved by multiple teams in the approval chain.
.Each reviewer must provide feedback as part of completing a review.
.Each reviewer must either approve or reject the documents.
.After review, the document status must be changed; an e-mail must be generated to the document author and
the next reviewer in the approval chain; and a task should be created for the next reviewer in the approval chain.
You must design a custom workflow solution for the document approval process on a SharePoint 2010 site. What
should the solution include?
A. An initiation form to collect the reviewer’s feedback and a Simple activity to approve and reject the document
B. An association form to collect the reviewer’s feedback and a Composite activity to support conditional activities
such as approval and rejection
C. A task form to collect the reviewer’s feedback and a Composite activity to support conditional activities such as
approval and rejection
D. A task form to collect the reviewer’s feedback and a Simple activity to approve and reject the document


解析:
在实际启动任何工作流之前,即可显示关联表单(association form)和初始表单(initiation form)让用户填写。您可以使用关联表单让管理员指定该工作流的参数、默认值和其他信息。关联表单说明工作流如何应用于特定列表、库或内容类型;初始表单说明工作流如何应用于特定的 SharePoint 项目。你可以使用初始表单让用户替代或追加由管理员设置的关联参数,或者指定有关工作流的其他参数或信息。并非所有工作流都需要初始表单
初始表单和关联表单可以是相同的表单。例如,通过对每个工作流表单使用相同的表单,可以让管理员在工作流关联期间设置某些默认参数,然后让实际在特定的项目上启动工作流实例的用户查看和替代这些默认参数。
因此,关联表单和初始表单均不是用来收集用户的反馈信息的。我们在实际操作中通常使用任务表单(task form)来收集用户在参与工作流过程中输入的信息。您可以为工作流中的任务指定自定义表单。但是由于工作流任务是分配了内容类型的 SharePoint 项目,因此由内容类型来确定用于任务类型的自定义表单。
在定义业务过程中的所有步骤之后,可使用 Visual Studio 工作流设计器来设计 SharePoint 工作流。 若要打开设计器,请双击 Workflow1.cs 或 Workflow1.vb 在 解决方案资源管理器或打开快捷菜单这些文件之一的然后选择 打开。
有两种类型的活动:
“简单活动(Simple activity)”执行单个工作单元,例如“延迟 1 天”或“启动 Web 服务”。
“复合活动(Composite activity)”包含其他活动;例如,条件活动可能包含两个分支。
很明显本题的工作流并不是一个简单活动,它包括了收集用户反馈,改变文档状态,发送Email等诸多其它活动。因此,本题是由复合活动进行组织的。

本题答案应该选 C    
参考 
http://msdn.microsoft.com/zh-cn/library/ms481192(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/ee231606.aspx


Question 2
You are designing a SharePoint 2010 feature. The feature includes a feature receiver that executes code on
activation and deactivation. The feature receiver code interacts with a Web service, which could cause errors
beyond your control. You need to ensure that the feature does not activate or deactivate if the Web service
causes an error. Which approach should you recommend?
A. Wrap your code in a try-catch block. Log the error and issue another request to the Web service in the catch
block.
B. Wrap your code in a try-catch block. Log the error and throw an exception in the catch block.
C. Wrap your code in a try-catch block. Only catch exceptions of type SPException.
D. Wrap your code in a try-finally block. Log any issues your code encounters in the finally block.


解析:
  本题试图在一个Feature Receiver实现代码中访问Web Service并处理由此Service引起的异常。
  首先,捕获异常通常用try-catch-finally结构(finally可选),所以可以排除选项D,因为它没有catch异常的部分。catch 和 finally 一起使用的常见方式是:在 try 块中获取并使用资源,在 catch 块中处理异常情况,并在 finally 块中释放资源。
   其次,由于异常是由Web Service引起的,所以此类异常无法由SPException反馈回来,因为SPException是代表由Microsoft SharePoint Foundation引起的异常。所以可以排除选项C。
   最后,对于异常,我们通常要抛出异常信息,否则用户怎么知道程序发生了什么事?所以选择B是本题的答案。至于选项A,它没有抛出异常,并在Catch部分进一步继续访问Web Service,这样操作显然没什么意义,而且由此可能发生的潜在错误也没有进一步处理。

因此因此本题答案应该选B

参考 
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spexception.aspx
http://msdn.microsoft.com/zh-cn/library/dszsf989(v=vs.80).aspx


Question 3
You are designing a SharePoint 2010 information architecture plan for a client that specifies the mechanics of implementing content type change control. The requirements for the change control plan specify that:
.Site managers can create site-specific content types based on the content types in the parent site.
.Content types must not be overwritten when changes are made to parent site content types.
.Site managers can change child site content types.
You need to specify a content type change control plan that meets all these requirements. Which approach
should you recommend?
A. Direct the site manager to explicitly set the read-only property of the content type to true. Direct the site collection manager to make the specified change required in the child site to the content type at the site collection level.
B. Direct the site manager to explicitly set the read-only property of the content type to true. Perform a push-down operation from the parent site to overwrite the required changes to the read-only content types in all the child sites.
C.  Define the content type as read-only at the child site level. Direct the site manager to explicitly set the readonly property of the content type to false to make changes to the content type. Then change the read-only property to true.
D. Define the content type as sealed. Direct the site manager to explicitly set the sealed property of the content type to false to make changes to the content type. Then change the sealed property of the content type to true.

解析:
 本题是关于内容类型(Content Type)更新方面的题目。
 先看题干部分的要求:
 . 要求1.每一级的网站管理员可以基于上级(父母级)内容类型来创建本网站的新的子内容类型
 . 要求2.对上级(或父母级)内容类型所作的修改,不会覆盖(Overwrite)到子内容类型。
 . 要求3. 每一级的网站管理员网站管理员可以有权修改子内容类型。
 回顾Sharepoint内容类型相关的知识点:
  使用 Microsoft SharePoint Foundation,可以对内容类型进行更改(甚至在将内容类型部署到网站、添加到列表和分配给项目之后,也可对其进行更改)。甚至可以确保将这些更改传播到网站内容类型的子内容类型。
  有两种可用于更新内容类型的标准方法。
方法 1:对内容类型进行必要的更改,然后将这些更改向下推送到所有子内容类型。如果必须对使用中的内容类型进针对性的、不连续的更改,则此方法最佳。
  方法 2:使用所需的更改创建新的内容类型,将此类型部署到先前的内容类型存在的位置,然后将先前的内容类型添加到 _Hidden 内容类型组中。如果希望将当前正在使用的内容类型替换为已修订的内容类型,但仍为已对其分配当前内容类型的项目保留当前内容类型,则此方法最佳。
   每个内容类型包含一个对其基于的网站内容类型的引用。这将使 Microsoft SharePoint Foundation 2010 能够将对父内容类型所做的更改传播或向下推送 到其子网站和列表内容类型。在对网站内容类型进行更改时,可以通过用户界面或对象模型将这些更改向下推送到其所有子网站。当向下推送操作将所做的更改复制到基于此网站内容类型的网站或列表内容类型时,不会覆盖整个内容类型。但是,所覆盖的内容的范围是不同的,具体取决于是通过用户界面还是对象模型来执行更改和向下推送操作。
   在通过用户界面编辑网站内容类型并在内容类型设置页上进行更改时,该页上包含的所有设置在向下推送操作过程中将被覆盖。因此,可以向下推送的更改的精度由在每个页上分组的设置定义。每当在内容类型设置页进行任何更改时,此页上的所有设置在向下推送操作过程中将被覆盖。
   通过使用对象模型,可以在向下推送操作中提供更高的精度。当通过对象模型对网站内容类型进行更改时,实际上是代码对网站内容类型在内存中的表示形式进行这些更改。只有在调用 Update 方法时,SharePoint Foundation 才会将这些更改提交回网站数据库。
   更新子内容类型时的注意事项【这才是本题的要求】
1.请注意,向下推送操作将覆盖对子内容类型所做的更改(如果这些更改在向下推送操作的精度内)。例如,假定已对子内容类型中的列进行更改。如果稍后对父模板中的此列进行其他更改或甚至删除此列,并向下推送这些更改,则 SharePoint Foundation 将覆盖您甚或其他人最初在子内容类型中进行的更改。
2.每个向下推送操作此时只会向下推送对父内容类型所做的更改。如果在进行更改时不向下推送这些更改,则稍后无法轻松向下推送这些更改。
3.如果向下推送不再适用于子内容类型的更改,则将忽略这些更改。例如,如果向下推送已从子内容类型中删除的列的列设置更改,则将忽略这些更改。SharePoint Foundation 不会将列添加回子内容类型中。
4.如果试图对标记为只读(ReadOnly)的子内容类型执行向下推送操作,则除非将父内容类型设置为作为向下推送操作的一部分进行读/写,否则向下推送操作将失败。
5.向下推送更改不是全有全无的操作;如果向下推送对给定子内容类型的更改失败,则 SharePoint Foundation 将继续向下推送对任何剩余子内容类型的更改。在向下推送操作结束时,SharePoint Foundation 将返回一个遇到的错误的列表。
6.如果将子内容类型定义为已密封,则对该内容类型执行的向下推送操作将失败
7.若要在网站上创建或管理网站内容类型,则必须具有对该网站的“Web Designer”访问权限。如果不具有对子网站的适当访问权限,则对此子网站中包含的内容类型执行的向下推送操作将失败。

   所以从上面描述可以看出:我们可以通过两种方法来阻止用户对特定内容类型进行更改,即使用只读内容类型和密封内容类型。每种方法均具有自身的优势。
但是,不能阻止用户基于特定的网站内容类型创建内容类型。
1.可以将内容类型定义为只读。将内容类型标记为只读可警告用户不应对该内容类型进行更改。这样,用户必须将内容类型的只读属性明确设置为 false,才能对内容类型进行更改。
2.为了更严格地控制内容类型,可以将内容类型定义为密封。不能通过 Microsoft SharePoint Foundation 2010 用户界面来更改密封内容类型,并且您必须是网站集管理员,才能使用对象模型拆封内容类型。不通过向下推送操作对密封内容类型进行更新。使用 SPContentType 类的 Sealed 方法可获取和设置是否对内容类型进行密封。若要设置此属性,则必须具有网站集管理员权限。
现在回过头看分析各选项:
选项A.
 Direct the site manager to explicitly set the read-only property of the content type to true. 此操作不影响满足要求 1。但对要求2则会产生问题:假设有A->B->C 三级网站,A是最顶层,B在A之下,C在B之下,且各有对应的内容类型和继承关系 Content Type AContent Type BContent Type C。如果按本题描述: 如果在B层对Content Type B设置为 Read only,则如果要对Content Type B做相应修改则不再行得通了,除非把Read Only属性改成 false,完成修改后再改回 true才行。也即:一旦你对相对C级的上层Parent Content Type 即Content Type B设置了Read Only,虽然你可以保证它不受它的更上一级Content Type即Content Type A的修改的覆盖(Overwrite)。但你也不可能再修改它本身,更谈不上影响下一级的Child Content Type C了,也即:你无法完成对Content Type C的上一级 Parent Content Type即Content Type B的修改。
 Direct the site collection manager to make the specified change required in the child site to the content type at the site collection level. 对子内容类型的修改是依靠“网站集管理员”的完成的,显然不符合要求 3。

选项B.
Direct the site manager to explicitly set the read-only property of the content type to true.
此操作与选项A一样,产生的问题也一样。
Perform a push-down operation from the parent site to overwrite the required changes to the read-only content types in all the child sites.
直接把上级内容类型向下推送,显然是不会成功的,因为我们在前面提到:如果试图对标记为只读(ReadOnly)的子内容类型执行向下推送操作,则除非将父内容类型设置为作为向下推送操作的一部分进行读/写,否则向下推送操作将失败。
 
选项C.  Define the content type as read-only at the child site level. Direct the site manager to explicitly set the readonly property of the content type to false to make changes to the content type. Then change the read-only property to true.
本选项符合内容类型推送的要求,且满足本题的所有要求,通过及时变通各级Content Type的Read Only属性来完成相应的更新和阻止更新。

选项D. Define the content type as sealed. Direct the site manager to explicitly set the sealed property of the content type to false to make changes to the content type. Then change the sealed property of the content type to true.
  根据上面的描述,如果将子内容类型定义为已密封,则做得比Read only还没有余地,最终还得需要网站集管理员的介入才能推动更新操作。

因此本题答案应该选 C      

参考 
http://msdn.microsoft.com/zh-cn/library/ms434692(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/microsoft.sharepoint.spcontenttype.readonly(v=office.14).aspx
http://msdn.microsoft.com/en-au/library/ms442695(v=office.14).aspx

 

posted @ 2013-08-26 10:03  wsdj  阅读(1457)  评论(0编辑  收藏  举报