Condividi tramite


SPImport Class

Supports importing specified content into a Windows SharePoint Services site collection using a migration package (.cmp) file in XML format.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.Deployment.SPDeployment
    Microsoft.SharePoint.Deployment.SPImport

Namespace:  Microsoft.SharePoint.Deployment
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SPImport _
    Inherits SPDeployment

Dim instance As SPImport
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPImport : SPDeployment

Remarks

This class participates with other classes in the Deployment namespace to support importing, exporting, publishing, and migrating Windows SharePoint content, as well as supporting backup and restore capabilities.

You can initiate an import operation by first initializing an instance of the Microsoft.SharePoint.Deployment.SPImportSettings class with the required import settings, and then passing the SPImportSettings object to the constructor of SPImport class; you then call the SPImport.Run method.

The Microsoft.SharePoint.Deployment.SPImportSettings class encapsulates the import options that control such things as how the data is imported, whether or not object identity is preserved, how the import algorithm searches for existing objects, where in the destination hierarchy the data is imported (that is, how the data is re-parented), as well as providing options to import additional information, such as security, versioning, and other file information.

Thread Safety

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

See Also

Reference

SPImport Members

Microsoft.SharePoint.Deployment Namespace