Table of Contents

Class UniqueFolderTreePathProvider

Namespace
CMS.ContentEngine
Assembly
CMS.ContentEngine.dll

Provides unique tree path for folder structure.

public class UniqueFolderTreePathProvider : UniqueStringValueProviderBase
Inheritance
object
UniqueStringValueProviderBase
UniqueFolderTreePathProvider
Extension Methods

Constructors

UniqueFolderTreePathProvider(IContentFolderTreePathValidator, int, int)

Creates a new instance of UniqueFolderTreePathProvider

public UniqueFolderTreePathProvider(IContentFolderTreePathValidator folderTreePathValidator, int maxTreePathLength = 1020, int maxTreePathSegmentLength = 50)

Parameters

folderTreePathValidator IContentFolderTreePathValidator

Folder tree path validator.

maxTreePathLength int

Maximum length of the entire tree path with '/'. Defaults to CMS.ContentEngine.Internal.FolderTreeConstants.MAX_TREE_PATH_LENGTH.

maxTreePathSegmentLength int

Maximum length of a tree path segment without '/'. Defaults to CMS.ContentEngine.Internal.FolderTreeConstants.MAX_TREE_PATH_SEGMENT_LENGTH.

Methods

AddRandomSuffix(string, string)

Adds unique suffix to the source string. Truncates source if new value with appended randomSuffix exceeds CMS.ContentEngine.Internal.UniqueStringValueProviderBase.MaxLength.

protected override string AddRandomSuffix(string source, string randomSuffix)

Parameters

source string
randomSuffix string

Returns

string

IsValueUnique(string)

Checks if value is unique.

protected override Task<bool> IsValueUnique(string value)

Parameters

value string

Value to check uniqueness.

Returns

Task<bool>

True if value is unique. False otherwise.