Interface ITreeProvider
Provider for tree structure operations.
Permission checks managed centrally via configuration (similar to IObjectStorageProvider).
public interface ITreeProvider
Methods
CreateChildAsync<TProps>(TreeRedbObject<TProps>, IRedbObject, IRedbUser)
Create child object with explicit user (uses config.DefaultCheckPermissionsOnSave).
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).
Task<long> CreateChildAsync<TProps>(TreeRedbObject<TProps> obj, IRedbObject parentObj) where TProps : class, new()
DeleteSubtreeAsync(IRedbObject, IRedbUser)
Delete object subtree recursively with explicit user (uses config.DefaultCheckPermissionsOnDelete).
Task<int> DeleteSubtreeAsync(IRedbObject parentObj, IRedbUser user)
DeleteSubtreeAsync(IRedbObject)
Delete object subtree recursively (uses _securityContext and config.DefaultCheckPermissionsOnDelete).
Task<int> DeleteSubtreeAsync(IRedbObject parentObj)
GetChildrenAsync<TProps>(IRedbObject, IRedbUser)
Get direct children of object with explicit user (uses config.DefaultCheckPermissionsOnLoad).
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).
Task<IEnumerable<TreeRedbObject<TProps>>> GetChildrenAsync<TProps>(IRedbObject parentObj) where TProps : class, new()
GetDescendantsAsync<TProps>(IRedbObject, int?)
Get all object descendants (uses _securityContext and config.DefaultCheckPermissionsOnLoad).
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).
Task<IEnumerable<TreeRedbObject<TProps>>> GetDescendantsAsync<TProps>(IRedbObject parentObj, IRedbUser user, int? maxDepth = null) where TProps : class, new()
GetPathToRootAsync<TProps>(IRedbObject, IRedbUser)
Get path from object to root with explicit user (uses config.DefaultCheckPermissionsOnLoad).
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).
Task<IEnumerable<TreeRedbObject<TProps>>> GetPathToRootAsync<TProps>(IRedbObject obj) where TProps : class, new()
GetPolymorphicChildrenAsync(IRedbObject, IRedbUser)
Get all direct children of object regardless of their schemes with explicit user.
Task<IEnumerable<ITreeRedbObject>> GetPolymorphicChildrenAsync(IRedbObject parentObj, IRedbUser user)
GetPolymorphicChildrenAsync(IRedbObject)
Get all direct children of object regardless of their schemes.
Task<IEnumerable<ITreeRedbObject>> GetPolymorphicChildrenAsync(IRedbObject parentObj)
GetPolymorphicDescendantsAsync(IRedbObject, int?)
Get all polymorphic descendants of object regardless of their schemes.
Task<IEnumerable<ITreeRedbObject>> GetPolymorphicDescendantsAsync(IRedbObject parentObj, int? maxDepth = null)
GetPolymorphicDescendantsAsync(IRedbObject, IRedbUser, int?)
Get all polymorphic descendants of object with explicit user.
Task<IEnumerable<ITreeRedbObject>> GetPolymorphicDescendantsAsync(IRedbObject parentObj, IRedbUser user, int? maxDepth = null)
GetPolymorphicPathToRootAsync(IRedbObject, IRedbUser)
Get polymorphic path from object to root with explicit user.
Task<IEnumerable<ITreeRedbObject>> GetPolymorphicPathToRootAsync(IRedbObject obj, IRedbUser user)
GetPolymorphicPathToRootAsync(IRedbObject)
Get polymorphic path from object to root - objects can be of different schemes.
Task<IEnumerable<ITreeRedbObject>> GetPolymorphicPathToRootAsync(IRedbObject obj)
InitializeTypeRegistryAsync()
Initialize AutomaticTypeRegistry for polymorphic operation support.
Task InitializeTypeRegistryAsync()
LoadPolymorphicTreeAsync(IRedbObject, int?)
Load polymorphic tree/subtree - supports objects of different schemes in one tree.
Task<ITreeRedbObject> LoadPolymorphicTreeAsync(IRedbObject rootObj, int? maxDepth = null)
LoadPolymorphicTreeAsync(IRedbObject, IRedbUser, int?)
Load polymorphic tree/subtree with explicit user.
Task<ITreeRedbObject> LoadPolymorphicTreeAsync(IRedbObject rootObj, IRedbUser user, int? maxDepth = null)
LoadTreeAsync<TProps>(IRedbObject, int?)
Load tree/subtree (uses _securityContext and config.DefaultCheckPermissionsOnLoad).
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).
Task<TreeRedbObject<TProps>> LoadTreeAsync<TProps>(IRedbObject rootObj, IRedbUser user, int? maxDepth = null) where TProps : class, new()
LoadTreeAsync<TProps>(long, int?)
Load tree/subtree by root object ID (uses _securityContext and config.DefaultCheckPermissionsOnLoad).
Task<TreeRedbObject<TProps>> LoadTreeAsync<TProps>(long rootObjectId, int? maxDepth = null) where TProps : class, new()
LoadTreeAsync<TProps>(long, IRedbUser, int?)
Load tree/subtree by root object ID with explicit user (uses config.DefaultCheckPermissionsOnLoad).
Task<TreeRedbObject<TProps>> LoadTreeAsync<TProps>(long rootObjectId, IRedbUser user, int? maxDepth = null) where TProps : class, new()
MoveObjectAsync(IRedbObject, IRedbObject?, IRedbUser)
Move object in tree with explicit user (uses config.DefaultCheckPermissionsOnSave).
Task MoveObjectAsync(IRedbObject obj, IRedbObject? newParentObj, IRedbUser user)
MoveObjectAsync(IRedbObject, IRedbObject?)
Move object in tree (uses _securityContext and config.DefaultCheckPermissionsOnSave).
Task MoveObjectAsync(IRedbObject obj, IRedbObject? newParentObj)