public void onEvent(ManagedObjectRegistryEvent event) {
if (event instanceof ManagedObjectAddedEvent) {
// Track whether a portletContainer or portletFilter needs CDI injection
ManagedObject managedObject = ((ManagedObjectAddedEvent) event).getManagedObject();
if (managedObject instanceof ManagedPortletContainer) {
ManagedPortletContainer managedPortletContainer = (ManagedPortletContainer) managedObject;
PortletApplication portletApp = managedPortletContainer.getManagedPortletApplication().getPortletApplication();
createMetaData(managedPortletContainer.getId(), portletApp);
} else if (managedObject instanceof ManagedPortletFilter) {
ManagedPortletFilter managedPortletFilter = (ManagedPortletFilter) managedObject;
PortletApplication portletApp = managedPortletFilter.getManagedPortletApplication().getPortletApplication();
createMetaData(managedPortletFilter.getId(), portletApp);
}
} else if (event instanceof ManagedObjectLifeCycleEvent) {
ManagedObjectLifeCycleEvent lifeCycleEvent = (ManagedObjectLifeCycleEvent) event;
ManagedObject managedObject = lifeCycleEvent.getManagedObject();
LifeCycleStatus status = lifeCycleEvent.getStatus();
if (managedObject instanceof ManagedPortletContainer) {
if (LifeCycleStatus.STARTED == status || LifeCycleStatus.INITIALIZED == status) {