Class ProfileResource
- java.lang.Object
-
- fr.gouv.vitam.functional.administration.rest.ProfileResource
-
@Path("/adminmanagement/v1") @ApplicationPath("webresources") public class ProfileResource extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROFILE_URIstatic java.lang.StringUPDATE_PROFIL_URI
-
Constructor Summary
Constructors Constructor Description ProfileResource(AdminManagementConfiguration configuration, MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService, FunctionalBackupService functionalBackupService)ProfileResource(WorkspaceClientFactory workspaceClientFactory, MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService, FunctionalBackupService functionalBackupService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponsecreateProfiles(java.util.List<ProfileModel> profileModelList, javax.ws.rs.core.UriInfo uri)Import a set of profiles.javax.ws.rs.core.ResponsedownloadProfileFile(java.lang.String profileMetadataId)javax.ws.rs.core.ResponsefindProfiles(com.fasterxml.jackson.databind.JsonNode queryDsl)Find profiles by queryDsljavax.ws.rs.core.ResponseimportProfileFile(javax.ws.rs.core.UriInfo uri, java.lang.String profileMetadataId, java.io.InputStream profileFile)Import a Profile file document (xsd or rng, ...)javax.ws.rs.core.ResponseupdateProfileFile(java.lang.String profileMetadataId, com.fasterxml.jackson.databind.JsonNode queryDsl)Update the detail of the profile
-
-
-
Field Detail
-
PROFILE_URI
public static final java.lang.String PROFILE_URI
- See Also:
- Constant Field Values
-
UPDATE_PROFIL_URI
public static final java.lang.String UPDATE_PROFIL_URI
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 Detail
-
createProfiles
@Path("/profiles") @POST @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response createProfiles(java.util.List<ProfileModel> profileModelList, @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:
profileModelList- 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") java.lang.String profileMetadataId, java.io.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") java.lang.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") java.lang.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
-
-