SharePoint2007Provider::ModifyCustomerSite

The ModifyCustomerSite procedure modifies site properties (Title, Description, Owner, UserAccountDirectoryPath, and root administrator user container). It supports rollback.

Arguments

Input Arguments

Input Arguments Required Description

<target>

Yes

The URL of the Windows SharePoint Service administration site.

<siteGUID>

Yes

The SharePoint site GUID to query.

<subsiteGUID>

Yes

The Sharepoint Root Web GUID of Site to query.

<title>

No

The new title of the Web site.

<description>

No

The new description of the Web site.

<owner>

No

The new owner of the site.

<loginName>

Yes

The loginName of the owner.

<name>

No

The name of the owner.

<email>

No

The e-mail address of the owner.

<notes>

No

The notes of the owner.

<org>

No

The distinguished name of the organization that owns the site.

Remarks

The modified properties should be rolled back to the status before implementing this procedure.

  1. The owner checks whether the user is in the site with loginName.

  2. If the user is not in the site,add the user as "Full Control" permission with name, email & notes (if they are in request). The SPUser class does not have a public constructor. Now we add the new owner to role "Full Control", and then modify the owner.

  3. If the user is in the site, we check the name, email & notes (If in request) of the user. If they do not match, throw an exception to remind admin to use UpdateUserInfo procedure to update the user information before modifying site.

  4. Modify the owner of site.

Note

The older owner is not removed from site and have "Full Control" permission.

Sample Code

Example XML Request

<request> 
  <data> 
    <target>https://spserver:8181</target> 
<siteGUID>3F2504E0-4F89-11D3-9A0C-0305E82C3301</siteGUID> 
<subSiteGUID>3F2504E0-4F89-11D3-9A0C-0305E3526892</subSiteGUID> 
<title>Sharepoint Site</title> 
<name>SharepointSite</name> 
<description>This is a sharepoint site</description> 
<owner loginName=" frog\adminstrator" name="admin" email=" adminstrator@fabrikam.com" notes="It's an admin"/> 
<org>OU=raven00,DC=frog,DC=com</org> 
  </data> 
  <procedure> 
    <execute namespace="Sharepoint2007Provider" procedure="ModifyCustomerSite" impersonate="1" > 
      <before source="data" destination="executeData" mode="merge"/> 
      <after source="executeData" destination="data" mode="merge"/> 
    </execute> 
  </procedure> 
</request> 

Example XML Response

<response> 
  <data /> 
</response>

Applies To

SharePoint 2007 Provider for:

  • Hosted Messaging and Collaboration version 4.0

  • Hosted Messaging and Collaboration version 4.5