クラス MappingVaultConverter

java.lang.ObjectSE
org.springframework.vault.repository.convert.AbstractVaultConverter
org.springframework.vault.repository.convert.MappingVaultConverter
実装されたすべてのインターフェース:
InitializingBeanEntityConverter<VaultPersistentEntity<?>,VaultPersistentProperty,ObjectSE,SecretDocument>EntityReader<ObjectSE,SecretDocument>EntityWriter<ObjectSE,SecretDocument>VaultConverter

public class MappingVaultConverter extends AbstractVaultConverter
MappingContext を使用して、ドメインオブジェクトの SecretDocument への高度なマッピングを行う VaultConverter。このコンバーターは、JSON ライブラリを使用せずに Map 型の表現とドメインオブジェクトを変換します。SecretDocument は、Vault とシークレットを交換するための JSON マッピングへの入力です。
導入:
2.0
作成者:
Mark Paluch
  • コンストラクターの詳細

  • メソッドの詳細

    • setTypeMapper

      public void setTypeMapper(VaultTypeMapper typeMapper)
      コンバーターによって作成された SecretDocument に型情報を追加するために使用される VaultTypeMapper と、読み取り時に SecretDocument から型情報を検索する方法を構成します。デフォルトで DefaultVaultTypeMapper を使用します。これを null に設定すると、TypeMapper がデフォルトのものにリセットされます。
      パラメーター:
      typeMapper - 設定する typeMapper は null であってはなりません。
    • getMappingContext

      public MappingContext<? extends VaultPersistentEntity<?>,VaultPersistentProperty> getMappingContext()
    • read

      public <S> S read(ClassSE<S> type, SecretDocument source)
    • readMap

      protected MapSE<ObjectSE,ObjectSE> readMap(TypeInformation<?> type, MapSE<StringSE,ObjectSE> sourceMap)
      指定された MapSEMapSE に読み込みます。ネストされた MapSE も再帰的に解決します。
      パラメーター:
      type - この MapSE の非整列化に使用される MapSE TypeInformation
      sourceMap - null であってはなりません
      戻り値:
      変換された MapSE
    • write

      public void write(ObjectSE source, SecretDocument sink)
    • writeInternal

      protected void writeInternal(ObjectSE obj, org.springframework.vault.repository.convert.SecretDocumentAccessor sink, @Nullable TypeInformation<?> typeHint)
      ネストされた呼び出しに使用する必要がある内部書き込み変換メソッド。
      パラメーター:
      obj -
      sink -
      typeHint -
    • writeInternal

      protected void writeInternal(ObjectSE obj, org.springframework.vault.repository.convert.SecretDocumentAccessor sink, VaultPersistentEntity<?> entity)
    • writePropertyInternal

      protected void writePropertyInternal(@Nullable ObjectSE obj, org.springframework.vault.repository.convert.SecretDocumentAccessor accessor, VaultPersistentProperty prop)
    • createCollection

      protected ListSE<ObjectSE> createCollection(CollectionSE<?> collection, VaultPersistentProperty property)
      指定された VaultPersistentProperty 情報を使用して、指定された CollectionSE を書き込みます。
      パラメーター:
      collection - null であってはなりません。
      property - null であってはなりません。
      戻り値:
      変換された ListSE
    • createMap

      protected MapSE<StringSE,ObjectSE> createMap(MapSE<ObjectSE,ObjectSE> map, VaultPersistentProperty property)
      指定された VaultPersistentProperty 情報を使用して、指定された MapSE を書き込みます。
      パラメーター:
      map - null であってはなりません。
      property - null であってはなりません。
      戻り値:
      変換された MapSE
    • writeMapInternal

      protected MapSE<StringSE,ObjectSE> writeMapInternal(MapSE<ObjectSE,ObjectSE> obj, MapSE<StringSE,ObjectSE> bson, TypeInformation<?> propertyType)
      指定された TypeInformation を考慮して、指定された MapSE を指定された MapSE に書き込みます。
      パラメーター:
      obj - null であってはなりません。
      bson - null であってはなりません。
      propertyType - null であってはなりません。
      戻り値:
      変換された MapSE
    • addCustomTypeKeyIfNecessary

      protected void addCustomTypeKeyIfNecessary(@Nullable TypeInformation<?> type, ObjectSE value, org.springframework.vault.repository.convert.SecretDocumentAccessor accessor)
      必要に応じて、特定の SecretDocument にカスタム型情報を追加します。つまり、値が与えられたものと同じでない場合です。これは通常、プロパティの実際に宣言された型のサブ型を格納する場合に当てはまります。
      パラメーター:
      type - 型ヒント。
      value - null であってはなりません。
      accessor - null であってはなりません。