AssetTagCoordinator๏
Inherits: Object
Coordinates dictionary and asset-index mutations for asset tags.
Description๏
AssetTagCoordinator wraps AssetTagRegistry batch transactions for rename/remove operations and exposes undo snapshots via undo_last_change().
Methods๏
void |
|
can_undo() const |
|
remove_tag(tag_name: String) |
|
remove_tag_result(tag_name: String) |
|
rename_tag(old_name: String, new_name: String) |
|
rename_tag_result(old_name: String, new_name: String) |
|
void |
|
update_tag_comment(tag_name: String, comment: String) |
Method Descriptions๏
void abort_transaction() ๐
Aborts the active registry batch.
Error add_tag(tag_name: String, comment: String = "") ๐
Adds tag_name to the tag dictionary inside a coordinated transaction. Returns @GlobalScope.OK on success, or an Error code if the manager/registry is unavailable or the add fails.
Error begin_transaction() ๐
Starts a coordinated registry batch and captures an undo snapshot.
Returns true when an undo snapshot is available.
Error commit_transaction() ๐
Commits the active registry batch.
Error remove_tag(tag_name: String) ๐
Removes tag_name from the dictionary and strips it from indexed assets. Returns @GlobalScope.OK on success, or an Error code from remove_tag_result().
Dictionary remove_tag_result(tag_name: String) ๐
Removes tag_name and returns a result dictionary with ok, optional error/error_code, and affected_assets on success.
Error rename_tag(old_name: String, new_name: String) ๐
Renames old_name to new_name in the dictionary and remaps indexed asset tags. Returns @GlobalScope.OK on success, or an Error code from rename_tag_result().
Dictionary rename_tag_result(old_name: String, new_name: String) ๐
Renames a tag and returns a result dictionary with ok, optional error/error_code, and affected_assets on success.
void schedule_prune_removed_paths() ๐
Schedules a debounced prune of index entries whose asset paths no longer exist.
Restores the last undo snapshot to disk and reloads manager/registry state.
Error update_tag_comment(tag_name: String, comment: String) ๐
Updates the comment for tag_name inside a coordinated transaction. Returns @GlobalScope.OK on success, or an Error code if the update fails.