类 AuditEvent

  • 所有已实现的接口:
    Serializable

    public class AuditEvent
    extends Object
    implements Serializable
    A value object representing an audit event: at a particular time, a particular user or agent carried out an action of a particular type. This object records the details of such an event.

    Users can inject a AuditEventRepository to publish their own events or alternatively use Spring's ApplicationEventPublisher (usually obtained by implementing ApplicationEventPublisherAware) to publish AuditApplicationEvents (wrappers for AuditEvent).

    另请参阅:
    AuditEventRepository, 序列化表格
    • 构造器详细资料

      • AuditEvent

        public AuditEvent​(String principal,
                          String type,
                          Map<String,​Object> data)
        Create a new audit event for the current time.
        参数:
        principal - The user principal responsible
        type - the event type
        data - The event data
      • AuditEvent

        public AuditEvent​(String principal,
                          String type,
                          String... data)
        Create a new audit event for the current time from data provided as name-value pairs.
        参数:
        principal - The user principal responsible
        type - the event type
        data - The event data in the form 'key=value' or simply 'key'
      • AuditEvent

        public AuditEvent​(Date timestamp,
                          String principal,
                          String type,
                          Map<String,​Object> data)
        Create a new audit event.
        参数:
        timestamp - The date/time of the event
        principal - The user principal responsible
        type - the event type
        data - The event data