[MAGNOLIA-2705] Include item type information for create,delete,modify operations in audit trace Created: 28/Apr/09  Updated: 23/Jan/13  Resolved: 13/May/09

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: 4.1

Type: Improvement Priority: Major
Reporter: Jan Haderka Assignee: Jan Haderka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

Currently when using auditing, it is not possible to find out whether deleted node have been page or paragraph. Since the node is deleted, it is not possible to retrieve additional information about it later. Including the item type in audit record for deleted nodes would make it possible to figure out what the deleted node was.



 Comments   
Comment by Jan Haderka [ 28/Apr/09 ]

Done as of r24549.

Comment by Magnolia International [ 29/Apr/09 ]

Reopening for review:

  • why put the new method at the bottom of the class instead of next to the ones it mimics ? (+javadoc of mimicked method not updated to reflect the fact its not used for deletions anymore)
  • why log the nodetype only for deletions and not for other operations ?
Comment by Jan Haderka [ 29/Apr/09 ]

* why put the new method at the bottom of the class instead of next to the ones it mimics ? (+javadoc of mimicked method not updated to reflect the fact its not used for deletions anymore)

Adding methods to the bottom just out of habit. Moved next to the others and updated Javadoc.

* why log the nodetype only for deletions and not for other operations ?

I believe it is spelled out in the issue description already: Since the node is deleted, it is not possible to retrieve additional information about it later. For all the other operations you have a chance to go and figure it out if you care, but not for deletions.

Comment by Magnolia International [ 29/Apr/09 ]

Aha ! Makes sense. But we could still log that for other operations too, for consistency sake?
(as a matter of fact, I'd rather even pass the node instance to the audit method instead, and let the implementation of what should be an interface decide what it wants to log)

Comment by Jan Haderka [ 29/Apr/09 ]

(as a matter of fact, I'd rather even pass the node instance to the audit method instead, and let the implementation of what should be an interface decide what it wants to log)

The AuditLoggingUtil is used directly and non negotiable, so no custom implementations can be injected here. AuditLoggingManager can be indeed replaced, so we can perhaps propagate node as far as there, but API change would be required since current logging API accepts only array of String.

    public void log(String action, String[] data)

In short I'm fine with updating all methods to contain node type info, but would prefer not to pass the node around unless there is justified need for that.

Comment by Jan Haderka [ 13/May/09 ]

Not provides ItemType info for create/update/delete/activate/deactivate ops.
The only omitted methods (i.e. without ItemType info) are copy and move since those are done using workspace ops and the node itself is not available at the copy/move time and retrieving it would add unnecessary overhead to the op.

Generated at Mon Feb 12 03:39:18 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.