Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to interfaces #195

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
19 changes: 19 additions & 0 deletions businessCentral/app/src/ADLSE.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,23 @@ codeunit 82567 ADLSE
internal procedure OnTableExported(TableID: Integer; LastTimeStampExported: BigInteger)
begin
end;

internal procedure selectbc2adlsIntegrations(var AdlsIntegrations: Interface "ADLS Integrations")
var
ADLSESetup: Record "ADLSE Setup";
AzureIntegration: Codeunit "Azure Communication";
FabricLakehouseIntegration: Codeunit "Fabric Communication";
begin
//TODO: Make it extendible
ADLSESetup.GetSingleton();
case
ADLSESetup."Storage Type" of
ADLSESetup."Storage Type"::"Azure Data Lake":
AdlsIntegrations := AzureIntegration;
ADLSESetup."Storage Type"::"Microsoft Fabric":
AdlsIntegrations := FabricLakehouseIntegration;
else
Error('The storage type is not supported.');
end;
end;
}
31 changes: 31 additions & 0 deletions businessCentral/app/src/ADLSIntegrations.Interface.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
interface "ADLS Integrations"
{
/// <summary>
/// Get the base url of the external system
/// </summary>
procedure GetBaseUrl(): Text

/// <summary>
/// Checks if the setup of bc2adls is all correct
/// </summary>
procedure CheckSetup();

/// <summary>
/// Create a block blob in the external system
/// </summary>
procedure CreateBlockBlob(BlobPath: Text; ADLSECredentials: Codeunit "ADLSE Credentials"; LeaseID: Text; Body: Text; IsJson: Boolean)

Check warning on line 16 in businessCentral/app/src/ADLSIntegrations.Interface.al

View workflow job for this annotation

GitHub Actions / Build . (Default) / . (Default)

AL0749 The type 'ADLSECredentials' of the parameter 'ADLSE Credentials' of the public method 'CreateBlockBlob' has 'Internal' accessibility. The method will not be callable outside of this module without an implicit conversion.

/// <summary>
/// Resets the table inside the external system
/// </summary>
procedure ResetTableExport(ltableId: Integer);

procedure Init(TableIDValue: Integer; FieldIdListValue: List of [Integer]; LastFlushedTimeStampValue: BigInteger; EmitTelemetryValue: Boolean)

procedure CheckEntity(CdmDataFormat: Enum "ADLSE CDM Format"; var EntityJsonNeedsUpdate: Boolean; var ManifestJsonsNeedsUpdate: Boolean; SchemaUpdate: Boolean)

Check warning on line 25 in businessCentral/app/src/ADLSIntegrations.Interface.al

View workflow job for this annotation

GitHub Actions / Build . (Default) / . (Default)

AL0749 The type 'CdmDataFormat' of the parameter 'ADLSE CDM Format' of the public method 'CheckEntity' has 'Internal' accessibility. The method will not be callable outside of this module without an implicit conversion.

procedure CreateEntityContent()
procedure TryCollectAndSendRecord(RecordRef: RecordRef; RecordTimeStamp: BigInteger; var LastTimestampExported: BigInteger)
procedure TryFinish(var LastTimestampExported: BigInteger)
procedure UpdateCdmJsons(EntityJsonNeedsUpdate: Boolean; ManifestJsonsNeedsUpdate: Boolean)
}
Loading
Loading