Class WebApplicationResource


@Path("/v1/api") public class WebApplicationResource extends ApplicationStatusResource
Web Application Resource class
  • Field Details

  • Constructor Details

  • Method Details

    • uploadObject

      @POST @Path("/replaceObject/{dataType}/{strategyId}/{offerId}/{uid}/{size}") @Consumes("application/octet-stream") @Produces("application/json") public javax.ws.rs.core.Response uploadObject(@HeaderParam("X-Tenant-Id") String xTenantId, @PathParam("uid") String uid, @PathParam("dataType") String dataType, @PathParam("strategyId") String strategyId, @PathParam("offerId") String offerId, @PathParam("size") Long size, InputStream input)
      Parameters:
      xTenantId - xtenant
      uid - uid
      dataType - data
      Returns:
    • getStrategies

      @GET @Path("/strategies") @Produces("application/json") public javax.ws.rs.core.Response getStrategies(@HeaderParam("X-Tenant-Id") String xTenantId)
      Parameters:
      xTenantId - xtenant
      Returns:
      list of strategies
    • deleteObject

      @DELETE @Path("/deleteObject/{dataType}/{strategyId}/{offerId}/{uid}") @Produces("application/json") public javax.ws.rs.core.Response deleteObject(@HeaderParam("X-Tenant-Id") String xTenantId, @PathParam("uid") String uid, @PathParam("dataType") String dataType, @PathParam("strategyId") String strategyId, @PathParam("offerId") String offerId)
      Parameters:
      xTenantId - xtenant
      uid - uid
      dataType - data
      Returns:
    • launchAudit

      @POST @Path("/launchAudit/{operationId}") @Consumes("application/json") @Produces("application/json") @Deprecated public javax.ws.rs.core.Response launchAudit(@HeaderParam("X-Tenant-Id") String xTenantId, @HeaderParam("X-Access-Contract-Id") String xAccessContratId, @PathParam("operationId") String operationId)
      Deprecated.
      launch Rectification audit from recette
      Parameters:
      xTenantId - xTenantId
      operationId - operationId
      Returns:
    • launchIngestCleanup

      @POST @Path("/ingestcleanup/{operationId}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response launchIngestCleanup(@HeaderParam("X-Tenant-Id") String xTenantId, @HeaderParam("X-Access-Contract-Id") String xAccessContratId, @PathParam("operationId") String operationId)
    • getObjectAsInputStreamAsync

      @GET @Path("/download/{strategyId}/{offerId}/{dataType}/{uid}") @Produces("application/octet-stream") public javax.ws.rs.core.Response getObjectAsInputStreamAsync(@HeaderParam("X-Tenant-Id") String xTenantId, @PathParam("uid") String uid, @PathParam("dataType") String dataType, @PathParam("strategyId") String strategyId, @PathParam("offerId") String offerId)
      Retrieve an Object data as an input stream. Download by access.
    • createAccessRequest

      @POST @Path("/access-request/{strategyId}/{offerId}/{dataType}/{uid}") @Produces("application/json") public javax.ws.rs.core.Response createAccessRequest(@HeaderParam("X-Tenant-Id") String xTenantId, @PathParam("strategyId") String strategyId, @PathParam("offerId") String offerId, @PathParam("dataType") String dataType, @PathParam("uid") String uid)
      Create an access request for the given offerId, dataType and uid.
    • checkAccessRequestStatus

      @GET @Path("/access-request/{strategyId}/{offerId}/{accessRequestId}") @Consumes("application/json") public javax.ws.rs.core.Response checkAccessRequestStatus(@HeaderParam("X-Tenant-Id") String xTenantId, @PathParam("strategyId") String strategyId, @PathParam("offerId") String offerId, @PathParam("accessRequestId") String accessRequestId)
      Check the status of the Access Request @accessRequestId.
    • removeAccessRequest

      @DELETE @Path("/access-request/{strategyId}/{offerId}/{accessRequestId}") @Consumes("application/json") public javax.ws.rs.core.Response removeAccessRequest(@HeaderParam("X-Tenant-Id") String xTenantId, @PathParam("strategyId") String strategyId, @PathParam("offerId") String offerId, @PathParam("accessRequestId") String accessRequestId)
      Remove the access request @accessRequestId.
    • getLogbookMessages

      @GET @Path("/messages/logbook") @Produces("application/json") public javax.ws.rs.core.Response getLogbookMessages()
      Retrieve all the messages for logbook
      Returns:
      Response
    • login

      @POST @Path("login") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response login(@Context javax.servlet.http.HttpServletRequest httpRequest, com.fasterxml.jackson.databind.JsonNode object)
      Parameters:
      object - user credentials
      Returns:
      Response OK if login success
    • getLogbookStatistics

      @GET @Path("/stat/{id_op}") @Produces("text/plain") public javax.ws.rs.core.Response getLogbookStatistics(@PathParam("id_op") String operationId)
      Generates the logbook operation statistics file (cvs format) relative to the operation parameter
      Parameters:
      operationId - logbook oeration id
      Returns:
      the statistics file (csv format)
    • getSecureMode

      @GET @Path("/securemode") @Produces("application/json") public javax.ws.rs.core.Response getSecureMode()
      Return authentication mode
      Returns:
      liste of authentication mode
    • traceability

      @POST @Path("/operations/traceability") @Produces("application/json") public javax.ws.rs.core.Response traceability(@HeaderParam("X-Tenant-Id") String xTenantId) throws LogbookClientServerException
      Parameters:
      xTenantId - the tenant id
      Returns:
      the response of the request
      Throws:
      LogbookClientServerException - if logbook internal resources exception occurred
    • traceabilityLfcUnit

      @POST @Path("/lifecycles/units/traceability") @Produces("application/json") public javax.ws.rs.core.Response traceabilityLfcUnit(@HeaderParam("X-Tenant-Id") String xTenantId) throws LogbookClientServerException
      launch the traceability for unit lifecycles
      Parameters:
      xTenantId - the tenant id
      Returns:
      the response of the request
      Throws:
      LogbookClientServerException - if logbook internal resources exception occurred
    • traceabilityLfcObjectGroup

      @POST @Path("/lifecycles/objectgroups/traceability") @Produces("application/json") public javax.ws.rs.core.Response traceabilityLfcObjectGroup(@HeaderParam("X-Tenant-Id") String xTenantId) throws LogbookClientServerException
      launch the traceability for object group lifecycles
      Parameters:
      xTenantId - the tenant id
      Returns:
      the response of the request
      Throws:
      LogbookClientServerException - if logbook internal resources exception occurred
    • traceabilityStorage

      @POST @Path("/storages/traceability") @Produces("application/json") public javax.ws.rs.core.Response traceabilityStorage(@HeaderParam("X-Tenant-Id") String xTenantId)
      launch the traceabiity for storage
      Parameters:
      xTenantId - the tenant id
      Returns:
      the response of the request
      Throws:
      LogbookClientServerException - if logbook internal resources exception occurred
    • storageLogBackup

      @POST @Path("storages/storagelogbackup") @Produces("application/json") public javax.ws.rs.core.Response storageLogBackup(@HeaderParam("X-Tenant-Id") String xTenantId)
      launch the traceabiity for storage
      Parameters:
      xTenantId - the tenant id
      Returns:
      the response of the request
      Throws:
      LogbookClientServerException - if logbook internal resources exception occurred
    • getLogbookResultByBrowser

      @POST @Path("/logbooks") @Produces("application/json") public javax.ws.rs.core.Response getLogbookResultByBrowser(@Context javax.servlet.http.HttpServletRequest request, @HeaderParam("X-Http-Method-Override") String xhttpOverride, @CookieParam("JSESSIONID") String sessionId, String options)
      Post used because Angular not support Get with body
      Parameters:
      request - the request
      xhttpOverride - the use of http override POST method
      sessionId - the id of session
      options - the option for creating query to find logbook
      Returns:
      Response
    • updateLinksBetweenAU

      @POST @Path("/updateLinks") @Produces("application/json") public javax.ws.rs.core.Response updateLinksBetweenAU(@Context javax.servlet.http.HttpServletRequest request, String select)
      Update link between 2 AU send in the select request
      Parameters:
      request - the HTTP request and all its context
      select - select query with the following structure: {parentId: 'id', childId: 'id', action: 'ADD/DELETE'}
    • getLogbookResult

      @GET @Path("/logbooks") @Produces("application/json") public javax.ws.rs.core.Response getLogbookResult(@Context javax.servlet.http.HttpServletRequest request, @CookieParam("JSESSIONID") String sessionId, String options)
      this method is used to request logbook with the Vitam DSL
      Parameters:
      request - request http
      sessionId - using for pagination
      options - JSON object representing the Vitam DSL query
      Returns:
      Response
    • getLogbookResultById

      @GET @Path("/logbooks/{idOperation}") @Produces("application/json") public javax.ws.rs.core.Response getLogbookResultById(@PathParam("idOperation") String operationId, @HeaderParam("X-Tenant-Id") String xTenantId)
      Parameters:
      operationId - id of operation
      xTenantId - the tenant id
      Returns:
      Response
    • downloadObjectAsStream

      @GET @Path("/logbooks/{idOperation}") @Produces("application/octet-stream") public void downloadObjectAsStream(@PathParam("idOperation") String operationId, @Suspended javax.ws.rs.container.AsyncResponse asyncResponse, @QueryParam("X-Tenant-Id") String xTenantId)
      Parameters:
      operationId - the operation id
      asyncResponse - the asynchronized response
      xTenantId - the tenant id
    • downloadObjectAsStreamForBrowser

      @GET @Path("/logbooks/{idOperation}/content") @Produces("application/octet-stream") public void downloadObjectAsStreamForBrowser(@PathParam("idOperation") String operationId, @Suspended javax.ws.rs.container.AsyncResponse asyncResponse, @QueryParam("X-Tenant-Id") Integer tenantId)
      This method exist only to download a file with a browser
      Parameters:
      operationId - the operation id
      asyncResponse - the asynchronized response
      tenantId - the working tenant
    • findAccessContract

      @POST @Path("/accesscontracts") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response findAccessContract(@Context javax.servlet.http.HttpServletRequest request, String select)
      Query to get Access contracts
      Parameters:
      request - HTTP request
      select - the query to find access contracts
      Returns:
      Response
    • getAndExecuteTestRequest

      @POST @Path("/dslQueryTest") @Produces("application/json") public javax.ws.rs.core.Response getAndExecuteTestRequest(@Context javax.servlet.http.HttpServletRequest request, @CookieParam("JSESSIONID") String sessionId, com.fasterxml.jackson.databind.JsonNode criteria)