Class WebApplicationResource

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      javax.ws.rs.core.Response createReadOrderRequest​(java.lang.String xTenantId, java.lang.String strategyId, java.lang.String offerId, java.lang.String dataType, java.lang.String uid)
      Create read order (read object from tape to local FS) for the given offerId, dataType and uid.
      javax.ws.rs.core.Response deleteObject​(java.lang.String xTenantId, java.lang.String uid, java.lang.String dataType, java.lang.String strategyId, java.lang.String offerId)  
      void downloadObjectAsStream​(java.lang.String operationId, javax.ws.rs.container.AsyncResponse asyncResponse, java.lang.String xTenantId)  
      void downloadObjectAsStreamForBrowser​(java.lang.String operationId, javax.ws.rs.container.AsyncResponse asyncResponse, java.lang.Integer tenantId)
      This method exist only to download a file with a browser
      javax.ws.rs.core.Response findAccessContract​(javax.servlet.http.HttpServletRequest request, java.lang.String select)
      Query to get Access contracts
      javax.ws.rs.core.Response getAndExecuteTestRequest​(javax.servlet.http.HttpServletRequest request, java.lang.String sessionId, com.fasterxml.jackson.databind.JsonNode criteria)  
      javax.ws.rs.core.Response getLogbookMessages()
      Retrieve all the messages for logbook
      javax.ws.rs.core.Response getLogbookResult​(javax.servlet.http.HttpServletRequest request, java.lang.String sessionId, java.lang.String options)
      this method is used to request logbook with the Vitam DSL
      javax.ws.rs.core.Response getLogbookResultByBrowser​(javax.servlet.http.HttpServletRequest request, java.lang.String xhttpOverride, java.lang.String sessionId, java.lang.String options)
      Post used because Angular not support Get with body
      javax.ws.rs.core.Response getLogbookResultById​(java.lang.String operationId, java.lang.String xTenantId)  
      javax.ws.rs.core.Response getLogbookStatistics​(java.lang.String operationId)
      Generates the logbook operation statistics file (cvs format) relative to the operation parameter
      javax.ws.rs.core.Response getObjectAsInputStreamAsync​(java.lang.String xTenantId, java.lang.String uid, java.lang.String dataType, java.lang.String strategyId, java.lang.String offerId)
      Retrieve an Object data as an input stream.
      javax.ws.rs.core.Response getReadOrderRequest​(java.lang.String xTenantId, java.lang.String strategyId, java.lang.String offerId, java.lang.String readOrderId)
      Check if the read order @readOrder is completed.
      javax.ws.rs.core.Response getSecureMode()
      Return authentication mode
      javax.ws.rs.core.Response getStrategies​(java.lang.String xTenantId)  
      javax.ws.rs.core.Response launchAudit​(java.lang.String xTenantId, java.lang.String xAccessContratId, java.lang.String operationId)
      Deprecated.
      javax.ws.rs.core.Response launchIngestCleanup​(java.lang.String xTenantId, java.lang.String xAccessContratId, java.lang.String operationId)  
      javax.ws.rs.core.Response login​(javax.servlet.http.HttpServletRequest httpRequest, com.fasterxml.jackson.databind.JsonNode object)  
      javax.ws.rs.core.Response traceability​(java.lang.String xTenantId)  
      javax.ws.rs.core.Response traceabilityLfcObjectGroup​(java.lang.String xTenantId)
      launch the traceability for object group lifecycles
      javax.ws.rs.core.Response traceabilityLfcUnit​(java.lang.String xTenantId)
      launch the traceability for unit lifecycles
      javax.ws.rs.core.Response traceabilityStorage​(java.lang.String xTenantId)
      launch the traceabiity for storage
      javax.ws.rs.core.Response updateLinksBetweenAU​(javax.servlet.http.HttpServletRequest request, java.lang.String select)
      Update link between 2 AU send in the select request
      javax.ws.rs.core.Response uploadObject​(java.lang.String xTenantId, java.lang.String uid, java.lang.String dataType, java.lang.String strategyId, java.lang.String offerId, java.lang.Long size, java.io.InputStream input)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_CONTRACT_NAME

        public static final java.lang.String DEFAULT_CONTRACT_NAME
        See Also:
        Constant Field Values
    • Method Detail

      • 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")
                                                      java.lang.String xTenantId,
                                                      @PathParam("uid")
                                                      java.lang.String uid,
                                                      @PathParam("dataType")
                                                      java.lang.String dataType,
                                                      @PathParam("strategyId")
                                                      java.lang.String strategyId,
                                                      @PathParam("offerId")
                                                      java.lang.String offerId,
                                                      @PathParam("size")
                                                      java.lang.Long size,
                                                      java.io.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")
                                                       java.lang.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")
                                                      java.lang.String xTenantId,
                                                      @PathParam("uid")
                                                      java.lang.String uid,
                                                      @PathParam("dataType")
                                                      java.lang.String dataType,
                                                      @PathParam("strategyId")
                                                      java.lang.String strategyId,
                                                      @PathParam("offerId")
                                                      java.lang.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")
                                                     java.lang.String xTenantId,
                                                     @HeaderParam("X-Access-Contract-Id")
                                                     java.lang.String xAccessContratId,
                                                     @PathParam("operationId")
                                                     java.lang.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")
                                                             java.lang.String xTenantId,
                                                             @HeaderParam("X-Access-Contract-Id")
                                                             java.lang.String xAccessContratId,
                                                             @PathParam("operationId")
                                                             java.lang.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")
                                                                     java.lang.String xTenantId,
                                                                     @PathParam("uid")
                                                                     java.lang.String uid,
                                                                     @PathParam("dataType")
                                                                     java.lang.String dataType,
                                                                     @PathParam("strategyId")
                                                                     java.lang.String strategyId,
                                                                     @PathParam("offerId")
                                                                     java.lang.String offerId)
        Retrieve an Object data as an input stream. Download by access.
      • createReadOrderRequest

        @POST
        @Path("/readorder/{strategyId}/{offerId}/{dataType}/{uid}")
        @Produces("application/json")
        public javax.ws.rs.core.Response createReadOrderRequest​(@HeaderParam("X-Tenant-Id")
                                                                java.lang.String xTenantId,
                                                                @PathParam("strategyId")
                                                                java.lang.String strategyId,
                                                                @PathParam("offerId")
                                                                java.lang.String offerId,
                                                                @PathParam("dataType")
                                                                java.lang.String dataType,
                                                                @PathParam("uid")
                                                                java.lang.String uid)
        Create read order (read object from tape to local FS) for the given offerId, dataType and uid.
      • getReadOrderRequest

        @GET
        @Path("/readorder/{strategyId}/{offerId}/{readOrderId}")
        @Consumes("application/json")
        public javax.ws.rs.core.Response getReadOrderRequest​(@HeaderParam("X-Tenant-Id")
                                                             java.lang.String xTenantId,
                                                             @PathParam("strategyId")
                                                             java.lang.String strategyId,
                                                             @PathParam("offerId")
                                                             java.lang.String offerId,
                                                             @PathParam("readOrderId")
                                                             java.lang.String readOrderId)
        Check if the read order @readOrder is completed.
      • 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")
                                                              java.lang.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")
                                                      java.lang.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")
                                                             java.lang.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")
                                                                    java.lang.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")
                                                             java.lang.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")
                                                                   java.lang.String xhttpOverride,
                                                                   @CookieParam("JSESSIONID")
                                                                   java.lang.String sessionId,
                                                                   java.lang.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,
                                                              java.lang.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")
                                                          java.lang.String sessionId,
                                                          java.lang.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")
                                                              java.lang.String operationId,
                                                              @HeaderParam("X-Tenant-Id")
                                                              java.lang.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")
                                           java.lang.String operationId,
                                           @Suspended
                                           javax.ws.rs.container.AsyncResponse asyncResponse,
                                           @QueryParam("X-Tenant-Id")
                                           java.lang.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")
                                                     java.lang.String operationId,
                                                     @Suspended
                                                     javax.ws.rs.container.AsyncResponse asyncResponse,
                                                     @QueryParam("X-Tenant-Id")
                                                     java.lang.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,
                                                            java.lang.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")
                                                                  java.lang.String sessionId,
                                                                  com.fasterxml.jackson.databind.JsonNode criteria)