Microsoft Office SharePoint Server 2007 – Application Development

These practice test questions from MeasureUp are based on the C# version of Microsoft’s exam 70-542: Microsoft Office SharePoint Server 2007 – Application Development.

The audience for this exam includes individuals who are responsible for developing SharePoint Server software applications. Experience using ASP.NET 2.0 and .NET Framework 2.0 and with developing and deploying SharePoint Server applications will help you prepare for this exam.

MeasureUp offers practice tests for both the C# version and the VB version of exam 70-542.

Objective: Managing Enterprise Content.
Sub-Objective: Enforce document storage business rules by using Document Policy.

Single answer, multiple choice.

You are a Microsoft Office SharePoint developer. Your company now requires that all SharePoint users add a document change history line item to all software requirements documents before saving the documents.

You need to create a class to meet the new requirement.

What should you do?

A.    Create a class that inherits PolicyFeature.
B.    Create a class that implements IRouter.
C.    Create a class that implements IPolicyFeature.
D.    Create a class that inherits Router.

Answer:
C

Tutorial:
You should create a class that implements IPolicyFeature. This interface, which represents a policy feature, defines methods and properties with which SharePoint interacts to invoke custom business rules or functionality. A policy feature can be included in one or more policies, which are assigned to content types.

You should not create a class that inherits PolicyFeature. The PolicyFeature class represents a policy feature that exists in SharePoint.

You should not create a class that implements IRouter. This interface allows you to implement a custom records repository router. Records repository routers allow you to perform additional processing on documents that are submitted to a records repository.

You should not create a class that inherits Router. This class represents a router that exists in SharePoint.

References:
Policy Feature Overview    
MSDN                
http://msdn2.microsoft.com/en-us/library/ms552954.aspx     

IPolicyFeature Interface (Microsoft.Office.RecordsManagement.InformationPolicy)    
MSDN                
http://msdn2.microsoft.com/en-us/library/microsoft.office.recordsmanagement.informationpolicy.ipolicyfeature.aspx      

IPolicyFeature Interface Overview    
MSDN
http://msdn2.microsoft.com/en-us/library/ms567705.aspx     

Objective: Creating Business Intelligence Solutions by Using Office SharePoint Server 2007.
Sub-Objective: Expose a data source by adding a data connection to a Report Center Web Site.

Single answer, multiple choice.

You are a Microsoft Office SharePoint developer. A Microsoft Excel Services workbook uses a text data source to display data from a comma-separated value (CSV) file. The name and location of the CSV file might change in the future.

You need to make this data source available to other Excel workbooks.

What should you do?

A.    Create a user-defined function (UDF) that returns the name of the CSV file.
B.    Export the data source as an Office Database Connection (.odc) file.
C.    Insert a macro that prompts the user for the CSV file path.
D.    Publish the CSV file as a document in SharePoint.

Answer:
B

Tutorial:
You should export the data source as an .odc file. These files store connection information to external data sources. By configuring other workbooks to use the same .odc file, you allow them to access the same data source.

You should not create a UDF that returns the name of the CSV file. Workbooks must access the data source before evaluating functions.

You should not insert a macro that prompts the user for the CSV file path. This would require users to always know the location of the CSV file.

You should not publish the CSV file as a document in SharePoint. This will not make the CSV file available to other workbooks.

References:
Plan data connection management    
Microsoft TechNet                
http://technet2.microsoft.com/Office/en-us/library/b390b289-f7ac-457d-bbaa-f958b13730d91033.mspx?mfr=true
    
Working with a Report Center site    
Microsoft Office Online                
http://office.microsoft.com/en-us/sharepointserver/HA102437521033.aspx     

Objective: Customizing Functionality by Using Profiles.
Sub-Objective: Display results from the user profile change log.

Single answer, multiple choice.

You add a Web reference to the UserProfileChangeService Web service in a Microsoft ASP.NET Web application.

You need to retrieve anniversary changes to all user profiles in the user profile store.

What should you do?

A.    Call the GetUserAllChanges Web method.
B.    Call the GetAllChanges Web method.
C.    Call the GetUserChanges Web method.
D.    Call the GetChanges Web method.

Answer:
D

Tutorial:
You should call the GetChanges Web method. This method accepts a UserProfileChangeQuery instance as a parameter that indicates the types of changes to query. This allows you to specify only anniversary changes. The method returns changes for all user profiles in the user profile store.

You should not call the GetUserAllChanges Web method. This method returns all changes for the specified user.

You should not call the GetAllChanges Web method. This method returns all changes for all users.

You should not call the GetUserChanges Web method. This method returns changes of the specified type for the specified user.

References:
User Profile Change Web Service    
MSDN
http://msdn.microsoft.com/en-us/library/aa981239.aspx

