Interface CollectExternalClient

    • Method Detail

      • getProjectById

        RequestResponse<com.fasterxml.jackson.databind.JsonNode> getProjectById​(VitamContext vitamContext,
                                                                                java.lang.String projectId)
                                                                         throws VitamClientException
        get a collect project Consume and produce MediaType.APPLICATION_JSON
        Returns:
        RequestResponse
        Throws:
        VitamClientException - exception occurs when parse operation failed
      • getTransactionByProjectId

        RequestResponse<com.fasterxml.jackson.databind.JsonNode> getTransactionByProjectId​(VitamContext vitamContext,
                                                                                           java.lang.String projectId)
                                                                                    throws VitamClientException
        get a collect transaction Consume and produce MediaType.APPLICATION_JSON
        Returns:
        RequestResponse
        Throws:
        VitamClientException - exception occurs when parse operation failed
      • getTransactionById

        RequestResponse<com.fasterxml.jackson.databind.JsonNode> getTransactionById​(VitamContext vitamContext,
                                                                                    java.lang.String transactionId)
                                                                             throws VitamClientException
        get a collect transaction by ID Consume and produce MediaType.APPLICATION_JSON
        Returns:
        RequestResponse
        Throws:
        VitamClientException - exception occurs when parse operation failed
      • getProjects

        RequestResponse<com.fasterxml.jackson.databind.JsonNode> getProjects​(VitamContext vitamContext)
                                                                      throws VitamClientException
        get all collect project by tenant Consume and produce MediaType.APPLICATION_JSON
        Parameters:
        vitamContext -
        Returns:
        RequestResponse
        Throws:
        VitamClientException - exception occurs when parse operation failed
      • deleteTransactionById

        RequestResponse<com.fasterxml.jackson.databind.JsonNode> deleteTransactionById​(VitamContext vitamContext,
                                                                                       java.lang.String transactionId)
                                                                                throws VitamClientException
        delete a collect transaction produce MediaType.APPLICATION_JSON
        Returns:
        RequestResponse
        Throws:
        VitamClientException - exception occurs when parse operation failed
      • deleteProjectById

        RequestResponse<com.fasterxml.jackson.databind.JsonNode> deleteProjectById​(VitamContext vitamContext,
                                                                                   java.lang.String projectId)
                                                                            throws VitamClientException
        delete a collect project produce MediaType.APPLICATION_JSON
        Returns:
        RequestResponse
        Throws:
        VitamClientException - exception occurs when parse operation failed
      • getUnitById

        RequestResponse<com.fasterxml.jackson.databind.JsonNode> getUnitById​(VitamContext vitamContext,
                                                                             java.lang.String unitId)
                                                                      throws VitamClientException
        get an archive unit by Id Consume and produce MediaType.APPLICATION_JSON
        Returns:
        RequestResponse
        Throws:
        VitamClientException - exception occurs when parse operation failed
      • getUnitsByTransaction

        RequestResponse<com.fasterxml.jackson.databind.JsonNode> getUnitsByTransaction​(VitamContext vitamContext,
                                                                                       java.lang.String transactionId,
                                                                                       com.fasterxml.jackson.databind.JsonNode query)
                                                                                throws VitamClientException
        get an archive unit by transaction Id Consume and produce MediaType.APPLICATION_JSON
        Returns:
        RequestResponse
        Throws:
        VitamClientException - exception occurs when parse operation failed
      • getObjectById

        RequestResponse<com.fasterxml.jackson.databind.JsonNode> getObjectById​(VitamContext vitamContext,
                                                                               java.lang.String gotId)
                                                                        throws VitamClientException
        get an object group by Id Consume and produce MediaType.APPLICATION_JSON
        Returns:
        RequestResponse
        Throws:
        VitamClientException - exception occurs when parse operation failed
      • initTransaction

        RequestResponse<com.fasterxml.jackson.databind.JsonNode> initTransaction​(VitamContext vitamContext,
                                                                                 TransactionDto transactionDto,
                                                                                 java.lang.String projectId)
                                                                          throws VitamClientException
        Initialize a collect transaction Consume and produce MediaType.APPLICATION_JSON
        Returns:
        RequestResponse guid created for the transaction
        Throws:
        VitamClientException - exception occurs when parse operation failed
      • uploadArchiveUnit

        RequestResponse<com.fasterxml.jackson.databind.JsonNode> uploadArchiveUnit​(VitamContext vitamContext,
                                                                                   com.fasterxml.jackson.databind.JsonNode unitJsonNode,
                                                                                   java.lang.String transactionId)
                                                                            throws VitamClientException
        ADD Archive Unit Consume and produce MediaType.APPLICATION_JSON
        Returns:
        RequestResponse Archive Unit saved
        Throws:
        VitamClientException - exception occurs when parse operation failed
      • addObjectGroup

        RequestResponse<com.fasterxml.jackson.databind.JsonNode> addObjectGroup​(VitamContext vitamContext,
                                                                                java.lang.String unitId,
                                                                                java.lang.Integer version,
                                                                                com.fasterxml.jackson.databind.JsonNode objectJsonNode,
                                                                                java.lang.String usage)
                                                                         throws VitamClientException
        ADD Object Group Consume and produce MediaType.APPLICATION_JSON
        Returns:
        RequestResponse objectgroup saved
        Throws:
        VitamClientException - exception occurs when parse operation failed
      • addBinary

        javax.ws.rs.core.Response addBinary​(VitamContext vitamContext,
                                            java.lang.String unitId,
                                            java.lang.Integer version,
                                            java.io.InputStream inputStreamUploaded,
                                            java.lang.String usage)
                                     throws VitamClientException
        ADD Binary Consume and produce MediaType.OCTET_STREAM
        Returns:
        Response
        Throws:
        VitamClientException - exception occurs when parse operation failed
      • uploadProjectZip

        RequestResponse<com.fasterxml.jackson.databind.JsonNode> uploadProjectZip​(VitamContext vitamContext,
                                                                                  java.lang.String transactionId,
                                                                                  java.io.InputStream inputStreamUploaded)
                                                                           throws VitamClientException
        Upload zip and consume Consume CommonMediaType.ZIP
        Returns:
        RequestResponse
        Throws:
        VitamClientException - exception occurs when parse operation failed
      • getObjectStreamByUnitId

        javax.ws.rs.core.Response getObjectStreamByUnitId​(VitamContext vitamContext,
                                                          java.lang.String unitId,
                                                          java.lang.String usage,
                                                          int version)
                                                   throws VitamClientException
        Get all AU attached to transactions related to project Id param
        Parameters:
        vitamContext - security context
        unitId - unit id
        usage - usage
        version - version
        Returns:
        Response
        Throws:
        VitamClientException - Thrown exception