@Override public void delete(final Long portalPageId) { notNull("portalPageId", portalPageId); // // delete all PortletConfigs associated with the page first. The underlying portletConfigurationManager/Store // also cleans associated propertySets // final List<PortletConfiguration> portlectConfigurations = portletConfigurationManager.getByPortalPage(portalPageId); for (final PortletConfiguration portletConfiguration : portlectConfigurations) { portletConfigurationManager.delete(portletConfiguration); } final SharedEntity identifier = new SharedEntity.Identifier(portalPageId, PortalPage.ENTITY_TYPE, (ApplicationUser) null); portalPageStore.delete(portalPageId); shareManager.deletePermissions(identifier); indexer.deIndex(identifier).await(); eventPublisher.publish(new DashboardDeleted(identifier, authenticationContext.getUser())); }