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

# Class ProfileResource

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

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

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `PROFILE_URI`
  `static final String`
  `UPDATE_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

  Modifier and Type
  Method
  Description
  `jakarta.ws.rs.core.Response`
  `createProfiles(@Valid List<CreateProfileModel> createProfileModels, jakarta.ws.rs.core.UriInfo uri)`
  Import a set of profiles.
  `jakarta.ws.rs.core.Response`
  `downloadProfileFile(String profileMetadataId)`
  `jakarta.ws.rs.core.Response`
  `findProfiles(com.fasterxml.jackson.databind.JsonNode queryDsl)`
  Find profiles by queryDsl
  `jakarta.ws.rs.core.Response`
  `importProfileFile(jakarta.ws.rs.core.UriInfo uri, String profileMetadataId, InputStream profileFile)`
  Import a Profile file document (xsd or rng, ...)
  `jakarta.ws.rs.core.Response`
  `updateProfileFile(String profileMetadataId, com.fasterxml.jackson.databind.JsonNode queryDsl)`
  Update the detail of the profile

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

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

- ## Field Details

  - ### PROFILE_URI

    public static final String PROFILE_URI
    See Also:
      - Constant Field Values

  - ### UPDATE_PROFIL_URI

    public static final String UPDATE_PROFIL_URI
    See Also:
      - Constant Field Values

- ## 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 jakarta.ws.rs.core.Response createProfiles(@Valid @Valid List<CreateProfileModel> createProfileModels, @Context jakarta.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 InputStream
      `uri` - the uri info
    Returns:
      Response

  - ### importProfileFile

    @Path("/profiles/{id}") @PUT @Consumes("application/octet-stream") @Produces("application/json") public jakarta.ws.rs.core.Response importProfileFile(@Context jakarta.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 response
      `profileMetadataId` - id of the profile metadata
      `profileFile` - inputStream representing the data to import
    Returns:
      The Response

  - ### updateProfileFile

    @Path("/profiles/{id}") @PUT @Consumes("application/json") @Produces("application/json") public jakarta.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 jakarta.ws.rs.core.Response downloadProfileFile(@PathParam("id") String profileMetadataId)

  - ### findProfiles

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