Interface ContractService<T extends AbstractContractModel>

    • Method Detail

      • createContracts

        RequestResponse<T> createContracts​(java.util.List<T> contractModelList)
                                    throws VitamException
        Create a collections of contracts After passing the validation steps. If all the contracts are valid, they are stored in the collection and indexed.
        The access contract are valid in the following situations :
        • The collection contains 2 ore many contracts having the same name
        • One or more mandatory field is missing
        • A field has an invalid format
        • One or many contracts already exist in the database
        Parameters:
        contractModelList - the list of contracts to be created
        Returns:
        RequestResponseOK if success or VitamError
        Throws:
        VitamException - if in error occurs while validating contracts
      • updateContract

        RequestResponse<T> updateContract​(java.lang.String id,
                                          com.fasterxml.jackson.databind.JsonNode queryDsl)
                                   throws VitamException
        Update contracts status after passing validation steps :
        Field modified :
        • - ActivationDate
        • - DesactivationDate
        • - LastUpdate
        • - Status
        Parameters:
        id - the id of the contract to be updated
        queryDsl - the given queryDsl for update
        Returns:
        RequestResponseOK if success or VitamError
        Throws:
        VitamException - if in error occurs while validating contracts