Package fr.gouv.vitam.functional.administration.core.contract

# Class ContractHelper

java.lang.Object
fr.gouv.vitam.functional.administration.core.contract.ContractHelper

public class ContractHelper extends Object
Common utils for contract services

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ContractHelper()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static DbRequestResult`
  `findByIdentifier(String identifier, FunctionalAdminCollections collection, MongoDbAccessReferential mongoAccess)`
  Find contracts by idenfier
  `static void`
  `setIdentifier(boolean slaveMode, AbstractContractModel cm, VitamCounterService vitamCounterService, SequenceType sequenceType)`
  Init idenfier in contract if slave not activated.

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

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

- ## Constructor Details

  - ### ContractHelper

    public ContractHelper()

- ## Method Details

  - ### findByIdentifier

    public static DbRequestResult findByIdentifier(String identifier, FunctionalAdminCollections collection, MongoDbAccessReferential mongoAccess) throws InvalidParseOperationException, ReferentialException
    Find contracts by idenfier
    Parameters:
      `identifier` - identifier
      `collection` - mongo collection of the contract
      `mongoAccess` - mongo access service
    Returns:
      DbRequestResult
    Throws:
      `InvalidParseOperationException`
      `ReferentialException`

  - ### setIdentifier

    public static void setIdentifier(boolean slaveMode, AbstractContractModel cm, VitamCounterService vitamCounterService, SequenceType sequenceType) throws ReferentialException
    Init idenfier in contract if slave not activated.
    Parameters:
      `slaveMode` - slaveMode
      `cm` - contract
      `vitamCounterService` - counter service
      `sequenceType` - sequence collection
    Throws:
      `ReferentialException`