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
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.
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 AContent Type BContent 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