Interface IObjectStorageProvider
Provider for saving/loading objects in EAV storage.
Permission checks are managed centrally via configuration.
public interface IObjectStorageProvider
Methods
AddNewObjectsAsync<TProps>(IEnumerable<IRedbObject<TProps>>, IRedbUser)
BULK INSERT with explicit user: Create many new objects (does NOT check permissions).
Task<List<long>> AddNewObjectsAsync<TProps>(IEnumerable<IRedbObject<TProps>> objects, IRedbUser user) where TProps : class, new()
AddNewObjectsAsync<TProps>(IEnumerable<IRedbObject<TProps>>)
BULK INSERT: Create many new objects in one operation (does NOT check permissions).
Task<List<long>> AddNewObjectsAsync<TProps>(IEnumerable<IRedbObject<TProps>> objects) where TProps : class, new()
DeleteAsync(IEnumerable<IRedbObject>, IRedbUser)
Bulk delete objects by interface with explicit user (uses config.DefaultCheckPermissionsOnDelete).
Task<int> DeleteAsync(IEnumerable<IRedbObject> objects, IRedbUser user)
DeleteAsync(IEnumerable<IRedbObject>)
Bulk delete objects by interface (uses _securityContext and config.DefaultCheckPermissionsOnDelete).
Task<int> DeleteAsync(IEnumerable<IRedbObject> objects)
DeleteAsync(IEnumerable<long>, IRedbUser)
Bulk delete objects by ID with explicit user (uses config.DefaultCheckPermissionsOnDelete).
Task<int> DeleteAsync(IEnumerable<long> objectIds, IRedbUser user)
DeleteAsync(IEnumerable<long>)
Bulk delete objects by ID (uses _securityContext and config.DefaultCheckPermissionsOnDelete).
Task<int> DeleteAsync(IEnumerable<long> objectIds)
DeleteAsync(IRedbObject, IRedbUser)
Delete object with explicit user (uses config.DefaultCheckPermissionsOnDelete).
Task<bool> DeleteAsync(IRedbObject obj, IRedbUser user)
DeleteAsync(IRedbObject)
Delete object (uses _securityContext and config.DefaultCheckPermissionsOnDelete).
Task<bool> DeleteAsync(IRedbObject obj)
DeleteAsync(long, IRedbUser)
Delete object by ID with explicit user (uses config.DefaultCheckPermissionsOnDelete).
Task<bool> DeleteAsync(long objectId, IRedbUser user)
DeleteAsync(long)
Delete object by ID (uses _securityContext and config.DefaultCheckPermissionsOnDelete).
Task<bool> DeleteAsync(long objectId)
DeleteWithPurgeAsync(IEnumerable<long>, int, IProgress<PurgeProgress>?, CancellationToken, long?)
Delete objects with background purge and progress reporting.
Task DeleteWithPurgeAsync(IEnumerable<long> objectIds, int batchSize = 10, IProgress<PurgeProgress>? progress = null, CancellationToken cancellationToken = default, long? trashParentId = null)
GetDeletionProgressAsync(long)
Gets deletion progress for a specific trash container from database.
Task<PurgeProgress?> GetDeletionProgressAsync(long trashId)
GetOrphanedDeletionTasksAsync(int)
Gets orphaned deletion tasks for recovery at startup.
Task<List<OrphanedTask>> GetOrphanedDeletionTasksAsync(int timeoutMinutes = 30)
GetUserActiveDeletionsAsync(long)
Gets all active (pending/running) deletions for a user from database.
Task<List<PurgeProgress>> GetUserActiveDeletionsAsync(long userId)
LoadAsync(IEnumerable<long>, int, bool?)
Bulk polymorphic load of objects by ID (uses _securityContext and config.DefaultCheckPermissionsOnLoad).
Task<List<IRedbObject>> LoadAsync(IEnumerable<long> objectIds, int depth = 10, bool? lazyLoadProps = null)
LoadAsync(IEnumerable<long>, IRedbUser, int, bool?)
Bulk polymorphic load of objects by ID with explicit user (uses config.DefaultCheckPermissionsOnLoad).
Task<List<IRedbObject>> LoadAsync(IEnumerable<long> objectIds, IRedbUser user, int depth = 10, bool? lazyLoadProps = null)
LoadAsync<TProps>(IRedbObject, int, bool?)
Load object from EAV (uses _securityContext and config.DefaultCheckPermissionsOnLoad).
Task<RedbObject<TProps>?> LoadAsync<TProps>(IRedbObject obj, int depth = 10, bool? lazyLoadProps = null) where TProps : class, new()
LoadAsync<TProps>(IRedbObject, IRedbUser, int, bool?)
Load object from EAV with explicit user (uses config.DefaultCheckPermissionsOnLoad).
Task<RedbObject<TProps>?> LoadAsync<TProps>(IRedbObject obj, IRedbUser user, int depth = 10, bool? lazyLoadProps = null) where TProps : class, new()
LoadAsync<TProps>(long, int, bool?)
Load object from EAV by ID (uses _securityContext and config.DefaultCheckPermissionsOnLoad).
Task<RedbObject<TProps>?> LoadAsync<TProps>(long objectId, int depth = 10, bool? lazyLoadProps = null) where TProps : class, new()
LoadAsync<TProps>(long, IRedbUser, int, bool?)
Load object from EAV with explicit user by ID (uses config.DefaultCheckPermissionsOnLoad).
Task<RedbObject<TProps>?> LoadAsync<TProps>(long objectId, IRedbUser user, int depth = 10, bool? lazyLoadProps = null) where TProps : class, new()
LoadWithParentsAsync(IEnumerable<long>, int, bool?)
Bulk polymorphic load of objects by ID with parent chains (uses _securityContext).
Task<List<ITreeRedbObject>> LoadWithParentsAsync(IEnumerable<long> objectIds, int depth = 10, bool? lazyLoadProps = null)
LoadWithParentsAsync(IEnumerable<long>, IRedbUser, int, bool?)
Bulk polymorphic load of objects by ID with parent chains with explicit user.
Task<List<ITreeRedbObject>> LoadWithParentsAsync(IEnumerable<long> objectIds, IRedbUser user, int depth = 10, bool? lazyLoadProps = null)
LoadWithParentsAsync<TProps>(IEnumerable<long>, int, bool?)
Bulk load objects by ID with parent chains to root (uses _securityContext).
Task<List<TreeRedbObject<TProps>>> LoadWithParentsAsync<TProps>(IEnumerable<long> objectIds, int depth = 10, bool? lazyLoadProps = null) where TProps : class, new()
LoadWithParentsAsync<TProps>(IEnumerable<long>, IRedbUser, int, bool?)
Bulk load objects by ID with parent chains to root with explicit user.
Task<List<TreeRedbObject<TProps>>> LoadWithParentsAsync<TProps>(IEnumerable<long> objectIds, IRedbUser user, int depth = 10, bool? lazyLoadProps = null) where TProps : class, new()
LoadWithParentsAsync<TProps>(IRedbObject, int, bool?)
Load object from EAV with parent chain to root (uses _securityContext).
Task<TreeRedbObject<TProps>?> LoadWithParentsAsync<TProps>(IRedbObject obj, int depth = 10, bool? lazyLoadProps = null) where TProps : class, new()
LoadWithParentsAsync<TProps>(IRedbObject, IRedbUser, int, bool?)
Load object from EAV with parent chain to root with explicit user.
Task<TreeRedbObject<TProps>?> LoadWithParentsAsync<TProps>(IRedbObject obj, IRedbUser user, int depth = 10, bool? lazyLoadProps = null) where TProps : class, new()
LoadWithParentsAsync<TProps>(long, int, bool?)
Load object from EAV by ID with parent chain to root (uses _securityContext).
Task<TreeRedbObject<TProps>?> LoadWithParentsAsync<TProps>(long objectId, int depth = 10, bool? lazyLoadProps = null) where TProps : class, new()
LoadWithParentsAsync<TProps>(long, IRedbUser, int, bool?)
Load object from EAV by ID with parent chain to root with explicit user.
Task<TreeRedbObject<TProps>?> LoadWithParentsAsync<TProps>(long objectId, IRedbUser user, int depth = 10, bool? lazyLoadProps = null) where TProps : class, new()
PurgeTrashAsync(long, int, int, IProgress<PurgeProgress>?, CancellationToken)
Purge a trash container created by SoftDeleteAsync.
Task PurgeTrashAsync(long trashId, int totalCount, int batchSize = 10, IProgress<PurgeProgress>? progress = null, CancellationToken cancellationToken = default)
SaveAsync(IEnumerable<IRedbObject>, IRedbUser)
Bulk save of polymorphic objects with explicit user (uses config).
Task<List<long>> SaveAsync(IEnumerable<IRedbObject> objects, IRedbUser user)
SaveAsync(IEnumerable<IRedbObject>)
Bulk save of polymorphic objects (uses _securityContext and config).
Task<List<long>> SaveAsync(IEnumerable<IRedbObject> objects)
SaveAsync(IRedbObject, IRedbUser)
Save object to EAV with explicit user. Determines type internally.
Task<long> SaveAsync(IRedbObject obj, IRedbUser user)
SaveAsync(IRedbObject)
Save object to EAV (uses _securityContext and config.DefaultCheckPermissionsOnSave).
Task<long> SaveAsync(IRedbObject obj)
SaveAsync<TProps>(IRedbObject<TProps>, IRedbUser)
Save generic object to EAV with explicit user (uses config.DefaultCheckPermissionsOnSave).
Task<long> SaveAsync<TProps>(IRedbObject<TProps> obj, IRedbUser user) where TProps : class, new()
SaveAsync<TProps>(IRedbObject<TProps>)
Save generic object to EAV (uses _securityContext and config.DefaultCheckPermissionsOnSave).
Task<long> SaveAsync<TProps>(IRedbObject<TProps> obj) where TProps : class, new()
SoftDeleteAsync(IEnumerable<IRedbObject>, IRedbUser, long?)
Mark objects for soft-deletion with explicit user.
Task<DeletionMark> SoftDeleteAsync(IEnumerable<IRedbObject> objects, IRedbUser user, long? trashParentId = null)
SoftDeleteAsync(IEnumerable<IRedbObject>, long?)
Mark objects for soft-deletion (uses _securityContext).
Task<DeletionMark> SoftDeleteAsync(IEnumerable<IRedbObject> objects, long? trashParentId = null)
SoftDeleteAsync(IEnumerable<long>, IRedbUser, long?)
Mark objects for soft-deletion with explicit user.
Task<DeletionMark> SoftDeleteAsync(IEnumerable<long> objectIds, IRedbUser user, long? trashParentId = null)
SoftDeleteAsync(IEnumerable<long>, long?)
Mark objects for soft-deletion (uses _securityContext).
Task<DeletionMark> SoftDeleteAsync(IEnumerable<long> objectIds, long? trashParentId = null)
TryClaimOrphanedTaskAsync(long, int)
Atomically claim an orphaned task for processing.
Task<bool> TryClaimOrphanedTaskAsync(long trashId, int timeoutMinutes = 30)