[This is preliminary documentation and is subject to change.]
Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
public void Relocate( ConnectionId connectionId, SessionId sessionId, DocumentId documentId, CategoryId destination, RelocateDocumentSettings settings )
Parameters
- connectionId
- Type: ContentStudioConnectionId
The connection id. - sessionId
- Type: ContentStudio.SecuritySessionId
The session id. - documentId
- Type: ContentStudio.DocumentDocumentId
The document to relocate. - destination
- Type: ContentStudio.DocumentCategoryId
A category that represents the new location of the document. - settings
- Type: ContentStudio.DocumentRelocateDocumentSettings
Represents an object that contains settings defining rules used during the operation. Can be null to use the default (recommended) settings.
Exception | Condition |
---|---|
CSInvalidSessionException | |
CSDocumentNotFoundException | The documentId does not exist. |
CSPermissionDeniedException | |
CSException |
The category does not exist. (Number = 1503) - The document or category is protected. (Number = 1811) - The document is not an MLC member. (Number = 1558) - Incompatible EPT schemas. (Number = 1785) - Cannot move MLC documents. (Number = 1786) - Cannot move. The source and destination document types are not compatible with each other. (Number = 1787) - Cannot move EPT documents. (Number = 1788) - Cannot move MLC master documents. (Number = 1789) - The document is checked out by another user. (Number = 1809) |
SqlException |
This method was added in Content Studio version 5.5
The current category of the document must be compatible with the destination category i.e. both the source category and the destination category must be of the same type. For example, it is not possible to move an EPT document to a category that contains Html documents with meta data - it can only be moved to another category for EPT documents. When the document's category is the same as the destination category, this method does nothing.
When the internal move operation has been performed, the physical file(s) representing the document on disk are deleted. The document file(s) are then rebuilt at the new location using the regular synchronize operation. This means that the OnDocumentSynchronize event action is raised if there is an active handler specified for this event action and the destination category. Ept documents will be reindexed at the new location, which means that the OnXmlIndexSave event actions will be raised accordingly.
By default, MLC documents cannot be relocated but this can be allowed by using the AllowMLCMembers property of the settings parameter. However, MLC Master Documents cannot be relocated. When an MLC member document is relocated it is disconnected from the MLC as a part of the operation.