|Top Previous Next|
The Application Programming Interface for CopyMove enables SharePoint software developers to integrate CopyMove with their own SharePoint applications. Basically, the API supports the operations; copy, move, export and import. They can respectively be leveraged to copy, move, export and import one or more folders, documents and list items at a time. The items are handled with full fidelity including Metadata, version history and item level permissions. In this context, the Metadata includes the created and modified timestamps, the created by and modified by users, other system Metadata and custom Metadata.
The API is exposed as a .NET object model for use in server side code and as a WCF service for remote client use. The .NET API exposes the following methods:
CopyMoveResult Copy(CopyMoveItemTransaction transaction);
CopyMoveResult Move(CopyMoveItemTransaction transaction);
CopyMoveResult Export(CopyMoveItemTransaction transaction);
CopyMoveResult Import(CopyMoveItemTransaction transaction);
CopyMoveStatus GetStatus(string transactionId);
where the WCF service is currently only exposing the Copy, Move and GetStatus methods. There are also some differences with respect to asynchronous invocation of the operations - but more about this later.
The Copy, Move, Export and Import methods all take an instance of the CopyMoveItemTransaction class as input and returns an instance of the CopyMoveResult class when the transaction is completed or aborted by errors or warnings. Larger transactions can take some time to complete and the GetStatus method can then be used to track the progress from another thread or from the same thread if the operations are invoked asynchronously as demonstrated later in this chapter. The following class diagram outlines the details of the input and output parameter classes in the API. The facade classes are documented in the next two sections.
The following tables documents each class and its properties shown in the class diagram above.