class FolderEventService implements EntityEventService {

    @Override
    public void updateEventsWithChildrenAndIssues(Long id) {
        String folderType = EventObjectType.FOLDER.name().toLowerCase();
        eventManager.addUpdateEvent(folderType, id);
        eventManager.addUpdateEventsForIssues(id, AclClass.FOLDER);

        Folder folder = folderManager.load(id);

        ListUtils.emptyIfNull(folder.getChildFolders())
                .forEach(childFolder -> updateEventsWithChildrenAndIssues(childFolder.getId()));
        ListUtils.emptyIfNull(folder.getPipelines())
                .forEach(pipeline -> pipelineEventService.updateEventsWithChildrenAndIssues(pipeline.getId()));
        ListUtils.emptyIfNull(folder.getStorages())
                .forEach(storage -> dataStorageEventService.updateEventsWithChildrenAndIssues(storage.getId()));
        ListUtils.emptyIfNull(folder.getConfigurations())
                .forEach(runConfiguration -> configurationEventService
                        .updateEventsWithChildrenAndIssues(runConfiguration.getId()));

        folder.getMetadata().keySet()
                .forEach(metadataClass -> ListUtils.emptyIfNull(metadataEntityManager
                        .loadMetadataEntityByClassNameAndFolderId(id, metadataClass))
                        .forEach(metadataEntity -> metadataEntityEventService
                                .updateEventsWithChildrenAndIssues(metadataEntity.getId())));
    }

}