PortalSiteCollection Class

The PortalSiteCollection class represents a collection of PortalSite objects in the topology of a server farm.

System.Object

Microsoft.SharePoint.Portal.Topology.SqlCollectionBase

  Microsoft.SharePoint.Portal.Topology.TopologyObjectCollectionBase

      **Microsoft.SharePoint.Portal.Topology.PortalSiteCollection**

Public Methods

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

Name Description
Add(Microsoft.SharePoint.Portal.Topology.PortalSite) Adds the specified portal site to the topology of the server farm.
Create(System.Uri, String, String, String) Method Creates a portal site with the specified properties in the topology of the server farm.
Create(System.Uri, System.Uri, String, String, String) Method Creates a portal site with the specified properties in the topology of the server farm.
Delete(Microsoft.SharePoint.Portal.Topology.PortalSite) Method Deletes the specified portal site from the topology of the server farm.
Delete(Microsoft.SharePoint.Portal.Topology.PortalSite, Boolean) Method Deletes the specified PortalSite object, the base site, and if deleteDatabases is true, the associated databases from the topology of a server farm.
Remove(System.Guid) Removes the specified portal site from the topology of the server farm.

Public Properties

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

Name Data type Description
Item(System.Guid) Microsoft.SharePoint.Portal.Topology.PortalSite Gets the PortalSite object specified by unique identifier.
Item(System.Uri) Microsoft.SharePoint.Portal.Topology.PortalSite Gets the PortalSite object specified by URL.

Thread Safety

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

Remarks

Use the PortalSiteCollection class to manage the portal sites in the topology of the server farm. A PortalSiteCollection object corresponds to the list of portal sites in the PortalSites table of the configuration database for a server farm.

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