カスタムストレージプロバイダーとプロファイル

Version:
日本語翻訳に関する免責事項

このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。

xConnect Data Export Toolを使ってカスタムストレージプロバイダーやプロファイルを作成できます。カスタムプロバイダーを使って、Sitecoreがデフォルトで含んでいないNASやクラウドプロバイダーなどのストレージ環境にデータをエクスポートします。

カスタムセットを作成するには:

  1. Visual Studioで新しいプロジェクトを作成します。 IStorageProviderインターフェースを継承していることを確認してください。データファイルが意図されたストレージにどのように保存されるかのロジックを定義します。例えば:

    ///

    /// Defines an interface for data storage providers. /// All the new storage providers must be inherited from this interface. /// public interface IStorageProvider { /// /// Gets the profile names that linked to the storage provider. /// Profile is named set of specific provider properties, for instance /// path to specific folder, credentials to establish connection to the storage, etc. /// IReadOnlyCollection ProfileNames { get; } /// /// Uploads file with specified file name and content to the storage defined in /// the profile asynchronously. /// /// The file name. /// The file content. /// The profile name. /// The cancellation token. /// The task. Task UploadAsync(string fileName, string fileContent, string profileName, CancellationToken cancellationToken); }

  2. ストレージプロファイルを作成します。ストレージプロファイルは、プロファイル名プロパティのみを指定する必要があるIStorageProfileインターフェースを継承しなければなりません。例えば:

    internal interface IStorageProfile { string ProfileName { get; } }

  3. ストレージプロファイルで、ストレージプロバイダータイプに必要なプロパティを追加します。

  4. 新しいストレージプロバイダーとプロファイルを設定してください。

プロファイルはストレージプロバイダーに注入しなければならず、UploadAsyncメソッドは指定されたプロファイル名で適切なプロファイルを取得し、ストレージ設定を取得する役割を担っています。

この記事を改善するための提案がある場合は、 お知らせください!