Class AccessInternalResourceImpl

java.lang.Object
fr.gouv.vitam.common.server.application.resources.ApplicationStatusResource
fr.gouv.vitam.access.internal.rest.AccessInternalResourceImpl
All Implemented Interfaces:
AccessInternalResource

@Path("/access-internal/v1") public class AccessInternalResourceImpl extends ApplicationStatusResource implements AccessInternalResource
  • Constructor Details

    • AccessInternalResourceImpl

      public AccessInternalResourceImpl(AccessInternalConfiguration configuration)
      Parameters:
      configuration - to associate with AccessResourceImpl
  • Method Details

    • getUnits

      @GET @Path("/units") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response getUnits(com.fasterxml.jackson.databind.JsonNode queryDsl)
      get Archive Unit list by query based on identifier
      Specified by:
      getUnits in interface AccessInternalResource
      Parameters:
      queryDsl - as JsonNode
      Returns:
      an archive unit result list
    • getUnitsByUnitPersistentIdentifier

      @GET @Path("/units/unitpid/{persistentIdentifier:.+}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response getUnitsByUnitPersistentIdentifier(@PathParam("persistentIdentifier") String persistentIdentifier, com.fasterxml.jackson.databind.JsonNode selectQuery)
      get Archive Unit list by query based on identifier
      Specified by:
      getUnitsByUnitPersistentIdentifier in interface AccessInternalResource
      Parameters:
      persistentIdentifier - persistent Identifier
      selectQuery - as JsonNode
      Returns:
      an archive unit result list
    • downloadObjectsByUnitPersistentIdentifier

      @GET @Path("/objects/unitpid/{persistentIdentifier:.+}") @Produces({"application/octet-stream","application/json"}) public javax.ws.rs.core.Response downloadObjectsByUnitPersistentIdentifier(@PathParam("persistentIdentifier") String unitPersistentIdentifier, @DefaultValue("BinaryMaster") @QueryParam("qualifier") String qualifier, @QueryParam("version") Integer version)
      Specified by:
      downloadObjectsByUnitPersistentIdentifier in interface AccessInternalResource
    • getObjectsByObjectPersistentIdentifier

      @GET @Path("/objects/objectpid/{persistentIdentifier:.+}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response getObjectsByObjectPersistentIdentifier(@PathParam("persistentIdentifier") String persistentIdentifier, com.fasterxml.jackson.databind.JsonNode selectQuery)
      get Archive Unit list by query based on identifier
      Specified by:
      getObjectsByObjectPersistentIdentifier in interface AccessInternalResource
      Parameters:
      persistentIdentifier - persistent Identifier
      selectQuery - as JsonNode
      Returns:
      an archive unit result list
    • downloadObjectByPersistentIdentifier

      @GET @Path("/objects/objectpid/{persistentIdentifier:.+}") @Produces({"application/octet-stream","application/json"}) public javax.ws.rs.core.Response downloadObjectByPersistentIdentifier(@PathParam("persistentIdentifier") String persistentIdentifier)
      Specified by:
      downloadObjectByPersistentIdentifier in interface AccessInternalResource
    • streamUnits

      @GET @Path("/units/stream") @Consumes("application/json") @Produces("application/octet-stream") public javax.ws.rs.core.Response streamUnits(com.fasterxml.jackson.databind.JsonNode queryDsl)
      get Archive Unit list by query based on identifier
      Specified by:
      streamUnits in interface AccessInternalResource
      Parameters:
      queryDsl - as JsonNode
      Returns:
      an archive unit result list
    • streamObjects

      @GET @Path("/objects/stream") @Consumes("application/json") @Produces("application/octet-stream") public javax.ws.rs.core.Response streamObjects(com.fasterxml.jackson.databind.JsonNode queryDsl)
      get objects list by query based on identifier
      Specified by:
      streamObjects in interface AccessInternalResource
      Parameters:
      queryDsl - as JsonNode
      Returns:
      an objects result list
    • selectUnitsWithInheritedRules

      @GET @Path("/unitsWithInheritedRules") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response selectUnitsWithInheritedRules(com.fasterxml.jackson.databind.JsonNode queryDsl)
      Select units with inherited rules
      Specified by:
      selectUnitsWithInheritedRules in interface AccessInternalResource
      Parameters:
      queryDsl - as JsonNode
      Returns:
      an archive unit result list with inherited rules
    • exportDIP

      @POST @Path("/dipexport") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response exportDIP(com.fasterxml.jackson.databind.JsonNode dslRequest)
      get Archive Unit list by query based on identifier
      Specified by:
      exportDIP in interface AccessInternalResource
      Parameters:
      dslRequest - as DipExportRequest
      Returns:
      an archive unit result list
    • exportByUsageFilter

      @POST @Path("/export/usagefilter") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response exportByUsageFilter(ExportRequest exportRequest)
      get Archive Unit list by query based on identifier
      Specified by:
      exportByUsageFilter in interface AccessInternalResource
      Parameters:
      exportRequest - as DipExportRequest / TransferRequest
      Returns:
      an archive unit result list
    • transferReply

      @POST @Path("/transfers/reply") @Consumes("application/xml") @Produces("application/json") public javax.ws.rs.core.Response transferReply(InputStream transferReply)
      Specified by:
      transferReply in interface AccessInternalResource
    • findDIPByID

      @GET @Path("/dipexport/{id}/dip") @Consumes("application/octet-stream") public javax.ws.rs.core.Response findDIPByID(@PathParam("id") String id)
      Specified by:
      findDIPByID in interface AccessInternalResource
      Parameters:
      id - of operation (X-Request-Id)
      Returns:
    • findTransferSIPByID

      @GET @Path("/transferexport/{id}/sip") @Consumes("application/octet-stream") public javax.ws.rs.core.Response findTransferSIPByID(@PathParam("id") String id)
      Specified by:
      findTransferSIPByID in interface AccessInternalResource
      Parameters:
      id - of operation (X-Request-Id)
      Returns:
    • startReclassificationWorkflow

      @POST @Path("/reclassification") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response startReclassificationWorkflow(com.fasterxml.jackson.databind.JsonNode reclassificationRequestJson)
      Starts a reclassification workflow.
      Specified by:
      startReclassificationWorkflow in interface AccessInternalResource
      Parameters:
      reclassificationRequestJson - Reclassification request.
      Returns:
      response
    • startReclassificationWorkflow

      public javax.ws.rs.core.Response startReclassificationWorkflow(com.fasterxml.jackson.databind.JsonNode reclassificationRequestJson, ProcessAction processAction)
      Parameters:
      reclassificationRequestJson -
      processAction -
      Returns:
    • startEliminationAnalysisWorkflow

      @POST @Path("/elimination/analysis") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response startEliminationAnalysisWorkflow(EliminationRequestBody eliminationRequestBody)
      Starts a elimination analysis workflow.
      Specified by:
      startEliminationAnalysisWorkflow in interface AccessInternalResource
      Parameters:
      eliminationRequestBody - elimination DSL request
      Returns:
      response
    • startEliminationActionWorkflow

      @POST @Path("/elimination/action") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response startEliminationActionWorkflow(EliminationRequestBody eliminationRequestBody)
      Starts a elimination action workflow.
      Specified by:
      startEliminationActionWorkflow in interface AccessInternalResource
      Parameters:
      eliminationRequestBody - elimination DSL request
      Returns:
      response
    • getUnitById

      @GET @Path("/units/{id_unit}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response getUnitById(com.fasterxml.jackson.databind.JsonNode queryDsl, @PathParam("id_unit") String idUnit)
      get Archive Unit list by query based on identifier
      Specified by:
      getUnitById in interface AccessInternalResource
      Parameters:
      queryDsl - as JsonNode
      idUnit - identifier
      Returns:
      an archive unit result list
    • updateUnitById

      @PUT @Path("/units/{id_unit}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response updateUnitById(com.fasterxml.jackson.databind.JsonNode queryDsl, @PathParam("id_unit") String idUnit, @HeaderParam("X-Request-Id") String requestId)
      update archive units by Id with Json query
      Specified by:
      updateUnitById in interface AccessInternalResource
      Parameters:
      requestId - request identifier
      queryDsl - DSK, null not allowed
      idUnit - units identifier
      Returns:
      a archive unit result list
    • getObjectGroup

      @GET @Path("/objects/{id_object_group}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response getObjectGroup(@PathParam("id_object_group") String idObjectGroup, com.fasterxml.jackson.databind.JsonNode query)
      Description copied from interface: AccessInternalResource
      Retrieve an ObjectGroup by its id
      Specified by:
      getObjectGroup in interface AccessInternalResource
      Parameters:
      idObjectGroup - the ObjectGroup id
      query - the json query
      Returns:
      an http response containing the objectGroup as json or a json serialized error
    • getObjectStreamAsync

      @GET @Path("/objects/{id_object_group}/{id_unit}") @Consumes("application/json") @Produces("application/octet-stream") public javax.ws.rs.core.Response getObjectStreamAsync(@Context javax.ws.rs.core.HttpHeaders headers, @PathParam("id_object_group") String idObjectGroup, @PathParam("id_unit") String idUnit)
      Description copied from interface: AccessInternalResource
      Retrieve an Object associated to the given ObjectGroup id based on given (via headers) Qualifier and Version (Async version)
      Specified by:
      getObjectStreamAsync in interface AccessInternalResource
      Returns:
      response
    • createObjectAccessRequestIfRequired

      @POST @Path("/objects/{id_object_group}/accessRequest") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response createObjectAccessRequestIfRequired(@Context javax.ws.rs.core.HttpHeaders headers, @PathParam("id_object_group") String idObjectGroup)
      Specified by:
      createObjectAccessRequestIfRequired in interface AccessInternalResource
    • checkAccessRequestStatuses

      @GET @Path("/accessRequests/") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response checkAccessRequestStatuses(@Context javax.ws.rs.core.HttpHeaders headers, List<AccessRequestReference> accessRequestReferences)
      Specified by:
      checkAccessRequestStatuses in interface AccessInternalResource
    • removeAccessRequest

      @DELETE @Path("/accessRequests/") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response removeAccessRequest(@Context javax.ws.rs.core.HttpHeaders headers, AccessRequestReference accessRequestReference)
      Specified by:
      removeAccessRequest in interface AccessInternalResource
    • getAccessLogStreamAsync

      @GET @Path("/storageaccesslog") @Consumes("application/json") @Produces("application/octet-stream") public javax.ws.rs.core.Response getAccessLogStreamAsync(@Context javax.ws.rs.core.HttpHeaders headers, com.fasterxml.jackson.databind.JsonNode params)
      Description copied from interface: AccessInternalResource
      gets accesslog file by id as an InputStream
      Specified by:
      getAccessLogStreamAsync in interface AccessInternalResource
      Parameters:
      headers - request headers
      params - given params in order to filter accessLog files
      Returns:
    • massUpdateUnits

      @POST @Path("/units") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response massUpdateUnits(com.fasterxml.jackson.databind.JsonNode queryDsl)
      Description copied from interface: AccessInternalResource
      Mass update of archive units with Json query
      Specified by:
      massUpdateUnits in interface AccessInternalResource
      Parameters:
      queryDsl - DSL, null not allowed
      Returns:
      the response
    • massUpdateUnitsRules

      @POST @Path("/units/rules") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response massUpdateUnitsRules(MassUpdateUnitRuleRequest massUpdateUnitRuleRequest)
      Description copied from interface: AccessInternalResource
      Mass update of archive units rules
      Specified by:
      massUpdateUnitsRules in interface AccessInternalResource
      Parameters:
      massUpdateUnitRuleRequest - wrapper for {DSL, RuleActions}, null not allowed
      Returns:
      the response
    • bulkAtomicUpdateUnits

      @POST @Path("/units/atomicbulk") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response bulkAtomicUpdateUnits(com.fasterxml.jackson.databind.JsonNode query)
      Description copied from interface: AccessInternalResource
      Bulk Atomic update of archive units with Json request containing multiple atomic update queries
      Specified by:
      bulkAtomicUpdateUnits in interface AccessInternalResource
      Returns:
      the response
    • revertUpdateUnits

      @POST @Path("/revert/units") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response revertUpdateUnits(RevertUpdateOptions revertUpdateOptions)
      Description copied from interface: AccessInternalResource
      gets objects group with Json query Revert an update of archive units
      Specified by:
      revertUpdateUnits in interface AccessInternalResource
      Parameters:
      revertUpdateOptions - wrapper for {DSL, operationId}, null not allowed
      Returns:
      the response
    • startComputeInheritedRules

      @Path("/units/computedInheritedRules") @POST @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response startComputeInheritedRules(com.fasterxml.jackson.databind.JsonNode dslQuery)
    • deleteComputeInheritedRules

      @Path("/units/computedInheritedRules") @DELETE @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response deleteComputeInheritedRules(com.fasterxml.jackson.databind.JsonNode dslQuery)
    • getObjects

      @GET @Path("/objects") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response getObjects(com.fasterxml.jackson.databind.JsonNode queryDsl)
      get Groups Objects list based on DSL query
      Specified by:
      getObjects in interface AccessInternalResource
      Parameters:
      queryDsl - as JsonNode
      Returns:
      a group objects result list
    • startPreservation

      @Path("/preservation") @POST @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response startPreservation(PreservationRequest preservationRequest)
    • deleteGotVersions

      @Path("/deleteGotVersions") @POST @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response deleteGotVersions(DeleteGotVersionsRequest deleteGotVersionsRequest)