Class AuditableActions

java.lang.Object
de.hybris.platform.audit.AuditableActions

public final class AuditableActions extends Object
Class allowing to log auditable actions in durable and tamper-proof way. The exact way of persisting actions is determined by the used handler.
  • Method Details

    • audit

      public static void audit(AuditableActions.Action action)
      Allows to audit immutable action passed as parameter
      Parameters:
      action - action to be audited
      Throws:
      NullPointerException - if action is null
    • audit

      public static void audit(AuditableActions.NamedActionBuilder builder)
      Allows to audit action created from passed builder. Each invocation of this method with the same parameter will create a new immutable action object
      Parameters:
      builder - action builder that will be created
      Throws:
      NullPointerException - if builder is null
      See Also:
    • action

      public static AuditableActions.Action action(String actionName)
      Creates a simple immutable auditable action with provided name, without any parameters
      Parameters:
      actionName - name of the action
      Returns:
      created immutable action
    • withName

      public static AuditableActions.NamedActionBuilder withName(String actionName)
      Creates an action builder with provided name. The builder will allow to add attributes, but the name will be unchangeable
      Parameters:
      actionName - name of the action that will be created from the builder
      Returns:
      created builder with action name already set
    • withAttribute

      public static AuditableActions.ActionBuilder withAttribute(String attribute, Object value)
      Creates an action builder with provided attribute already set. The builder will allow to add attributes and action name (action name will be required)
      Parameters:
      attribute - name of the attribute to be added
      value - value of the attribute to be added
      Returns:
      created builder with provided attribute already set
    • builder

      public static AuditableActions.ActionBuilder builder()
      Creates an action builder. The builder will allow to add attributes and action name (action name will be required)
      Returns:
      created builder