class MetadataManagementResource {

    @Path(COMPUTE_GRAPH_URI + "/{collection:" + UNIT + "|" + OBJECTGROUP + "|" + UNIT_OBJECTGROUP + "}")
    @POST
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    public Response computeGraph(@PathParam("collection") GraphComputeAction action, Set<String> documentsId) {
        try {
            VitamThreadUtils.getVitamSession().initIfAbsent(VitamConfiguration.getAdminTenant());

            MetadataCollections metadataCollections = MetadataCollections.UNIT;
            boolean computeObjectGroupGraph = GraphComputeAction.UNIT_OBJECTGROUP.equals(action);

            if (GraphComputeAction.OBJECTGROUP.equals(action)) {
                metadataCollections = MetadataCollections.OBJECTGROUP;
            }

            GraphComputeResponse response =
                this.graphComputeService.computeGraph(metadataCollections, documentsId, computeObjectGroupGraph, true);
            return Response.ok().entity(response).build();
        } catch (Exception e) {
            LOGGER.error(COMPUTE_GRAPH_EXCEPTION_MSG, e);
            return Response.serverError().entity(ERROR_MSG + e.getMessage() + "\"}").build();
        }
    }

    @VisibleForTesting  MetadataManagementResource(VitamRepositoryProvider vitamRepositoryProvider,
        OffsetRepository offsetRepository, MetaDataImpl metadata, MetaDataConfiguration configuration);
    @VisibleForTesting  MetadataManagementResource(
        ReconstructionService reconstructionService,
        StoreGraphService storeGraphService,
        GraphComputeService graphComputeService,
        ReclassificationDistributionService reclassificationDistributionService,
        ProcessingManagementClientFactory processingManagementClientFactory,
        LogbookOperationsClientFactory logbookOperationsClientFactory,
        WorkspaceClientFactory workspaceClientFactory,
        MetaDataConfiguration configuration,
        ExportsPurgeService exportsPurgeService);

}