Hi,
I was little bit busy this week with University just started for us. And I
am having 3 days holiday from tomorrow. Therefore, I thought I use that time
to fix JIRA issue on my work.
Steps Revised
1. Create a LoginListener class that implements EventListener
can I use the package org.xwiki.observation.event to add this class ?
2. I do not need to create any DefaultObservationManager instance.
components.xml file is defined with DefaultObservationManager
implementation.
I get reference to it by calling (Step 5) when ever nececary
ObservationManager om = (ObservationManager)
Utils.getComponent(ObservationManager.class);
3. Define class UserLoginEvent similar to DocumentSaveEvent
in package org.xwiki.observation.event
*[TODO]*
4. Need to find the place where I call the addListener() of
ObservationManager with parameters - object of UserLoginEvent and reference
to login listener. I think when user initiated login I need to add the
listener. I looked at LoginAction class, but could not figure out a way.
6. Need to find when to call notify() of DefaultObjectManager instance when
user successfully logged in
7. Implement notify() in LoginListener
I think I need to get familiar with com.xpn.xwiki.web package to learn how
to do steps 4 and 6. If anyone could point me some points to look for it
would be really helpful.
Kind regards,
Tharindu