User Profiles Change Log
MSDN
http://msdn2.microsoft.com/en-us/library/ms549249.aspx     

UserProfileChangeService Class (User Profile Change)    
MSDN
http://msdn.microsoft.com/en-us/library/aa981081.aspx     

UserProfileChangeService Members (User Profile Change)    
MSDN
http://msdn.microsoft.com/en-us/library/aa980922.aspx     

Objective: Targeting Content Based on Audience Membership.
Sub-Objective: Display all users in a given audience.

Single answer, multiple choice.

You are creating a custom Web Part that displays all members in an audience named Public Notaries.

You need to write code to retrieve all members of the audience.

What code segment should you use?

A.    AudienceManager audienceManager = new AudienceManager();
ArrayList members = audienceManager.Audiences["Public Notaries"].GetMembership();

B.    AudienceManager audienceManager = new AudienceManager(ServerContext.Current);
ArrayList members = audienceManager.GetUserAudienceIDs("Public Notaries", true, null);

C.    AudienceManager audienceManager = new AudienceManager();
ArrayList nameList = new ArrayList();
nameList.Add("Public Notaries");
ArrayList members = audienceManager.GetAudienceNames(nameList);

D.    ArrayList members = AudienceManager.GetADsPath("Public Notaries");

Answer:
A

Tutorial:
You should use the following code segment:

AudienceManager audienceManager = new AudienceManager();
ArrayList members = audienceManager.Audiences["Public Notaries"].GetMembership();

This code accesses the Audiences property of the AudienceManager class. This returns an AudienceCollection instance that represents all audiences. It then retrieves an Audience instance for an audience named Public Notaries from this collection. Finally, it calls the GetMembership method to return an ArrayList instance that contains all members of the audience.

You should not use the following code segment:

AudienceManager audienceManager = new AudienceManager(ServerContext.Current);
ArrayList members = audienceManager.GetUserAudienceIDs("Public Notaries", true, null);

This code attempts to retrieve the IDs of all audiences for which a user named Public Notaries is a member.

You should not use the following code segment:

AudienceManager audienceManager = new AudienceManager();
ArrayList nameList = new ArrayList();
nameList.Add("Public Notaries");
ArrayList members = audienceManager.GetAudienceNames(nameList);

This code calls GetAudienceNames to return a list of audience names whose IDs match the list passed to the method.

You should not use the following code segment:

ArrayList members = AudienceManager.GetADsPath("Public Notaries");

The GetADsPath parses the data passed in as a parameter into a collection of domains, e-mail addresses and user names.

References:
Audience Object Model Overview
MSDN                
http://msdn2.microsoft.com/en-us/library/ms567140.aspx      

Audiences Overview
MSDN
http://msdn2.microsoft.com/en-us/library/ms571011.aspx
    
How to: Determine Members of an Audience
MSDN
http://msdn2.microsoft.com/en-us/library/ms494684.aspx      

Objective: Searching Data by Using the Search Service.
Sub-Objective: Display the results of a keyword query.

Single answer, multiple choice.

You create the following method to return the results of a keyword query:

public ResultTableCollection Search(string keyword)
{
}

You need to complete the method.

Which code segment should you use?

A.    KeywordQuery query = new KeywordQuery(ServerContext.Current);
query.QueryText = keyword;
return query.Execute();

B.    KeywordQuery query = new KeywordQuery(ServerContext.Current);
query.QueryText = string.Format("select * from Scope() where keyword={0}", keyword);
return query.Execute();

C.    KeywordQuery query = new KeywordQuery(ServerContext.Current);
query.QueryText = string.Format("select {0} from Scope()", keyword);
return query.Execute();

D.    KeywordQuery query = new KeywordQuery(ServerContext.Current);
query.QueryText = string.Format("select * from Scope() where Contains(keyword, '{0}')", keyword);
return query.Execute();

Answer:
A

Tutorial:
You should use the following code segment:

KeywordQuery query = new KeywordQuery(ServerContext.Current);
query.QueryText = keyword;
return query.Execute();

This code creates an instance of the KeywordQuery class. This class allows you to search SharePoint for existing keywords. You simply set the QueryText property to a keyword query and call the Execute method.

You should not set the QueryText property to a value that represents a SQL query. If you want to use a SQL query, you must use the FullTextSqlQuery class.

References:
Enterprise Search Query Object Model Overview    
MSDN                
http://msdn2.microsoft.com/en-us/library/ms544561.aspx      

Building Enterprise Search Queries    
MSDN
http://msdn2.microsoft.com/en-us/library/ms561536.aspx
    
Enterprise Search SQL Syntax Reference    
MSDN                
http://msdn2.microsoft.com/en-us/library/ms493660.aspx     

Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone
cmadmin

ABOUT THE AUTHOR

Posted in Tech Know|

Comment:

Leave a comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>