Class TreeProviderBase

Assembly: redb.Core.dll

Base class for tree provider with all platform-agnostic logic.
SQL queries are delegated to ISqlDialect.

public abstract class TreeProviderBase : ITreeProvider

Inheritance

ObjectTreeProviderBase

Implements

Derived

Properties

Cache

protected GlobalMetadataCache Cache { get; }

Methods

ConvertToPolymorphicTreeObjectWithProps(IRedbObject)

protected ITreeRedbObject ConvertToPolymorphicTreeObjectWithProps(IRedbObject source)

ConvertToTreeObject<TProps>(RedbObject<TProps>)

protected TreeRedbObject<TProps> ConvertToTreeObject<TProps>(RedbObject<TProps> source) where TProps : class, new()

CreateChildAsync<TProps>(TreeRedbObject<TProps>, IRedbObject, IRedbUser)

Create child object with explicit user (uses config.DefaultCheckPermissionsOnSave).

public Task<long> CreateChildAsync<TProps>(TreeRedbObject<TProps> obj, IRedbObject parentObj, IRedbUser user) where TProps : class, new()

CreateChildAsync<TProps>(TreeRedbObject<TProps>, IRedbObject)

Create child object (uses _securityContext and config.DefaultCheckPermissionsOnSave).

public Task<long> CreateChildAsync<TProps>(TreeRedbObject<TProps> obj, IRedbObject parentObj) where TProps : class, new()

CreateChildWithUserAsync<TProps>(TreeRedbObject<TProps>, long, long?, bool)

protected virtual Task<long> CreateChildWithUserAsync<TProps>(TreeRedbObject<TProps> obj, long parentId, long? userId = null, bool checkPermissions = false) where TProps : class, new()

DeleteSubtreeAsync(IRedbObject, IRedbUser)

Delete object subtree recursively with explicit user (uses config.DefaultCheckPermissionsOnDelete).

public Task<int> DeleteSubtreeAsync(IRedbObject parentObj, IRedbUser user)

DeleteSubtreeAsync(IRedbObject)

Delete object subtree recursively (uses _securityContext and config.DefaultCheckPermissionsOnDelete).

public Task<int> DeleteSubtreeAsync(IRedbObject parentObj)

DeleteSubtreeWithUserAsync(long, IRedbUser)

protected virtual Task<int> DeleteSubtreeWithUserAsync(long parentId, IRedbUser user)

GetChildrenAsync<TProps>(IRedbObject, IRedbUser)

Get direct children of object with explicit user (uses config.DefaultCheckPermissionsOnLoad).

public Task<IEnumerable<TreeRedbObject<TProps>>> GetChildrenAsync<TProps>(IRedbObject parentObj, IRedbUser user) where TProps : class, new()

GetChildrenAsync<TProps>(IRedbObject)

Get direct children of object (uses _securityContext and config.DefaultCheckPermissionsOnLoad).

public Task<IEnumerable<TreeRedbObject<TProps>>> GetChildrenAsync<TProps>(IRedbObject parentObj) where TProps : class, new()

GetChildrenWithUserAsync<TProps>(long, long?, bool)

protected virtual Task<IEnumerable<TreeRedbObject<TProps>>> GetChildrenWithUserAsync<TProps>(long parentId, long? userId = null, bool checkPermissions = false) where TProps : class, new()

GetDescendantsAsync<TProps>(IRedbObject, int?)

Get all object descendants (uses _securityContext and config.DefaultCheckPermissionsOnLoad).

public Task<IEnumerable<TreeRedbObject<TProps>>> GetDescendantsAsync<TProps>(IRedbObject parentObj, int? maxDepth = null) where TProps : class, new()

GetDescendantsAsync<TProps>(IRedbObject, IRedbUser, int?)

Get all object descendants with explicit user (uses config.DefaultCheckPermissionsOnLoad).

public Task<IEnumerable<TreeRedbObject<TProps>>> GetDescendantsAsync<TProps>(IRedbObject parentObj, IRedbUser user, int? maxDepth = null) where TProps : class, new()

GetDescendantsWithUserAsync<TProps>(long, int, long?, bool)

protected virtual Task<IEnumerable<TreeRedbObject<TProps>>> GetDescendantsWithUserAsync<TProps>(long parentId, int maxDepth = 50, long? userId = null, bool checkPermissions = false) where TProps : class, new()

GetPathToRootAsync<TProps>(IRedbObject, IRedbUser)

Get path from object to root with explicit user (uses config.DefaultCheckPermissionsOnLoad).

public Task<IEnumerable<TreeRedbObject<TProps>>> GetPathToRootAsync<TProps>(IRedbObject obj, IRedbUser user) where TProps : class, new()

GetPathToRootAsync<TProps>(IRedbObject)

Get path from object to root (uses _securityContext and config.DefaultCheckPermissionsOnLoad).

public Task<IEnumerable<TreeRedbObject<TProps>>> GetPathToRootAsync<TProps>(IRedbObject obj) where TProps : class, new()

GetPathToRootWithUserAsync<TProps>(long, long?, bool)

protected virtual Task<IEnumerable<TreeRedbObject<TProps>>> GetPathToRootWithUserAsync<TProps>(long objectId, long? userId = null, bool checkPermissions = false) where TProps : class, new()

GetPolymorphicChildrenAsync(IRedbObject, IRedbUser)

Get all direct children of object regardless of their schemes with explicit user.

public Task<IEnumerable<ITreeRedbObject>> GetPolymorphicChildrenAsync(IRedbObject parentObj, IRedbUser user)

