Class TableauServerConnectionUrlFlowTransformer
Default JSON transformer that updates server URL, site URL, and project LUID in flow JSON: output steps (serverUrl, projectLuid on node), input steps (server, siteUrlName in connectionAttributes). Replaces only when the current value matches the source (copyFlows-style).
Inheritance
Implements
Namespace: Tableau.Migration.Engine.Hooks.Transformers.Default
Assembly: Tableau.Migration.dll
Syntax
public class TableauServerConnectionUrlFlowTransformer : JsonContentTransformerBase<IPublishableFlow>, IJsonContentTransformer<IPublishableFlow>, IContentTransformer<IPublishableFlow>, IMigrationHook<IPublishableFlow>
Constructors
TableauServerConnectionUrlFlowTransformer(IMigration, IDestinationContentReferenceFinderFactory, ILogger<TableauServerConnectionUrlFlowTransformer>)
Creates a new TableauServerConnectionUrlFlowTransformer instance.
Declaration
public TableauServerConnectionUrlFlowTransformer(IMigration migration, IDestinationContentReferenceFinderFactory destinationFinderFactory, ILogger<TableauServerConnectionUrlFlowTransformer> logger)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigration | migration | The current migration. |
| IDestinationContentReferenceFinderFactory | destinationFinderFactory | Factory to create destination content finders. |
| ILogger<TableauServerConnectionUrlFlowTransformer> | logger | Logger. |
Methods
NeedsJsonTransforming(IPublishableFlow)
Finds whether the content item needs any JSON changes, returning false prevents file IO from occurring.
Declaration
protected override bool NeedsJsonTransforming(IPublishableFlow ctx)
Parameters
| Type | Name | Description |
|---|---|---|
| IPublishableFlow | ctx | The content item to inspect. |
Returns
| Type | Description |
|---|---|
| bool | Whether or not the content item needs JSON changes. |
Overrides
TransformAsync(IPublishableFlow, JsonNode, CancellationToken)
Transforms the JSON of the content item.
Declaration
public override Task TransformAsync(IPublishableFlow ctx, JsonNode json, CancellationToken cancel)
Parameters
| Type | Name | Description |
|---|---|---|
| IPublishableFlow | ctx | The content item being transformed. |
| JsonNode | json | The mutable JSON of the content item to transform. Any changes made to the JSON are persisted back to the file before publishing. |
| CancellationToken | cancel | The cancellation token to obey. |
Returns
| Type | Description |
|---|---|
| Task | A task to await. |