01: /**
02: * $Id: PortletMembershipListener.java,v 1.4 2007/02/06 22:10:19 pm95875 Exp $
03: * Copyright 2005 Sun Microsystems, Inc. All
04: * rights reserved. Use of this product is subject
05: * to license terms. Federal Acquisitions:
06: * Commercial Software -- Government Users
07: * Subject to Standard License Terms and
08: * Conditions.
09: *
10: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */package com.sun.portal.portlet.service.provision;
14:
15: import javax.servlet.ServletContext;
16: import javax.portlet.PortletContext;
17:
18: /**
19: * Listener interface for handling community membership events.
20: * Listeners can be configured for each portlet in sun-portlet.xml file.
21: * Methods on these listeners are invoked everytime a member is added or removed in a
22: * community, that is using this portlet.
23: */
24:
25: public interface PortletMembershipListener {
26:
27: /**
28: * DO NOT CALL IT. It is called by the provisioning framework when the instance of this listener is created
29: * @param context
30: * @throws com.sun.portal.portlet.service.provision.PortletMembershipException
31: */
32: public void init(PortletContext context)
33: throws PortletMembershipException;
34:
35: /**
36: * DO NOT CALL IT. It is called by the provisioning framework when the instance of this listener is created
37: * @param pc PortletContext
38: * @param sc ServletContext
39: * @throws com.sun.portal.portlet.service.provision.PortletMembershipException
40: */
41: public void init(PortletContext pc, ServletContext sc)
42: throws PortletMembershipException;
43:
44: /**
45: * Called by the framework when a member is added to a community.
46: *
47: * @param event membership event
48: * @exception com.sun.portal.portlet.service.provision.PortletMembershipException
49: */
50: void memberAdded(PortletMembershipEvent event)
51: throws PortletMembershipException;
52:
53: /**
54: * Called by the framework when a member is removed from the community.
55: *
56: * @param event membership event
57: * @exception com.sun.portal.portlet.service.provision.PortletMembershipException
58: */
59: void memberRemoved(PortletMembershipEvent event)
60: throws PortletMembershipException;
61:
62: }
|