Zum Hauptinhalt springen

IImportRtModelCommand

Namespace: Meshmakers.Octo.Runtime.Contracts.Exchange

Interface for importing a runtime model from a file.

public interface IImportRtModelCommand

Properties​

ArchiveColumnAdditions​

The columns the last import added to activated archives, in the order they were applied, with the outcome of each. Empty when the import added none.

public IReadOnlyList<RtImportArchiveColumnAddition> ArchiveColumnAdditions { get; }

Property Value​

IReadOnlyList<RtImportArchiveColumnAddition>

ArchiveFormulaChanges​

The formula changes of computed columns the last import queued on activated archives: the seed declared a formula that differs from the live one, and the change runs as a versioned change with backfill. Empty when the import changed no formula; a seed formula that equals the live one after normalisation is no change.

public IReadOnlyList<RtImportComputedFormulaChange> ArchiveFormulaChanges { get; }

Property Value​

IReadOnlyList<RtImportComputedFormulaChange>

BlueprintLockSummary​

What the blueprint-lock protection stripped or audited during IImportRtModelCommand.ImportAsCallerAsync(IRuntimeRepository, String, String, ImportStrategy, RtImportCallerContext, Nullable<CancellationToken>, RtImportBlankingPolicy, IReadOnlyCollection<RtImportBlankingConfirmation>). RtImportBlueprintLockSummary.Empty when nothing happened.

public abstract RtImportBlueprintLockSummary BlueprintLockSummary { get; }

Property Value​

RtImportBlueprintLockSummary

GuardEntries​

The attributes found blanked by seed values during this command's imports, kept or applied according to the policy. The command is transient, so this is the report of the import(s) run on this instance.

public abstract IReadOnlyList<RtImportGuardEntry> GuardEntries { get; }

Property Value​

IReadOnlyList<RtImportGuardEntry>

Methods​

ImportTextAsync(IRuntimeRepository, String, ImportStrategy, Nullable<CancellationToken>, RtImportBlankingPolicy, IReadOnlyCollection<RtImportBlankingConfirmation>)​

Imports as text

Task ImportTextAsync(IRuntimeRepository runtimeRepository, string jsonText, ImportStrategy importStrategy, Nullable<CancellationToken> cancellationToken, RtImportBlankingPolicy blankingPolicy, IReadOnlyCollection<RtImportBlankingConfirmation> confirmedBlankings)

Parameters​

runtimeRepository IRuntimeRepository
The runtime repository

jsonText String
Model as JSON text

importStrategy ImportStrategy
Defines the import strategy

cancellationToken Nullable<CancellationToken>
An optional cancellation token

blankingPolicy RtImportBlankingPolicy
What an Upsert does when a seed value would blank a non-empty value of an attribute the blueprint does not own. Default RtImportBlankingPolicy.Keep.

confirmedBlankings IReadOnlyCollection<RtImportBlankingConfirmation>
Entity/attribute pairs whose blanking is confirmed individually although blankingPolicy is RtImportBlankingPolicy.Keep.

Returns​

Task

ImportModelAsync(IRuntimeRepository, RtModelRootTcDto, ImportStrategy, Nullable<CancellationToken>, RtImportBlankingPolicy, IReadOnlyCollection<RtImportBlankingConfirmation>)​

Imports a model root

Task ImportModelAsync(IRuntimeRepository runtimeRepository, RtModelRootTcDto rtModelRootTc, ImportStrategy importStrategy, Nullable<CancellationToken> cancellationToken, RtImportBlankingPolicy blankingPolicy, IReadOnlyCollection<RtImportBlankingConfirmation> confirmedBlankings)

Parameters​

runtimeRepository IRuntimeRepository
The runtime repository

rtModelRootTc RtModelRootTcDto
The model root

importStrategy ImportStrategy
Defines the import strategy

cancellationToken Nullable<CancellationToken>
An optional cancellation token

blankingPolicy RtImportBlankingPolicy
What an Upsert does when a seed value would blank a non-empty value of an attribute the blueprint does not own. Default RtImportBlankingPolicy.Keep.

