src/main/java/com/capitalone/dashboard/event/DashboardEventListener.java
/**
     * Removes the collector item for deleted dashboards
     * @param event
     */
Removes the collector item for deleted dashboards
@param event
Removes the collector item for deleted dashboards @param event
@Override
    public void onAfterDelete(AfterDeleteEvent<Dashboard> event) {
        DBObject dbo = event.getDBObject();
        String dashboardId = dbo.get("id").toString();
        CollectorItem item = getDashboardCollectorItem(dashboardId, getProductCollector().getId());
        if (item != null) {
            collectorItemRepository.delete(item);
        }
    }
@ Override public void onAfterDelete ( AfterDeleteEvent < Dashboard > event ) { DBObject dbo = event . getDBObject ( ) ; String dashboardId = dbo . get ( "id" ) . toString ( ) ; CollectorItem item = getDashboardCollectorItem ( dashboardId , getProductCollector ( ) . getId ( ) ) ; if ( item != null ) { collectorItemRepository . delete ( item ) ; } }
Removes the collector item for deleted dashboards
 @param event
Removes the collector item for deleted dashboards @param event