Class ProfileResource
java.lang.Object
fr.gouv.vitam.functional.administration.rest.ProfileResource
@Path("/adminmanagement/v1")
@ApplicationPath("webresources")
public class ProfileResource
extends Object
-
Field Summary
-
Constructor Summary
ConstructorDescriptionProfileResource
(AdminManagementConfiguration configuration, MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService, FunctionalBackupService functionalBackupService) ProfileResource
(WorkspaceClientFactory workspaceClientFactory, MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService, FunctionalBackupService functionalBackupService) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
createProfiles
(@Valid List<CreateProfileModel> createProfileModels, javax.ws.rs.core.UriInfo uri) Import a set of profiles.javax.ws.rs.core.Response
downloadProfileFile
(String profileMetadataId) javax.ws.rs.core.Response
findProfiles
(com.fasterxml.jackson.databind.JsonNode queryDsl) Find profiles by queryDsljavax.ws.rs.core.Response
importProfileFile
(javax.ws.rs.core.UriInfo uri, String profileMetadataId, InputStream profileFile) Import a Profile file document (xsd or rng, ...)javax.ws.rs.core.Response
updateProfileFile
(String profileMetadataId, com.fasterxml.jackson.databind.JsonNode queryDsl) Update the detail of the profile
-
Field Details
-
PROFILE_URI
- See Also:
-
UPDATE_PROFIL_URI
- See Also:
-
-
Constructor Details
-
ProfileResource
public ProfileResource(AdminManagementConfiguration configuration, MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService, FunctionalBackupService functionalBackupService) - Parameters:
configuration
-mongoAccess
-vitamCounterService
-
-
ProfileResource
public ProfileResource(WorkspaceClientFactory workspaceClientFactory, MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService, FunctionalBackupService functionalBackupService)
-
-
Method Details
-
createProfiles
@Path("/profiles") @POST @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response createProfiles(@Valid @Valid List<CreateProfileModel> createProfileModels, @Context javax.ws.rs.core.UriInfo uri) Import a set of profiles. If all the profiles are valid, they will be stored in the collection and indexed. The input is invalid in the following situations :- The json is invalid
- The json contains 2 ore many profiles having the same identifier
- One or more mandatory field is missing
- A field has an invalid format
- One or many profile already exist in the database
- Parameters:
createProfileModels
- as InputStreamuri
- the uri info- Returns:
- Response
-
importProfileFile
@Path("/profiles/{id}") @PUT @Consumes("application/octet-stream") @Produces("application/json") public javax.ws.rs.core.Response importProfileFile(@Context javax.ws.rs.core.UriInfo uri, @PathParam("id") String profileMetadataId, InputStream profileFile) Import a Profile file document (xsd or rng, ...)- Parameters:
uri
- used to construct the created resource and send it back as location in the responseprofileMetadataId
- id of the profile metadataprofileFile
- inputStream representing the data to import- Returns:
- The Response
-
updateProfileFile
@Path("/profiles/{id}") @PUT @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response updateProfileFile(@PathParam("id") String profileMetadataId, com.fasterxml.jackson.databind.JsonNode queryDsl) Update the detail of the profile- Parameters:
profileMetadataId
-queryDsl
-- Returns:
- Response
-
downloadProfileFile
@GET @Path("/profiles/{id}") @Produces("application/octet-stream") public javax.ws.rs.core.Response downloadProfileFile(@PathParam("id") String profileMetadataId) -
findProfiles
@GET @Path("/profiles") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response findProfiles(com.fasterxml.jackson.databind.JsonNode queryDsl) Find profiles by queryDsl- Parameters:
queryDsl
-- Returns:
- Response
-