掲示板

Does Liferay register user activity?

thumbnail
14年前 に Alejandro Barrero によって更新されました。

Does Liferay register user activity?

Junior Member 投稿: 77 参加年月日: 09/06/05 最新の投稿
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
14年前 に Alejandro Barrero によって更新されました。

RE: Does Liferay register user activity?

Junior Member 投稿: 77 参加年月日: 09/06/05 最新の投稿
On the other hand, if Liferay doesn´t have these facilities. please help me to find out where should I write my code.
thumbnail
14年前 に Victor Zorin によって更新されました。

RE: Does Liferay register user activity?

Liferay Legend 投稿: 1228 参加年月日: 08/04/14 最新の投稿
similar need in Auditing in Liferay thread.
thumbnail
14年前 に Mika Koivisto によって更新されました。

RE: Does Liferay register user activity?

Liferay Legend 投稿: 1519 参加年月日: 06/08/07 最新の投稿
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
14年前 に Lisa Simpson によって更新されました。

RE: Does Liferay register user activity?

Liferay Legend 投稿: 2034 参加年月日: 09/03/05 最新の投稿
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
14年前 に Alejandro Barrero によって更新されました。

RE: Does Liferay register user activity?

Junior Member 投稿: 77 参加年月日: 09/06/05 最新の投稿
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
14年前 に Mika Koivisto によって更新されました。

RE: Does Liferay register user activity?

Liferay Legend 投稿: 1519 参加年月日: 06/08/07 最新の投稿
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
14年前 に Alejandro Barrero によって更新されました。

RE: Does Liferay register user activity?

Junior Member 投稿: 77 参加年月日: 09/06/05 最新の投稿
Thankyou very much Mika. I am going to try ModelListener .
thumbnail
14年前 に Alejandro Barrero によって更新されました。

RE: Does Liferay register user activity?

Junior Member 投稿: 77 参加年月日: 09/06/05 最新の投稿
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
14年前 に Lisa Simpson によって更新されました。

RE: Does Liferay register user activity?

Liferay Legend 投稿: 2034 参加年月日: 09/03/05 最新の投稿
From what I've seen, most of the Liferay devs use Eclipse.
thumbnail
14年前 に Mika Koivisto によって更新されました。

RE: Does Liferay register user activity?

Liferay Legend 投稿: 1519 参加年月日: 06/08/07 最新の投稿
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
14年前 に Alejandro Barrero によって更新されました。

RE: Does Liferay register user activity?

Junior Member 投稿: 77 参加年月日: 09/06/05 最新の投稿
Thanks again. What do I use for <model class name>?
thumbnail
14年前 に Alejandro Barrero によって更新されました。

RE: Does Liferay register user activity?

Junior Member 投稿: 77 参加年月日: 09/06/05 最新の投稿
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.
14年前 に Baris Sener によって更新されました。

RE: Does Liferay register user activity?

Expert 投稿: 278 参加年月日: 09/06/23 最新の投稿
I couldn't locate the audit portlet or any of the audit hooks on the svn page, can you help?
thumbnail
14年前 に Alejandro Barrero によって更新されました。

RE: Does Liferay register user activity?

Junior Member 投稿: 77 参加年月日: 09/06/05 最新の投稿
I am afraid I don´t know what portlet are you refering to. The audit hook is something that I am creating myself.
thumbnail
14年前 に Mika Koivisto によって更新されました。

RE: Does Liferay register user activity?

Liferay Legend 投稿: 1519 参加年月日: 06/08/07 最新の投稿
svn://svn.liferay.com/public/repos/plugins/incubation/hooks/audit-hook
svn://svn.liferay.com/public/repos/plugins/incubation/portlets/audit-portlet