[DOCU-728] Create feature page 'Using observation' Created: 20/Apr/16  Updated: 30/Sep/19  Resolved: 30/Sep/19

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Christoph Meier Assignee: Unassigned
Resolution: Done Votes: 0
Labels: outdated
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:

 Description   

With 5.4.6 we deprecate info.magnolia.cms.util.ObservationUtil - instead people should use info.magnolia.observation.WorkspaceEventListenerRegistration.
This is shortly mentioned on Release notes for Magnolia 5.4.6.
The dev ticket MAGNOLIA-6580 also asked to mention it in documentation.

There is a small section in DOCS which mentions the deprecated ObservationUtil - see Configurationmanagement # Observation, i also add a note there, but it is the wrong place to add examples.

Besides that there is the Observation module page, but since 5.4.6 release does not include the observation module, both things, the module and the utility classes (in main) are orthogonal.

We could create a page about observation mentioning both the module and the utility classes with a code example.

Is it correct to say?

  • Use the magnolia-module-observation to enable observation by configration
  • Use WorkspaceEventListenerRegistration to enable observation programmatically
    ¿


 Comments   
Comment by Christoph Meier [ 20/Apr/16 ]

Here is a rough recipe how to use the new class (provided by jsimak):

  • whole ObservationUtil was @deprecated
  • On the docu page: change ObservationUtil with info.magnolia.observation.WorkspaceEventListenerRegistration
    • Users should call info.magnolia.observation.WorkspaceEventListenerRegistration#observe to get a builder-like object called info.magnolia.observation.WorkspaceEventListenerRegistration.Registrar
    • They can set additional properties on the Registrar and once they have all set up they need to call info.magnolia.observation.WorkspaceEventListenerRegistration.Registrar#register method to register the EventListener
    • Register method will return info.magnolia.observation.WorkspaceEventListenerRegistration.Handle for unregistering event listener
    • Users should ALWAYS de-register their listeners with the info.magnolia.observation.WorkspaceEventListenerRegistration.Handle#unregister method to prevent memory leaks
Comment by Julie Legendre [ 30/Sep/19 ]

In order to better focus our efforts on DOCU tickets that are still relevant and important, all tickets older than 18 months have been labelled as outdated and are being automatically closed.
If you think your ticket is still relevant and should remain open, please add a comment and set it back to open.

Generated at Mon Feb 12 01:11:51 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.