A convienence class implementing PortletProvisionListener.
Listeners are configured for a portlet in sun-portlet.xml file. Methods on
these listeners are invoked everytime the community including the portlet changes its state.
Framework initializes the instance with the right PortletContext in the init() method.
provision(PortletProvisionEvent event) Method called when an instance of the portlet, for which this listener is configured, is added to the community.
public void
unprovision(PortletProvisionEvent event) Method called when an instance of the portlet, for which this listener is configured, is removed from the community.
Called by container when an instance is created. When overwritten, super.init(context) must
be called to initialize it correctly.
Parameters: pc - portlet context Parameters: sc - servlet context exception: com.sun.portal.portlet.service.provision.PortletProvisionException -
Method called when an instance of the portlet, for which this listener is configured, is added to the community.
For backward compatibility, handleEvent calls this method when the event type is EVENT_TYPE_CREATED.
We recommend not to use this method and instead overwrite the default implementation of handleEvent
to handle all community event types.
Parameters: event - provisioning event exception: com.sun.portal.portlet.service.provision.PortletProvisionException -
Method called when an instance of the portlet, for which this listener is configured, is removed from the community.
For backward compatibility, handleEvent calls this method when the event type is EVENT_TYPE_PURGED.
We recommend not to use this method and instead overwrite the default implementation of handleEvent
to handle all community event types.
Parameters: event - provisioning event exception: com.sun.portal.portlet.service.provision.PortletProvisionException - thrown when there is an application error.