Package fr.gouv.vitam.metadata.core.reconstruction.service

# Class MetadataReconstructionService

java.lang.Object
fr.gouv.vitam.metadata.core.reconstruction.service.MetadataReconstructionService

public class MetadataReconstructionService extends Object
Reconstruction of Vitam Metadata Collections.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MetadataReconstructionService(VitamRepositoryProvider vitamRepositoryProvider, OffsetRepository offsetRepository, ElasticsearchMetadataIndexManager indexManager, MetadataReconstructionMetricsCache reconstructionMetricsCache)`
  Constructor
  `MetadataReconstructionService(VitamRepositoryProvider vitamRepositoryProvider, RestoreBackupService recoverBackupService, LogbookLifeCyclesClientFactory logbookLifecycleClientFactory, StorageClientFactory storageClientFactory, OffsetRepository offsetRepository, ElasticsearchMetadataIndexManager indexManager, MetadataReconstructionMetricsCache reconstructionMetricsCache)`
  Constructor for tests

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `purgeReconstructedDocumentsWithGraphOnlyData(MetadataCollections metaDaCollection)`
  Find all older (AU/GOT) where only graph data are reconstructed As Documents with only graph data are not indexed in elasticsearch => we have not to implement deletion from Elastcisearch
  `ReconstructionResponseItem`
  `reconstruct(ReconstructionRequestItem reconstructionItem)`
  Reconstruct a collection

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MetadataReconstructionService

    public MetadataReconstructionService(VitamRepositoryProvider vitamRepositoryProvider, OffsetRepository offsetRepository, ElasticsearchMetadataIndexManager indexManager, MetadataReconstructionMetricsCache reconstructionMetricsCache)
    Constructor
    Parameters:
      `vitamRepositoryProvider` - vitamRepositoryProvider
      `offsetRepository` - offsetRepository
      `indexManager` -

  - ### MetadataReconstructionService

    public MetadataReconstructionService(VitamRepositoryProvider vitamRepositoryProvider, RestoreBackupService recoverBackupService, LogbookLifeCyclesClientFactory logbookLifecycleClientFactory, StorageClientFactory storageClientFactory, OffsetRepository offsetRepository, ElasticsearchMetadataIndexManager indexManager, MetadataReconstructionMetricsCache reconstructionMetricsCache)
    Constructor for tests
    Parameters:
      `vitamRepositoryProvider` - vitamRepositoryProvider
      `recoverBackupService` - recoverBackupService
      `logbookLifecycleClientFactory` - logbookLifecycleClientFactory
      `storageClientFactory` - storageClientFactory
      `offsetRepository` -
      `reconstructionMetricsCache` -

- ## Method Details

  - ### reconstruct

    public ReconstructionResponseItem reconstruct(ReconstructionRequestItem reconstructionItem)
    Reconstruct a collection
    Parameters:
      `reconstructionItem` - request for reconstruction
    Returns:
      response of reconstruction
    Throws:
      `DatabaseException` - database exception
      `IllegalArgumentException` - invalid input

  - ### purgeReconstructedDocumentsWithGraphOnlyData

    public void purgeReconstructedDocumentsWithGraphOnlyData(MetadataCollections metaDaCollection)
    Find all older (AU/GOT) where only graph data are reconstructed As Documents with only graph data are not indexed in elasticsearch => we have not to implement deletion from Elastcisearch