Package de.hybris.platform.audit
Class AuditableActions
java.lang.Object
de.hybris.platform.audit.AuditableActions
Class allowing to log auditable actions in durable and tamper-proof way. The exact way of persisting actions is determined by the
used handler.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final classImmutable class representing the auditable action.static final classAction builder that allows to set action's name and attributes via chain api calls.static final classAction builder that allows to set action's attributes via chain api calls. -
Method Summary
Modifier and TypeMethodDescriptionstatic AuditableActions.ActionCreates a simple immutable auditable action with provided name, without any parametersstatic voidaudit(AuditableActions.Action action) Allows to audit immutable action passed as parameterstatic voidaudit(AuditableActions.NamedActionBuilder builder) Allows to audit action created from passed builder.builder()Creates an action builder.withAttribute(String attribute, Object value) Creates an action builder with provided attribute already set.Creates an action builder with provided name.
-
Method Details
-
audit
Allows to audit immutable action passed as parameter- Parameters:
action- action to be audited- Throws:
NullPointerException- if action is null
-
audit
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
Creates a simple immutable auditable action with provided name, without any parameters- Parameters:
actionName- name of the action- Returns:
- created immutable action
-
withName
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
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 addedvalue- value of the attribute to be added- Returns:
- created builder with provided attribute already set
-
builder
Creates an action builder. The builder will allow to add attributes and action name (action name will be required)- Returns:
- created builder
-