Share via


DocumentServiceCollection Class

The DocumentServiceCollection class represents a collection of DocumentService objects in the topology of a server farm.

System.Object

    Microsoft.SharePoint.Portal.Topology.SqlCollectionBase

       Microsoft.SharePoint.Portal.Topology.TopologyObjectCollectionBase

          Microsoft.SharePoint.Portal.Topology.ServiceCollection

             Microsoft.SharePoint.Portal.Topology.DocumentServiceCollection

Public Methods

The following table shows the public methods of the DocumentServiceCollection class and a brief description of each.

Name Description
Add(Microsoft.SharePoint.Portal.Topology.DocumentService) Adds a DocumentService object to the topology.

Public Properties

The following table shows the properties of the DocumentServiceCollection class, the data type of each property, and a brief description of each.

Name Data type Description
Item(System.Guid) Microsoft.SharePoint.Portal.Topology.DocumentService Gets a DocumentService object.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Remarks

Use the DocumentServiceCollection class to manage DocumentService objects in the topology of a server farm. The DocumentServiceCollection class corresponds to the list of DocumentService objects in the Services table of the configuration database. DocumentService objects are distinguished from other components and services listed in the Services table by the GUID value of the DocumentService.ServiceClass public field ({28CC11EC-3E33-4CF8-93B3-4A844CAC4BBF}) in the ClassID column.

After calling the Add method or the (inherited) Remove method of the DocumentServiceCollection object, you must update the DefaultDocumentService property of the GlobalProperties object according to the action taken. If a new document service was added, the DefaultDocumentService property of the GlobalProperties object must point to it. If a document service is removed, the DefaultDocumentService property of the GlobalProperties object must be set to null. In both cases, you must call the Commit(Boolean) method of the GlobalProperties object to persist the changes.

To use the properties and methods of the objects in the Topology namespace you must be a member of the local STS_WPG and SPS_WPG security groups, and a member of the db_owner database role for the configuration database.

In addition, for certain methods, such as those that create a portal site, you must be a member of the local Administrators group, and have membership in the Database Creators and Security Administrators server roles in the SQL Server instance that hosts the configuration database.

Requirements

Namespace: Microsoft.SharePoint.Portal.Topology

Platforms: Microsoft Windows Server 2003

Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)

Security: Code Access Security