Annotation Interface Auditable


@Documented @Inherited @Retention(RUNTIME) @Target(TYPE) public @interface Auditable
Annotation for events that should be audited by the system.

Annotated actions are audited by being added to the audit log, database and potentially other consumers.

This annotation only affects types used as arguments in EventPublisher.publish(java.lang.Object). An example usage would be creating a domain event which extends ApplicationEvent for a specific action and annotating the event with Auditable to audit the action.

Since:
7.0
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The I18n key of the category for the audited event.
    A converter for converting the annotated event to an AuditEvent.
    com.atlassian.audit.entity.CoverageLevel
    The coverage level for the audited event.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The I18n key of the action for the audited event.
  • Element Details

    • category

      String category
      The I18n key of the category for the audited event. If this key is not defined in I18n properties, it is directly used without translation.

      AuditCategory is a collection of system defined categories. It is recommended to use one of these categories where possible.

      Returns:
      the category
      See Also:
    • converter

      Class<? extends AuditEventConverter<?>> converter
      A converter for converting the annotated event to an AuditEvent.
      Returns:
      a converter to extract the details of the event to be audited
    • coverageLevel

      com.atlassian.audit.entity.CoverageLevel coverageLevel
      The coverage level for the audited event.
      Returns:
      the coverage level
      See Also:
      • CoverageLevel
    • action

      String action
      The I18n key of the action for the audited event. If this key is not defined in I18n properties, it is directly used without translation. If this value is not provided, the name of the annotated class is used as the action for the audit event.
      Returns:
      the action
      Since:
      7.4
      Default:
      ""