Class ContractResource
- java.lang.Object
-
- fr.gouv.vitam.functional.administration.rest.ContractResource
-
@Path("/adminmanagement/v1") @ApplicationPath("webresources") public class ContractResource extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ContractResource(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
findAccessContracts(com.fasterxml.jackson.databind.JsonNode queryDsl)
find access contracts by queryDsljavax.ws.rs.core.Response
findIngestContracts(com.fasterxml.jackson.databind.JsonNode queryDsl)
Find ingest contracts by queryDsljavax.ws.rs.core.Response
findManagementContracts(com.fasterxml.jackson.databind.JsonNode queryDsl)
find management contracts by queryDsljavax.ws.rs.core.Response
importAccessContracts(java.util.List<AccessContractModel> accessContractModelList, javax.ws.rs.core.UriInfo uri)
Import a set of contracts access after passing the validation steps.javax.ws.rs.core.Response
importContracts(java.util.List<IngestContractModel> ingestContractModelList, javax.ws.rs.core.UriInfo uri)
Import a set of ingest contracts after passing the validation steps.javax.ws.rs.core.Response
importManagementContracts(java.util.List<ManagementContractModel> managementContractModelList, javax.ws.rs.core.UriInfo uri)
Import a set of management contracts after passing the validation steps.javax.ws.rs.core.Response
updateAccessContract(java.lang.String contractId, com.fasterxml.jackson.databind.JsonNode queryDsl)
javax.ws.rs.core.Response
updateIngestContract(java.lang.String contractId, com.fasterxml.jackson.databind.JsonNode queryDsl)
javax.ws.rs.core.Response
updateManagementContract(java.lang.String contractId, com.fasterxml.jackson.databind.JsonNode queryDsl)
-
-
-
Constructor Detail
-
ContractResource
public ContractResource(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService)
- Parameters:
mongoAccess
-
-
-
Method Detail
-
importContracts
@Path("/ingestcontracts") @POST @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response importContracts(java.util.List<IngestContractModel> ingestContractModelList, @Context javax.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 InputStreamuri
- the uri info- Returns:
- Response
-
findIngestContracts
@GET @Path("/ingestcontracts") @Consumes("application/json") @Produces("application/json") public javax.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 javax.ws.rs.core.Response importAccessContracts(java.util.List<AccessContractModel> accessContractModelList, @Context javax.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 javax.ws.rs.core.Response updateAccessContract(@PathParam("id") java.lang.String contractId, com.fasterxml.jackson.databind.JsonNode queryDsl)
-
updateIngestContract
@Path("/ingestcontracts/{id}") @PUT @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response updateIngestContract(@PathParam("id") java.lang.String contractId, com.fasterxml.jackson.databind.JsonNode queryDsl)
-
findAccessContracts
@Path("/accesscontracts") @GET @Consumes("application/json") @Produces("application/json") public javax.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 javax.ws.rs.core.Response importManagementContracts(java.util.List<ManagementContractModel> managementContractModelList, @Context javax.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 javax.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 javax.ws.rs.core.Response updateManagementContract(@PathParam("id") java.lang.String contractId, com.fasterxml.jackson.databind.JsonNode queryDsl)
-
-