user1506541
user1506541

Reputation: 111

liferay event listener

i have some hard task, i need to change some part of my project using jboss portal 2.7.2 into liferay. Ofc less change better but all jboss portal must disappear. I need 2 replace classes below. So my question is how using liferay portal implements(or not(if already exist)) listener which will know when someone is trying 2 log in. Make login possible without reloading etc. Ofc it was nice if there was some pro eventlistener in liferay which can recognise other events not only logging but i will be glad for all help. 4 the rest of this class will be nice if someone know replacment 4 them in liferay.

import org.jboss.portal.api.event.PortalEvent;
import org.jboss.portal.api.event.PortalEventContext;
import org.jboss.portal.api.event.PortalEventListener;
import org.jboss.portal.api.session.PortalSession;
import org.jboss.portal.api.user.event.UserAuthenticationEvent;
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.NoSuchUserException;
import org.jboss.portal.identity.User;
import org.jboss.portal.identity.UserModule;
import org.jboss.portal.identity.UserProfileModule; 

Upvotes: 0

Views: 3002

Answers (2)

Kiran
Kiran

Reputation: 1

Liferay does allow adding handlers to login events. More information can be found @ http://www.learnercorner.in/topics?showTopic=16001

Upvotes: 0

Mark
Mark

Reputation: 18827

Liferay has similar approache. Create a Hook and add properties like http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/extending-and-overriding-%3Cem%3Eportal-properties%3C-e-1

With the properties you can specificy wich class schould be call by the portal events:

login.events.post=my.package.AfterLoginHandler

with the same approche you can listen to creating/changes/removes of entities:

value.object.listener.com.liferay.portal.model.User=my.package.UserListener    
value.object.listener.com.liferay.portal.model.Layout=my.package.LayoutListener
...

Upvotes: 1

Related Questions