class SpaceConfigStorageImpl implements SpaceConfigStorage {

    @Override
    public List<Long> getChangeRequestIds(String repositoryAlias) {
        List<Long> changeRequestIds = new ArrayList<>();

        final String changeRequestsFolderPath = buildChangeRequestsFolderPath(repositoryAlias);

        if (objectStorage.exists(changeRequestsFolderPath)) {
            final Path changeRequestsFolder = objectStorage.getPath(changeRequestsFolderPath);

            try (DirectoryStream<Path> directoryStream =
                         ioService.newDirectoryStream(changeRequestsFolder,
                                                      Files::isDirectory)) {
                directoryStream.forEach(crDir -> {
                    try {
                        Long id = Long.valueOf(crDir.getFileName().toString());
                        changeRequestIds.add(id);
                    } catch (NumberFormatException e) {
                        logger.error("Cannot convert folder name to long: ", e);
                    } catch (Exception e) {
                        logger.error("An unexpected exception was thrown: ", e);
                    }
                });
            }
        }

        return changeRequestIds;
    }

    public  SpaceConfigStorageImpl();
    @Inject public  SpaceConfigStorageImpl(final ObjectStorage objectStorage,
                                  final @Named("configIO") IOService ioService);

}