confirmedBlankings IReadOnlyCollection<RtImportBlankingConfirmation>
Entity/attribute pairs whose blanking is confirmed individually although blankingPolicy is RtImportBlankingPolicy.Keep.

Returns​

Task

ImportAsync(IRuntimeRepository, String, String, ImportStrategy, Nullable<CancellationToken>, RtImportBlankingPolicy, IReadOnlyCollection<RtImportBlankingConfirmation>)​

Imports from a file

Task ImportAsync(IRuntimeRepository runtimeRepository, string filePath, string contentType, ImportStrategy importStrategy, Nullable<CancellationToken> cancellationToken, RtImportBlankingPolicy blankingPolicy, IReadOnlyCollection<RtImportBlankingConfirmation> confirmedBlankings)

Parameters​

runtimeRepository IRuntimeRepository
The runtime repository

filePath String
A file path as ZIP (containing YAML or JSON), JSON or YAML files

contentType String
The content type of the file

importStrategy ImportStrategy
Defines the import strategy

cancellationToken Nullable<CancellationToken>
An optional cancellation token

blankingPolicy RtImportBlankingPolicy
What an Upsert does when a seed value would blank a non-empty value of an attribute the blueprint does not own. Default RtImportBlankingPolicy.Keep.

confirmedBlankings IReadOnlyCollection<RtImportBlankingConfirmation>
Entity/attribute pairs whose blanking is confirmed individually although blankingPolicy is RtImportBlankingPolicy.Keep.

Returns​

Task

ImportAsCallerAsync(IRuntimeRepository, String, String, ImportStrategy, RtImportCallerContext, Nullable<CancellationToken>, RtImportBlankingPolicy, IReadOnlyCollection<RtImportBlankingConfirmation>)​

Imports from a file on behalf of a user or client that initiated the import through an API route . The session stays the system session, so replace semantics, creator stamping and the preserve pass behave exactly as in IImportRtModelCommand.ImportAsync(IRuntimeRepository, String, String, ImportStrategy, Nullable<CancellationToken>, RtImportBlankingPolicy, IReadOnlyCollection<RtImportBlankingConfirmation>); in addition the blueprint-lock protection applies to CK types whose data policy opted in (ProtectBlueprintLocked): a preflight over the whole file fails the import atomically, before any write, when an entity that is locked by a blueprint would be overwritten (AuditOnly policies write and publish an audit event instead), and the blueprint bookkeeping attributes of the file are stripped. Tenants without an opted-in policy pay nothing. See IImportRtModelCommand.BlueprintLockSummary for the result.

Task ImportAsCallerAsync(IRuntimeRepository runtimeRepository, string filePath, string contentType, ImportStrategy importStrategy, RtImportCallerContext caller, Nullable<CancellationToken> cancellationToken, RtImportBlankingPolicy blankingPolicy, IReadOnlyCollection<RtImportBlankingConfirmation> confirmedBlankings)

Parameters​

runtimeRepository IRuntimeRepository
The runtime repository

filePath String
A file path as JSON or YAML file

contentType String
The content type of the file

importStrategy ImportStrategy
Defines the import strategy

caller RtImportCallerContext
The initiating caller; RtImportCallerContext.EnforceBlueprintLock decides

cancellationToken Nullable<CancellationToken>
An optional cancellation token

blankingPolicy RtImportBlankingPolicy
See IImportRtModelCommand.ImportAsync(IRuntimeRepository, String, String, ImportStrategy, Nullable<CancellationToken>, RtImportBlankingPolicy, IReadOnlyCollection<RtImportBlankingConfirmation>)

confirmedBlankings IReadOnlyCollection<RtImportBlankingConfirmation>
See IImportRtModelCommand.ImportAsync(IRuntimeRepository, String, String, ImportStrategy, Nullable<CancellationToken>, RtImportBlankingPolicy, IReadOnlyCollection<RtImportBlankingConfirmation>)

Returns​

Task