GetPolymorphicChildrenAsync(IRedbObject)

Get all direct children of object regardless of their schemes.

public Task<IEnumerable<ITreeRedbObject>> GetPolymorphicChildrenAsync(IRedbObject parentObj)

GetPolymorphicChildrenWithUserAsync(long, long?, bool)

protected virtual Task<IEnumerable<ITreeRedbObject>> GetPolymorphicChildrenWithUserAsync(long parentId, long? userId = null, bool checkPermissions = false)

GetPolymorphicDescendantsAsync(IRedbObject, int?)

Get all polymorphic descendants of object regardless of their schemes.

public Task<IEnumerable<ITreeRedbObject>> GetPolymorphicDescendantsAsync(IRedbObject parentObj, int? maxDepth = null)

GetPolymorphicDescendantsAsync(IRedbObject, IRedbUser, int?)

Get all polymorphic descendants of object with explicit user.

public Task<IEnumerable<ITreeRedbObject>> GetPolymorphicDescendantsAsync(IRedbObject parentObj, IRedbUser user, int? maxDepth = null)

GetPolymorphicDescendantsWithUserAsync(long, int, long?, bool)

protected virtual Task<IEnumerable<ITreeRedbObject>> GetPolymorphicDescendantsWithUserAsync(long parentId, int maxDepth = 50, long? userId = null, bool checkPermissions = false)

GetPolymorphicPathToRootAsync(IRedbObject, IRedbUser)

Get polymorphic path from object to root with explicit user.

public Task<IEnumerable<ITreeRedbObject>> GetPolymorphicPathToRootAsync(IRedbObject obj, IRedbUser user)

GetPolymorphicPathToRootAsync(IRedbObject)

Get polymorphic path from object to root - objects can be of different schemes.

public Task<IEnumerable<ITreeRedbObject>> GetPolymorphicPathToRootAsync(IRedbObject obj)

GetPolymorphicPathToRootWithUserAsync(long, long?, bool)

protected virtual Task<IEnumerable<ITreeRedbObject>> GetPolymorphicPathToRootWithUserAsync(long objectId, long? userId = null, bool checkPermissions = false)

InitializeTypeRegistryAsync()

Initialize AutomaticTypeRegistry for polymorphic operation support.

public Task InitializeTypeRegistryAsync()

LoadDynamicObjectAsync(long, IRedbUser?)

protected virtual Task<IRedbObject> LoadDynamicObjectAsync(long objectId, IRedbUser? user = null)

LoadPolymorphicTreeAsync(IRedbObject, int?)

Load polymorphic tree/subtree - supports objects of different schemes in one tree.

public Task<ITreeRedbObject> LoadPolymorphicTreeAsync(IRedbObject rootObj, int? maxDepth = null)

LoadPolymorphicTreeAsync(IRedbObject, IRedbUser, int?)

Load polymorphic tree/subtree with explicit user.

public Task<ITreeRedbObject> LoadPolymorphicTreeAsync(IRedbObject rootObj, IRedbUser user, int? maxDepth = null)

LoadPolymorphicTreeWithUserAsync(long, int, long?, bool)

protected virtual Task<ITreeRedbObject> LoadPolymorphicTreeWithUserAsync(long rootId, int maxDepth = 10, long? userId = null, bool checkPermissions = false)

LoadTreeAsync<TProps>(IRedbObject, int?)

Load tree/subtree (uses _securityContext and config.DefaultCheckPermissionsOnLoad).

public Task<TreeRedbObject<TProps>> LoadTreeAsync<TProps>(IRedbObject rootObj, int? maxDepth = null) where TProps : class, new()

LoadTreeAsync<TProps>(IRedbObject, IRedbUser, int?)

Load tree/subtree with explicit user (uses config.DefaultCheckPermissionsOnLoad).

public Task<TreeRedbObject<TProps>> LoadTreeAsync<TProps>(IRedbObject rootObj, IRedbUser user, int? maxDepth = null) where TProps : class, new()

LoadTreeAsync<TProps>(long, int?)

Load tree by root object ID (uses _securityContext).

public Task<TreeRedbObject<TProps>> LoadTreeAsync<TProps>(long rootObjectId, int? maxDepth = null) where TProps : class, new()

LoadTreeAsync<TProps>(long, IRedbUser, int?)

Load tree by root object ID with explicit user.

public Task<TreeRedbObject<TProps>> LoadTreeAsync<TProps>(long rootObjectId, IRedbUser user, int? maxDepth = null) where TProps : class, new()

LoadTreeWithUserAsync<TProps>(long, int, long?, bool)

protected virtual Task<TreeRedbObject<TProps>> LoadTreeWithUserAsync<TProps>(long rootId, int maxDepth = 10, long? userId = null, bool checkPermissions = false) where TProps : class, new()

MoveObjectAsync(IRedbObject, IRedbObject?, IRedbUser)

Move object in tree with explicit user (uses config.DefaultCheckPermissionsOnSave).

public Task MoveObjectAsync(IRedbObject obj, IRedbObject? newParentObj, IRedbUser user)

MoveObjectAsync(IRedbObject, IRedbObject?)

Move object in tree (uses _securityContext and config.DefaultCheckPermissionsOnSave).

public Task MoveObjectAsync(IRedbObject obj, IRedbObject? newParentObj)

MoveObjectWithUserAsync(long, long?, long, bool)

protected virtual Task MoveObjectWithUserAsync(long objectId, long? newParentId, long userId, bool checkPermissions = true)

Constructors