UnitManagerRename Method Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Renames a unit in Content Studio and in the underlying file system.

Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public void Rename(
	ConnectionId connectionId,
	SessionId sessionId,
	UnitId unitId,
	string newName
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
unitId
Type: ContentStudio.DocumentUnitId
The identifier of the unit to rename.
newName
Type: SystemString
The new category name. This name cannot be null, empty or contain any invalid filename character and cannot be in use already.
Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThe specified connectionId or newName is invalid.
ArgumentExceptionunitId represents the System unit.
ArgumentNullException
IOException
UnauthorizedAccessException
CSPermissionDeniedException
CSInvalidSessionException
PlatformNotSupportedExceptionThe operation requires at least Vista / Windows Server 2008
CSException
NumberDescription
1503The unit unitId does not exist
1508The name contains invalid characters.
1512The name is already in use, choose another name.
1516The name may not start or end with spaces.
1511The name is reserved.
Content Studio permissions

Write Container permission on the affected category is required to rename a category.
Remarks

This metod was added in CS 5.4

Requires Transactional NTFS which is present in Windows Vista / Server 2008 and later.

See Also

Reference