class ReconstructionService {

    public ReconstructionResponseItem reconstruct(ReconstructionRequestItem reconstructionItem) {
        ParametersChecker.checkParameter(RECONSTRUCTION_ITEM_MANDATORY_MSG, reconstructionItem);
        ParametersChecker.checkParameter(RECONSTRUCTION_COLLECTION_MANDATORY_MSG, reconstructionItem.getCollection());
        ParametersChecker.checkParameter(RECONSTRUCTION_TENANT_MANDATORY_MSG, reconstructionItem.getTenant());
        if (reconstructionItem.getLimit() < 0) {
            throw new IllegalArgumentException(RECONSTRUCTION_LIMIT_POSITIVE_MSG);
        }
        LOGGER
            .info(String.format(
                "[Reconstruction]: Reconstruction of {%s} Collection on {%s} Vitam tenant",
                reconstructionItem.getCollection(), reconstructionItem.getTenant()));

        switch (DataCategory.valueOf(reconstructionItem.getCollection().toUpperCase())) {
            case UNIT_GRAPH:
            case OBJECTGROUP_GRAPH:
                return reconstructGraphFromZipStream(reconstructionItem.getCollection(), reconstructionItem.getLimit());
            case UNIT:
            case OBJECTGROUP:
                return reconstructCollection(MetadataCollections.getFromValue(reconstructionItem.getCollection()),
                    reconstructionItem.getTenant(), reconstructionItem.getLimit());
            default:
                return new ReconstructionResponseItem(reconstructionItem, StatusCode.KO);
        }
    }

    public  ReconstructionService(VitamRepositoryProvider vitamRepositoryProvider,
        OffsetRepository offsetRepository);
    @VisibleForTesting public  ReconstructionService(VitamRepositoryProvider vitamRepositoryProvider,
        RestoreBackupService recoverBackupService, LogbookLifeCyclesClientFactory logbookLifecycleClientFactory,
        StorageClientFactory storageClientFactory, OffsetRepository offsetRepository);

}