Package fr.gouv.vitam.functional.administration.rest

# Class ContractResource

java.lang.Object
fr.gouv.vitam.functional.administration.rest.ContractResource

@Path("/adminmanagement/v1") @ApplicationPath("webresources") public class ContractResource extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ContractResource(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `jakarta.ws.rs.core.Response`
  `findAccessContracts(com.fasterxml.jackson.databind.JsonNode queryDsl)`
  find access contracts by queryDsl
  `jakarta.ws.rs.core.Response`
  `findIngestContracts(com.fasterxml.jackson.databind.JsonNode queryDsl)`
  Find ingest contracts by queryDsl
  `jakarta.ws.rs.core.Response`
  `findManagementContracts(com.fasterxml.jackson.databind.JsonNode queryDsl)`
  find management contracts by queryDsl
  `jakarta.ws.rs.core.Response`
  `importAccessContracts(List<AccessContractModel> accessContractModelList, jakarta.ws.rs.core.UriInfo uri)`
  Import a set of contracts access after passing the validation steps.
  `jakarta.ws.rs.core.Response`
  `importContracts(List<IngestContractModel> ingestContractModelList, jakarta.ws.rs.core.UriInfo uri)`
  Import a set of ingest contracts after passing the validation steps.
  `jakarta.ws.rs.core.Response`
  `importManagementContracts(List<ManagementContractModel> managementContractModelList, jakarta.ws.rs.core.UriInfo uri)`
  Import a set of management contracts after passing the validation steps.
  `jakarta.ws.rs.core.Response`
  `updateAccessContract(String contractId, com.fasterxml.jackson.databind.JsonNode queryDsl)`
  `jakarta.ws.rs.core.Response`
  `updateIngestContract(String contractId, com.fasterxml.jackson.databind.JsonNode queryDsl)`
  `jakarta.ws.rs.core.Response`
  `updateManagementContract(String contractId, com.fasterxml.jackson.databind.JsonNode queryDsl)`

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

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

- ## Constructor Details

  - ### ContractResource

    public ContractResource(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService)
    Parameters:
      `mongoAccess` -

- ## Method Details

  - ### importContracts

    @Path("/ingestcontracts") @POST @Consumes("application/json") @Produces("application/json") public jakarta.ws.rs.core.Response importContracts(List<IngestContractModel> ingestContractModelList, @Context jakarta.ws.rs.core.UriInfo uri)
    Import a set of ingest contracts after passing the validation steps. If all the contracts are valid, they are stored in the collection and indexed. The input is invalid in the following situations :
    - The json is invalid
    - The json 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 elready exist in the database
    Parameters:
      `ingestContractModelList` - as InputStream
      `uri` - the uri info
    Returns:
      Response

  - ### findIngestContracts

    @GET @Path("/ingestcontracts") @Consumes("application/json") @Produces("application/json") public jakarta.ws.rs.core.Response findIngestContracts(com.fasterxml.jackson.databind.JsonNode queryDsl)
    Find ingest contracts by queryDsl
    Parameters:
      `queryDsl` -
    Returns:
      Response

  - ### importAccessContracts

    @Path("/accesscontracts") @POST @Consumes("application/json") @Produces("application/json") public jakarta.ws.rs.core.Response importAccessContracts(List<AccessContractModel> accessContractModelList, @Context jakarta.ws.rs.core.UriInfo uri)
    Import a set of contracts access after passing the validation steps. If all the contracts are valid, they are stored in the collection and indexed. The input is invalid in the following situations :
    - The json is invalid
    - The json 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:
      `accessContractModelList` -
      `uri` -
    Returns:
      Response

  - ### updateAccessContract

    @Path("/accesscontracts/{id}") @PUT @Consumes("application/json") @Produces("application/json") public jakarta.ws.rs.core.Response updateAccessContract(@PathParam("id") String contractId, com.fasterxml.jackson.databind.JsonNode queryDsl)

  - ### updateIngestContract

    @Path("/ingestcontracts/{id}") @PUT @Consumes("application/json") @Produces("application/json") public jakarta.ws.rs.core.Response updateIngestContract(@PathParam("id") String contractId, com.fasterxml.jackson.databind.JsonNode queryDsl)

  - ### findAccessContracts

    @Path("/accesscontracts") @GET @Consumes("application/json") @Produces("application/json") public jakarta.ws.rs.core.Response findAccessContracts(com.fasterxml.jackson.databind.JsonNode queryDsl)
    find access contracts by queryDsl
    Parameters:
      `queryDsl` -
    Returns:
      Response

  - ### importManagementContracts

    @Path("/managementcontracts") @POST @Consumes("application/json") @Produces("application/json") public jakarta.ws.rs.core.Response importManagementContracts(List<ManagementContractModel> managementContractModelList, @Context jakarta.ws.rs.core.UriInfo uri)
    Import a set of management contracts after passing the validation steps. If all the contracts are valid, they are stored in the collection and indexed. The input is invalid in the following situations :
    - The json is invalid
    - The json 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
    - One or many of the storage strategies are invalid
    Parameters:
      `managementContractModelList` -
      `uri` -
    Returns:
      Response

  - ### findManagementContracts

    @Path("/managementcontracts") @GET @Consumes("application/json") @Produces("application/json") public jakarta.ws.rs.core.Response findManagementContracts(com.fasterxml.jackson.databind.JsonNode queryDsl)
    find management contracts by queryDsl
    Parameters:
      `queryDsl` -
    Returns:
      Response

  - ### updateManagementContract

    @Path("/managementcontracts/{id}") @PUT @Consumes("application/json") @Produces("application/json") public jakarta.ws.rs.core.Response updateManagementContract(@PathParam("id") String contractId, com.fasterxml.jackson.databind.JsonNode queryDsl)