Fórum

Does Liferay register user activity?

thumbnail
Alejandro Barrero, modificado 14 Anos atrás.

Does Liferay register user activity?

Junior Member Postagens: 77 Data de Entrada: 05/06/09 Postagens Recentes
I need to display reports of user activity; i.e., when an administrator adds a portlet to a page (who, what portlet, what page, date and time). Does Liferay keeps this types of logs or do I have to write my own code? I have examined the log4j logs and the information is not there.

Your help will be greatly appreciated,

Alejandro Barrero
thumbnail
Alejandro Barrero, modificado 14 Anos atrás.

RE: Does Liferay register user activity?

Junior Member Postagens: 77 Data de Entrada: 05/06/09 Postagens Recentes
On the other hand, if Liferay doesn´t have these facilities. please help me to find out where should I write my code.
thumbnail
Victor Zorin, modificado 14 Anos atrás.

RE: Does Liferay register user activity?

Liferay Legend Postagens: 1228 Data de Entrada: 14/04/08 Postagens Recentes
similar need in Auditing in Liferay thread.
thumbnail
Mika Koivisto, modificado 14 Anos atrás.

RE: Does Liferay register user activity?

Liferay Legend Postagens: 1519 Data de Entrada: 07/08/06 Postagens Recentes
Just to let you know that upcoming Liferay Portal 5.3 will have some auditing functionality that can be easily extended. Take a look at the documentation in Wiki. You can also test it out and contribute improvements and additional audit hooks.
thumbnail
Lisa Simpson, modificado 14 Anos atrás.

RE: Does Liferay register user activity?

Liferay Legend Postagens: 2034 Data de Entrada: 05/03/09 Postagens Recentes
There are a lot of us that have regulatory compliance to deal with. That means keep track of user activities is a legal requirement. It's not just something that our management poobahs have deemed is mandatory. Its something that has seriousl legal and financial consequences if we don't deal with it.

It's far better to put it in and let people turn it off if they don't need it than it is to leave it out.
thumbnail
Alejandro Barrero, modificado 14 Anos atrás.

RE: Does Liferay register user activity?

Junior Member Postagens: 77 Data de Entrada: 05/06/09 Postagens Recentes
I asked for help on this. I created an audit hook with the intention of recording user actions. The hook is for service preaction. It runs fine in NetBeans and it breaks inside the method run in the Action class. I am examining the request to determine the information that I need. So far i have been able to detect the user´s id and a few other things; If i am editing an article the parameter "_15_struts_action" has the value "/journal/edit_article" and the parameter "_15_article_Id" has the id of the article. This is some progress but I am still far away. The run method is executed for any action and I wish I could identify the action. I think I can find the name of the user but i don´t know how to get the information on the article. I need to know how to get the information of what the user is doing and with what.
Since I didn´t get help I decided to fudge a way to do it. I have to print the parameters for every action and determine subsets that identify each action. Then I have to read the tables in the database to find information. It is a drag.
Liferay does pass in the request the user id. Why cannot Liferay pass in the request parameters that identify what the user is doing and with what object?
LIFERAY SHOULD PROVIDE CLEAR INFORMATION FOR AUDITING. IT WOULD BE SO EASY.
thumbnail
Mika Koivisto, modificado 14 Anos atrás.

RE: Does Liferay register user activity?

Liferay Legend Postagens: 1519 Data de Entrada: 07/08/06 Postagens Recentes
ServicePreAction is wrong way to go on most cases since it handles ALL requests and getting the right information could be tricky. I would suggest using ModelListener as it is much more easier to determine the action being performed on the Model.
thumbnail
Alejandro Barrero, modificado 14 Anos atrás.

RE: Does Liferay register user activity?

Junior Member Postagens: 77 Data de Entrada: 05/06/09 Postagens Recentes
Thankyou very much Mika. I am going to try ModelListener .
thumbnail
Alejandro Barrero, modificado 14 Anos atrás.

RE: Does Liferay register user activity?

Junior Member Postagens: 77 Data de Entrada: 05/06/09 Postagens Recentes
Well, Netbeans doesn´t let me create ModelListener hooks, just login, logout and servelet service. That is seriusly bad because I need to debug in NetBeans. If anybody knows how to create a ModelListener hook in some IDE that runs with Liferay, please tell me.
thumbnail
Lisa Simpson, modificado 14 Anos atrás.

RE: Does Liferay register user activity?

Liferay Legend Postagens: 2034 Data de Entrada: 05/03/09 Postagens Recentes
From what I've seen, most of the Liferay devs use Eclipse.
thumbnail
Mika Koivisto, modificado 14 Anos atrás.

RE: Does Liferay register user activity?

Liferay Legend Postagens: 1519 Data de Entrada: 07/08/06 Postagens Recentes
You can create model listeners with any IDE. Just implement the ModelListener interface and set the value.object.listener.<model class name>=<your class name> property in portal.properties of your hook plugin or portal-ext.properties if you are using Ext SDK. You can use Liferay with any IDE but I think NetBeans + PortalPack is your best bet if you want some build-in wizards in the IDE.
thumbnail
Alejandro Barrero, modificado 14 Anos atrás.

RE: Does Liferay register user activity?

Junior Member Postagens: 77 Data de Entrada: 05/06/09 Postagens Recentes
Thanks again. What do I use for <model class name>?
thumbnail
Alejandro Barrero, modificado 14 Anos atrás.

RE: Does Liferay register user activity?

Junior Member Postagens: 77 Data de Entrada: 05/06/09 Postagens Recentes
Well, I did it with ServicePreAction in Netbeans and it works. I certainly want to do it with ModelListener, but I don´t know how to proceed.
I know that I have to create a class that implements ModelListener and I have to implement all its methods.
I know that I have to write in portal.properties something like modellistener=com.cgr.audit.AuditHookAction (for ServicePreAction NetBeans created servlet.service.events.pre=com.cgr.audit.AuditHookAction). I don´t know exactly how to do it.
I understand that I have specify the type of model blog, document, etc. but I don´t know how to do it.
The problem is that NetBeans 6.7 doesn´t give me the option to create a ModelListener hook.

I would appreciate any help.
Baris Sener, modificado 14 Anos atrás.

RE: Does Liferay register user activity?

Expert Postagens: 278 Data de Entrada: 23/06/09 Postagens Recentes
I couldn't locate the audit portlet or any of the audit hooks on the svn page, can you help?
thumbnail
Alejandro Barrero, modificado 14 Anos atrás.

RE: Does Liferay register user activity?

Junior Member Postagens: 77 Data de Entrada: 05/06/09 Postagens Recentes
I am afraid I don´t know what portlet are you refering to. The audit hook is something that I am creating myself.
thumbnail
Mika Koivisto, modificado 14 Anos atrás.

RE: Does Liferay register user activity?

Liferay Legend Postagens: 1519 Data de Entrada: 07/08/06 Postagens Recentes
svn://svn.liferay.com/public/repos/plugins/incubation/hooks/audit-hook
svn://svn.liferay.com/public/repos/plugins/incubation/portlets/audit-portlet