40 virtual void setErrorReporter(std::shared_ptr<core::ports::diagnostics::IErrorReporter> reporter) = 0;
63 virtual void newFile(
const std::string& path) = 0;
68 virtual void openFile(
const std::string& path) = 0;
Declares the structured diagnostics reporting port.
Storage manager port used by application services.
Immutable workspace read-model snapshot exposed through workspace ports.
std::function< core::application::workspace::WorkspaceSessionState(const std::string &dbPath)> AtomicStoreLoad
std::function< core::domain::DeletionImpact(const std::string &dbPath, const core::application::workspace::WorkspaceSessionState &document)> AtomicStoreSave
Destroy the storage manager port.
Write-side workspace boundary for persistence, CRUD, drafts, and logs.
virtual std::string addProperty(const PropertyCommand &command)=0
Adds a property from a command.
virtual void updateStatement(const StatementCommand &command)=0
Updates a statement from a command.
virtual std::string addActor(const ActorCommand &command)=0
Adds an actor from a command.
virtual void setSnapshotChangedCallback(SnapshotChanged cb)=0
Registers callback invoked after state changes.
virtual void openFile(const std::string &path)=0
Opens existing workspace file from path.
virtual void saveExportLog(const ExportLogCommand &command)=0
Saves or updates one export log.
virtual void updateAnalysis(const AnalysisCommand &command)=0
Updates an analysis from a command.
virtual std::string addStatementWithTransactions(const StatementWithTransactionsCommand &command)=0
Adds a statement and its transactions as one workspace mutation.
virtual void deleteAnalysis(const std::string &id)=0
Deletes an analysis by identifier.
virtual void notifySnapshot()=0
Publishes the current snapshot without persistence changes.
virtual void clearStatementDraft(const std::string &draftId={})=0
Clears one draft by id or all drafts when id is empty.
virtual ValidationResult validateProperty(const PropertyCommand &command) const =0
Validates a property command without mutating workspace state.
virtual void commit()=0
Commits in-memory state to persistence and publishes snapshot.
virtual void deleteContract(const std::string &id)=0
Deletes a contract by identifier.
virtual ValidationResult validateTransaction(const TransactionCommand &command) const =0
Validates a transaction command without mutating workspace state.
virtual std::string finalizeStatementDraft(const FinalizeStatementDraftCommand &command)=0
Finalizes a statement draft.
virtual void setAtomicStoreLoad(core::ports::storage::IStorageManager::AtomicStoreLoad loadFn)=0
Registers atomic persistence load callback.
virtual std::string addContract(const ContractCommand &command)=0
Adds a contract from a command.
virtual std::string addStatement(const StatementCommand &command)=0
Adds a statement from a command.
virtual void setErrorReporter(std::shared_ptr< core::ports::diagnostics::IErrorReporter > reporter)=0
Registers application error reporter used by workspace operations.
virtual void deleteExportLog(const std::string &id)=0
Deletes one export log by identifier.
virtual void deleteTransaction(const std::string &id)=0
Deletes a transaction by identifier.
virtual void saveImportLog(const ImportLogCommand &command)=0
Saves or updates one import log.
virtual ValidationResult validateContract(const ContractCommand &command) const =0
Validates a contract command without mutating workspace state.
virtual void updateProperty(const PropertyCommand &command)=0
Updates a property from a command.
virtual void saveStatementDraft(const StatementDraftCommand &command)=0
Saves or updates a statement draft from a command.
virtual void saveFileAs(const std::string &path)=0
Saves workspace to specified path.
virtual void deleteProperty(const std::string &id)=0
Deletes a property by identifier.
virtual void newFile(const std::string &path)=0
Creates a new workspace file at path.
virtual ~IWorkspaceWriter()=default
Destroys the workspace writer port.
virtual void deleteImportLog(const std::string &id)=0
Deletes one import log by identifier.
std::function< void(const DeletionImpact &)> DeletionImpactCallback
std::function< void(const WorkspaceSnapshot &)> SnapshotChanged
virtual ValidationResult validateActor(const ActorCommand &command) const =0
Validates an actor command without mutating workspace state.
virtual ValidationResult validateAnalysis(const AnalysisCommand &command) const =0
Validates an analysis command without mutating workspace state.
virtual void setAtomicStoreSave(core::ports::storage::IStorageManager::AtomicStoreSave saveFn)=0
Registers atomic persistence save callback.
virtual std::string addTransaction(const TransactionCommand &command)=0
Adds a transaction from a command.
virtual void deleteStatement(const std::string &id)=0
Deletes a statement by identifier.
virtual void updateAnnual(const AnnualCommand &command)=0
Updates an annual aggregate from a command.
virtual ValidationResult validateStatement(const StatementCommand &command) const =0
Validates a statement command without mutating workspace state.
virtual void updateContract(const ContractCommand &command)=0
Updates a contract from a command.
virtual std::string addAnnual(const AnnualCommand &command)=0
Adds an annual aggregate from a command.
virtual void setDeletionImpactCallback(DeletionImpactCallback cb)=0
Registers deletion impact callback invoked after save operations.
virtual ValidationResult validateStatementWithTransactions(const StatementWithTransactionsCommand &command) const =0
Validates a statement batch command without mutating workspace state.
virtual void deleteActor(const std::string &id)=0
Deletes an actor by identifier.
virtual void openLatest()=0
Opens latest known workspace file.
virtual std::string addAnalysis(const AnalysisCommand &command)=0
Adds an analysis from a command.
virtual ValidationResult validateAnnual(const AnnualCommand &command) const =0
Validates an annual command without mutating workspace state.
virtual void saveFile()=0
Saves workspace to current path.
virtual void updateActor(const ActorCommand &command)=0
Updates an actor from a command.
virtual void updateTransaction(const TransactionCommand &command)=0
Updates a transaction from a command.
virtual void deleteAnnual(const std::string &id)=0
Deletes an annual aggregate by identifier.
Write-side boundary command models for workspace operations.
Creates a statement together with its initial transactions.