Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This example describes the requests and responses made when a folder is moved within a list using an object model call.
Figure 20: Folder: Move Folder OM
This scenario is initiated by a call to the SPFolder.MoveTo() object model command. This example assumes that:
the code has already instantiated the site collection (SPSite), site (SPWeb), list (SPList), and list folder (SPFolder) objects.
the folder destination location is valid.
the current user has permissions to view the folder.
The following actions happen:
The front-end Web server builds a dynamic query that invokes the proc_SecUpdateUserActiveStatus stored procedure.
The front-end Web server builds a dynamic query that invokes the proc_SecGetIndividualUrlSecurityCheckEventReceivers stored procedure against the source folder.
The back-end database server returns a return code of 0, and returns the following result sets:
Individual URL Security Result Set. This returns security information about the specific source folder.
The front-end Web server builds a dynamic query that invokes the proc_SecGetIndividualUrlSecurityCheckEventReceivers stored procedure against the destination folder.
The back-end database server returns a return code of 0, and returns the following result sets:
Individual URL Security Result Set. This returns security information about the specific destination folder.
The front-end Web server builds a dynamic query that invokes the proc_GetNewListItemId stored procedure.
The front-end Web server builds a transactional dynamic SQL query to move the folder.
The query begins a new SQL transaction.
The query attempts to rename the URL for the folder using the proc_RenameUrl stored procedure. The back-end database server returns a return code of 0, and returns the Rename Result Set, which gives basic information about the old and new URLs for the renamed folder.
The query attempts to get Audit Flags information about the new folder using the proc_GetAuditMaskOutput stored procedure.
The query rolls back the SQL transaction if any of the previous procedures were not successful.
Assuming the previous procedures were successful, the query updates the disk spaced used for the site (2) by calling the proc_UpdateDiskUsed stored procedure, and commits the transaction