The API provides a mechanism for notifying the Connector implementation of several different event types:
- Integration instance is deleted
- User is removed from an integration instance
If the Connector needs to take action based on these events, an implementation of the IntegrationEventListener can be provided.
Download sample Building Block
Code for the sample below can be downloaded from [here|Learning Environment Connector Developer Guide^sample-6.zip]. The steps below reference this sample.
Sample code
bb-manifest.xml changes
<?xml version="1.0" encoding="ISO-8859-1"?> <manifest> ... <module-defs> <definition namespace="blackboard.platform.integration"> ... <extension id="sampleIntegrationEventListener" point="blackboard.platform.integration.integrationEventListener" class="blackboard.platform.integration.extension.sample.SampleIntegrationEventListener" singleton="true" /> ... </definition> </module-defs> ... </manifest>
IntegrationExtension implementation
package blackboard.platform.integration.extension.sample; import blackboard.persist.Id; import blackboard.platform.integration.IntegrationException; public class SampleIntegrationEventListener extends AbstractIntegrationEventListener { @Override public void integrationDeleted( Id id ) throws IntegrationException { // // This integration instance has been deleted. This is a good time to // clean up any cached data related to the integration. // } @Override public void userDeintegrated( Id id ) throws IntegrationException { // // This user has been removed from one or more integration instances. // This is a good time to clean up any cached data related to the user. // } }