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

abort_transaction()

Error

add_tag(tag_name: String, comment: String = "")

Error

begin_transaction()

bool

can_undo() const

Error

commit_transaction()

Error

remove_tag(tag_name: String)

Dictionary

remove_tag_result(tag_name: String)

Error

rename_tag(old_name: String, new_name: String)

Dictionary

rename_tag_result(old_name: String, new_name: String)

void

schedule_prune_removed_paths()

Error

undo_last_change()

Error

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.


bool can_undo() const ๐Ÿ”—

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.


Error undo_last_change() ๐Ÿ”—

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.