|
ORE Studio 0.0.4
|
Shared cache for change reasons used across all entity dialogs. More...
#include <ChangeReasonCache.hpp>
Inherits QObject.

Public Member Functions | |
| ChangeReasonCache (ClientManager *clientManager, QObject *parent=nullptr) | |
| void | loadAll () |
| Load all change reasons and categories from the server. | |
| bool | isLoaded () const |
| Check if reasons have been loaded. | |
| bool | isLoading () const |
| Check if loading is in progress. | |
| const std::vector< dq::domain::change_reason > & | allReasons () const |
| Get all change reasons. | |
| std::vector< dq::domain::change_reason > | getReasonsForAmend (const std::string &category_code) const |
| Get change reasons filtered for amend operations. | |
| std::vector< dq::domain::change_reason > | getReasonsForDelete (const std::string &category_code) const |
| Get change reasons filtered for delete operations. | |
| const dq::domain::change_reason * | getReasonByCode (const std::string &code) const |
| Get a reason by its code. | |
| bool | isValidReasonCode (const std::string &code) const |
| Check if a reason code is valid. | |
| const std::vector< dq::domain::change_reason_category > & | allCategories () const |
| Get all change reason categories. | |
Shared cache for change reasons used across all entity dialogs.
This class manages fetching and caching of change reasons from the server. It listens for change_reason_changed events to automatically refresh the cache when reasons are modified.
Typical usage:
| void loadAll | ( | ) |
Load all change reasons and categories from the server.
This should be called after successful connection. The cache will automatically refresh when change_reason_changed events are received.
| std::vector< dq::domain::change_reason > getReasonsForAmend | ( | const std::string & | category_code | ) | const |
Get change reasons filtered for amend operations.
| category_code | Filter by category (e.g., "common") |
| std::vector< dq::domain::change_reason > getReasonsForDelete | ( | const std::string & | category_code | ) | const |
Get change reasons filtered for delete operations.
| category_code | Filter by category (e.g., "common") |
| const dq::domain::change_reason * getReasonByCode | ( | const std::string & | code | ) | const |
Get a reason by its code.
| code | The reason code (e.g., "common.rectification") |
| bool isValidReasonCode | ( | const std::string & | code | ) | const |
Check if a reason code is valid.
| code | The reason code to validate |