FOSSredder 0.5.0
Loading...
Searching...
No Matches
IWorkspaceReader.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include <optional>
9#include <string>
10#include <vector>
11
13
15
17public:
18 virtual ~IWorkspaceReader() = default;
19
21 [[nodiscard]] virtual WorkspaceSnapshot workspaceSnapshot() const = 0;
22
24 [[nodiscard]] virtual std::string currentPath() const = 0;
25
31 [[nodiscard]] virtual std::optional<StatementDraftSnapshot> statementDraftSnapshot(const std::string& draftId = {}) const = 0;
32
34 [[nodiscard]] virtual WorkspaceIdentitySnapshot actorIdentityByName(const std::string& name) const = 0;
35
37 [[nodiscard]] virtual WorkspaceIdentitySnapshot propertyIdentityByName(const std::string& name) const = 0;
38
41 const std::string& name,
42 const std::string& type,
43 const std::vector<std::string>& actorIds,
44 const std::vector<std::string>& propertyIds) const = 0;
45
52 const TransactionCatalogSelectionChange& change) const = 0;
53
55 [[nodiscard]] virtual std::string nextContractName() const = 0;
56};
57
58} // namespace core::ports::workspace
Immutable workspace read-model snapshot exposed through workspace ports.
virtual WorkspaceIdentitySnapshot actorIdentityByName(const std::string &name) const =0
Finds an actor identity by display name.
virtual TransactionCatalogSelection transactionCatalogSelection(const TransactionCatalogSelectionChange &change) const =0
Applies catalog consistency rules to a transaction form selection.
virtual std::optional< StatementDraftSnapshot > statementDraftSnapshot(const std::string &draftId={}) const =0
Returns one statement draft snapshot.
virtual WorkspaceSnapshot workspaceSnapshot() const =0
Returns the full immutable workspace snapshot.
virtual std::string nextContractName() const =0
Returns the next generated contract name.
virtual WorkspaceIdentitySnapshot contractIdentityBySignature(const std::string &name, const std::string &type, const std::vector< std::string > &actorIds, const std::vector< std::string > &propertyIds) const =0
Finds a contract identity by name, type, actor ids, and property ids.
virtual WorkspaceIdentitySnapshot propertyIdentityByName(const std::string &name) const =0
Finds a property identity by display name.
virtual std::string currentPath() const =0
Returns the current workspace path, or an empty string when none is open.
Catalog selection change request for transaction forms.
Transaction catalog ids selected by a UI form or workspace query.