Package fr.gouv.vitam.worker.core.plugin.reclassification.utils

# Class UnitGraphInfoLoader

java.lang.Object
fr.gouv.vitam.worker.core.plugin.reclassification.utils.UnitGraphInfoLoader

public class UnitGraphInfoLoader extends Object
Helper class for db access via DSL for reclassification

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UnitGraphInfoLoader()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Map<String,InheritedRuleCategoryResponseModel>`
  `loadInheritedHoldRules(MetaDataClient metaDataClient, Set<String> unitsIdToRearrange)`
  `Map<String,UnitGraphInfo>`
  `selectAllUnitGraphByIds(MetaDataClient metaDataClient, Set<String> unitIds)`
  Load unit graph with all parents recursively.
  `Set<String>`
  `selectUnitsByIdsAndAccessContract(MetaDataClient metaDataClient, Set<String> unitIds, AccessContractModel accessContractModel)`
  Find unit ids accessible through the access contract
  `Set<String>`
  `selectUnitsByIdsAndTransaction(MetaDataClient metaDataClient, Set<String> unitIds, String transactionId)`
  Find unit ids accessible in a collect transaction
  `Set<String>`
  `selectUnitsByQueryDslAndAccessContract(MetaDataClient metaDataClient, SelectMultiQuery select, AccessContractModel accessContractModel)`
  Find unit ids by dsl accessible through the access contract
  `Set<String>`
  `selectUnitsByQueryDslAndTransaction(MetaDataClient metaDataClient, SelectMultiQuery select, String transactionId)`
  Find unit ids by dsl accessible in a collect transaction

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

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

- ## Constructor Details

  - ### UnitGraphInfoLoader

    public UnitGraphInfoLoader()

- ## Method Details

  - ### selectUnitsByQueryDslAndAccessContract

    public Set<String> selectUnitsByQueryDslAndAccessContract(MetaDataClient metaDataClient, SelectMultiQuery select, AccessContractModel accessContractModel) throws InvalidParseOperationException, VitamDBException, MetaDataDocumentSizeException, MetaDataExecutionException, MetaDataClientServerException, InvalidCreateOperationException
    Find unit ids by dsl accessible through the access contract
    Parameters:
      `metaDataClient` - the metadata client
      `select` - the selection dsl
      `accessContractModel` - the access contract
    Throws:
      `InvalidParseOperationException`
      `VitamDBException`
      `MetaDataDocumentSizeException`
      `MetaDataExecutionException`
      `MetaDataClientServerException`
      `InvalidCreateOperationException`

  - ### selectUnitsByIdsAndAccessContract

    public Set<String> selectUnitsByIdsAndAccessContract(MetaDataClient metaDataClient, Set<String> unitIds, AccessContractModel accessContractModel) throws InvalidParseOperationException, InvalidCreateOperationException, VitamDBException, MetaDataDocumentSizeException, MetaDataExecutionException, MetaDataClientServerException
    Find unit ids accessible through the access contract
    Parameters:
      `metaDataClient` - the metadata client
      `unitIds` - the unit ids to check
      `accessContractModel` - the access contract
    Throws:
      `InvalidParseOperationException`
      `InvalidCreateOperationException`
      `VitamDBException`
      `MetaDataDocumentSizeException`
      `MetaDataExecutionException`
      `MetaDataClientServerException`

  - ### selectUnitsByQueryDslAndTransaction

    public Set<String> selectUnitsByQueryDslAndTransaction(MetaDataClient metaDataClient, SelectMultiQuery select, String transactionId) throws InvalidParseOperationException, VitamDBException, MetaDataDocumentSizeException, MetaDataExecutionException, MetaDataClientServerException, InvalidCreateOperationException
    Find unit ids by dsl accessible in a collect transaction
    Parameters:
      `metaDataClient` - the metadata client
      `select` - the selection dsl
      `transactionId` - the collect transaction id
    Throws:
      `InvalidParseOperationException`
      `VitamDBException`
      `MetaDataDocumentSizeException`
      `MetaDataExecutionException`
      `MetaDataClientServerException`
      `InvalidCreateOperationException`

  - ### selectUnitsByIdsAndTransaction

    public Set<String> selectUnitsByIdsAndTransaction(MetaDataClient metaDataClient, Set<String> unitIds, String transactionId) throws InvalidParseOperationException, InvalidCreateOperationException, VitamDBException, MetaDataDocumentSizeException, MetaDataExecutionException, MetaDataClientServerException
    Find unit ids accessible in a collect transaction
    Parameters:
      `metaDataClient` - the metadata client
      `unitIds` - the unit ids to check
      `transactionId` - the collect transaction id
    Throws:
      `InvalidParseOperationException`
      `InvalidCreateOperationException`
      `VitamDBException`
      `MetaDataDocumentSizeException`
      `MetaDataExecutionException`
      `MetaDataClientServerException`

  - ### selectAllUnitGraphByIds

    public Map<String,UnitGraphInfo> selectAllUnitGraphByIds(MetaDataClient metaDataClient, Set<String> unitIds) throws InvalidParseOperationException, MetaDataExecutionException, MetaDataDocumentSizeException, MetaDataClientServerException, InvalidCreateOperationException
    Load unit graph with all parents recursively.
    Parameters:
      `unitIds` - the units ids
    Throws:
      `InvalidParseOperationException`
      `MetaDataExecutionException`
      `MetaDataDocumentSizeException`
      `MetaDataClientServerException`
      `InvalidCreateOperationException`

  - ### loadInheritedHoldRules

    public Map<String,InheritedRuleCategoryResponseModel> loadInheritedHoldRules(MetaDataClient metaDataClient, Set<String> unitsIdToRearrange) throws InvalidCreateOperationException, InvalidParseOperationException, MetaDataDocumentSizeException, MetaDataExecutionException, MetaDataClientServerException
    Throws:
      `InvalidCreateOperationException`
      `InvalidParseOperationException`
      `MetaDataDocumentSizeException`
      `MetaDataExecutionException`
      `MetaDataClientServerException`