クラス AuditEvent

java.lang.ObjectSE
org.springframework.boot.actuate.audit.AuditEvent
実装されたすべてのインターフェース:
SerializableSE

public class AuditEvent extends ObjectSE implements SerializableSE
監査イベントを表す値オブジェクト: 特定の時間に、特定のユーザーまたはエージェントが特定の型のアクションを実行しました。このオブジェクトは、そのようなイベントの詳細を記録します。

ユーザーは AuditEventRepository を挿入して独自のイベントを公開するか、Spring の ApplicationEventPublisher(通常は ApplicationEventPublisherAware を実装することで取得)を使用して AuditApplicationEvents(AuditEvent のラッパー)を公開できます。

導入:
1.0.0
作成者:
Dave Syer
関連事項:
  • コンストラクターの詳細

    • AuditEvent

      public AuditEvent(StringSE principal, StringSE type, MapSE<StringSE,ObjectSE> data)
      現在の時間の新しい監査イベントを作成します。
      パラメーター:
      principal - 責任のあるユーザープリンシパル
      type - イベント型
      data - イベントデータ
    • AuditEvent

      public AuditEvent(StringSE principal, StringSE type, StringSE... data)
      名前と値のペアとして提供されたデータから、現在の時間の新しい監査イベントを作成します。
      パラメーター:
      principal - 責任のあるユーザープリンシパル
      type - イベント型
      data - "key = value" または単に "key" の形式のイベントデータ
    • AuditEvent

      public AuditEvent(InstantSE timestamp, StringSE principal, StringSE type, MapSE<StringSE,ObjectSE> data)
      新しい監査イベントを作成します。
      パラメーター:
      timestamp - イベントの日時
      principal - 責任のあるユーザープリンシパル
      type - イベント型
      data - イベントデータ
  • メソッドの詳細

    • getTimestamp

      public InstantSE getTimestamp()
      イベントが記録された日付 / 時刻を返します。
      戻り値:
      タイムスタンプ
    • getPrincipal

      public StringSE getPrincipal()
      イベントを担当するユーザープリンシパルを返します。プリンシパルが利用できない場合は空の文字列を返します。
      戻り値:
      校長
    • getType

      public StringSE getType()
      イベントの型を返します。
      戻り値:
      イベント型
    • getData

      public MapSE<StringSE,ObjectSE> getData()
      イベントデータを返します。
      戻り値:
      イベントデータ
    • toString

      public StringSE toString()
      オーバーライド:
      クラス ObjectSEtoString