@SuppressWarnings("unchecked") @Test public void testArchiveUnitDetailsAccessExternalClientServerException() throws Exception { final Map<String, String> searchCriteriaMap = new HashMap<>(); searchCriteriaMap.put(UiConstants.SELECT_BY_ID.toString(), "1"); searchCriteriaMap.put(dslQueryHelper.PROJECTION_DSL, GLOBAL.RULES.exactToken()); final JsonNode preparedDslQuery = JsonHandler.createObjectNode(); when(dslQueryHelper.createSelectDSLQuery(searchCriteriaMap)).thenReturn(preparedDslQuery); when( userInterfaceTransactionManager.getArchiveUnitDetails(any(), any(), any())) .thenThrow(VitamClientException.class); given().param("id", "1").header(GlobalDataRest.X_TENANT_ID, TENANT_ID) .header(GlobalDataRest.X_CSRF_TOKEN, tokenCSRF) .header(GlobalDataRest.X_ACCESS_CONTRAT_ID, CONTRACT_NAME).cookie(COOKIE).expect() .statusCode(Status.INTERNAL_SERVER_ERROR.getStatusCode()).when() .get("/archivesearch/unit/1"); }
@GET @Path("/archivesearch/unit/{id}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archivesearch:units:read") public Response getArchiveUnitDetails(@Context HttpServletRequest request, @PathParam("id") String unitId) { ParametersChecker.checkParameter(SEARCH_CRITERIA_MANDATORY_MSG, unitId); try { SanityChecker.checkJsonAll(JsonHandler.toJsonNode(unitId)); final Map<String, String> selectUnitIdMap = new HashMap<>(); selectUnitIdMap.put(dslQueryHelper.PROJECTION_DSL, BuilderToken.GLOBAL.RULES.exactToken()); JsonNode preparedQueryDsl = dslQueryHelper.createGetByIdDSLSelectMultipleQuery(selectUnitIdMap); final RequestResponse<JsonNode> archiveDetails = userInterfaceTransactionManager .getArchiveUnitDetails(preparedQueryDsl, unitId, userInterfaceTransactionManager.getVitamContext(request)); return archiveDetails.toResponse(); } catch (final InvalidCreateOperationException | InvalidParseOperationException e) { LOGGER.error(BAD_REQUEST_EXCEPTION_MSG, e); return Response.status(Status.BAD_REQUEST).build(); } catch (final AccessUnauthorizedException e) { LOGGER.error(ACCESS_SERVER_EXCEPTION_MSG, e); return Response.status(Status.UNAUTHORIZED).build(); } catch (final VitamClientException e) { LOGGER.error(ACCESS_SERVER_EXCEPTION_MSG, e); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } catch (final Exception e) { LOGGER.error(INTERNAL_SERVER_ERROR_MSG, e); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } }
WebApplicationResource extends ApplicationStatusResource { @GET @Path("/archivesearch/unit/{id}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archivesearch:units:read") public Response getArchiveUnitDetails(@Context HttpServletRequest request, @PathParam("id") String unitId) { ParametersChecker.checkParameter(SEARCH_CRITERIA_MANDATORY_MSG, unitId); try { SanityChecker.checkJsonAll(JsonHandler.toJsonNode(unitId)); final Map<String, String> selectUnitIdMap = new HashMap<>(); selectUnitIdMap.put(dslQueryHelper.PROJECTION_DSL, BuilderToken.GLOBAL.RULES.exactToken()); JsonNode preparedQueryDsl = dslQueryHelper.createGetByIdDSLSelectMultipleQuery(selectUnitIdMap); final RequestResponse<JsonNode> archiveDetails = userInterfaceTransactionManager .getArchiveUnitDetails(preparedQueryDsl, unitId, userInterfaceTransactionManager.getVitamContext(request)); return archiveDetails.toResponse(); } catch (final InvalidCreateOperationException | InvalidParseOperationException e) { LOGGER.error(BAD_REQUEST_EXCEPTION_MSG, e); return Response.status(Status.BAD_REQUEST).build(); } catch (final AccessUnauthorizedException e) { LOGGER.error(ACCESS_SERVER_EXCEPTION_MSG, e); return Response.status(Status.UNAUTHORIZED).build(); } catch (final VitamClientException e) { LOGGER.error(ACCESS_SERVER_EXCEPTION_MSG, e); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } catch (final Exception e) { LOGGER.error(INTERNAL_SERVER_ERROR_MSG, e); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } } }
WebApplicationResource extends ApplicationStatusResource { @GET @Path("/archivesearch/unit/{id}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archivesearch:units:read") public Response getArchiveUnitDetails(@Context HttpServletRequest request, @PathParam("id") String unitId) { ParametersChecker.checkParameter(SEARCH_CRITERIA_MANDATORY_MSG, unitId); try { SanityChecker.checkJsonAll(JsonHandler.toJsonNode(unitId)); final Map<String, String> selectUnitIdMap = new HashMap<>(); selectUnitIdMap.put(dslQueryHelper.PROJECTION_DSL, BuilderToken.GLOBAL.RULES.exactToken()); JsonNode preparedQueryDsl = dslQueryHelper.createGetByIdDSLSelectMultipleQuery(selectUnitIdMap); final RequestResponse<JsonNode> archiveDetails = userInterfaceTransactionManager .getArchiveUnitDetails(preparedQueryDsl, unitId, userInterfaceTransactionManager.getVitamContext(request)); return archiveDetails.toResponse(); } catch (final InvalidCreateOperationException | InvalidParseOperationException e) { LOGGER.error(BAD_REQUEST_EXCEPTION_MSG, e); return Response.status(Status.BAD_REQUEST).build(); } catch (final AccessUnauthorizedException e) { LOGGER.error(ACCESS_SERVER_EXCEPTION_MSG, e); return Response.status(Status.UNAUTHORIZED).build(); } catch (final VitamClientException e) { LOGGER.error(ACCESS_SERVER_EXCEPTION_MSG, e); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } catch (final Exception e) { LOGGER.error(INTERNAL_SERVER_ERROR_MSG, e); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } } WebApplicationResource(Set<String> permissions,
        WebApplicationConfig webApplicationConfig); @VisibleForTesting  WebApplicationResource(Set<String> permissions,
        WebApplicationConfig webApplicationConfig, IngestExternalClientFactory ingestExternalClientFactory,
        AdminExternalClientFactory adminExternalClientFactory,
        UserInterfaceTransactionManager userInterfaceTransactionManager,
        DslQueryHelper dslQueryHelper, PaginationHelper paginationHelper); }
WebApplicationResource extends ApplicationStatusResource { @GET @Path("/archivesearch/unit/{id}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archivesearch:units:read") public Response getArchiveUnitDetails(@Context HttpServletRequest request, @PathParam("id") String unitId) { ParametersChecker.checkParameter(SEARCH_CRITERIA_MANDATORY_MSG, unitId); try { SanityChecker.checkJsonAll(JsonHandler.toJsonNode(unitId)); final Map<String, String> selectUnitIdMap = new HashMap<>(); selectUnitIdMap.put(dslQueryHelper.PROJECTION_DSL, BuilderToken.GLOBAL.RULES.exactToken()); JsonNode preparedQueryDsl = dslQueryHelper.createGetByIdDSLSelectMultipleQuery(selectUnitIdMap); final RequestResponse<JsonNode> archiveDetails = userInterfaceTransactionManager .getArchiveUnitDetails(preparedQueryDsl, unitId, userInterfaceTransactionManager.getVitamContext(request)); return archiveDetails.toResponse(); } catch (final InvalidCreateOperationException | InvalidParseOperationException e) { LOGGER.error(BAD_REQUEST_EXCEPTION_MSG, e); return Response.status(Status.BAD_REQUEST).build(); } catch (final AccessUnauthorizedException e) { LOGGER.error(ACCESS_SERVER_EXCEPTION_MSG, e); return Response.status(Status.UNAUTHORIZED).build(); } catch (final VitamClientException e) { LOGGER.error(ACCESS_SERVER_EXCEPTION_MSG, e); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } catch (final Exception e) { LOGGER.error(INTERNAL_SERVER_ERROR_MSG, e); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } } WebApplicationResource(Set<String> permissions,
        WebApplicationConfig webApplicationConfig); @VisibleForTesting  WebApplicationResource(Set<String> permissions,
        WebApplicationConfig webApplicationConfig, IngestExternalClientFactory ingestExternalClientFactory,
        AdminExternalClientFactory adminExternalClientFactory,
        UserInterfaceTransactionManager userInterfaceTransactionManager,
        DslQueryHelper dslQueryHelper, PaginationHelper paginationHelper); @GET @Path("/messages/logbook") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("messages:logbook:read") Response getLogbookMessages(); @POST @Path("/archivesearch/units") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archivesearch:units:read") Response getArchiveSearchResult(@Context HttpServletRequest request,
        @CookieParam("JSESSIONID") String sessionId,
        String criteria); @GET @Path("/archivesearch/unit/{id}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archivesearch:units:read") Response getArchiveUnitDetails(@Context HttpServletRequest request, @PathParam("id") String unitId); @GET @Path("/archivesearch/unitsWithInheritedRules/{id}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archivesearch:units:read") Response getArchiveUnitDetailsWithInheritance(@Context HttpServletRequest request,
        @PathParam("id") String unitId); @POST @Path("/logbook/operations") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("logbook:operations:read") Response getLogbookResult(@Context HttpServletRequest request, @CookieParam("JSESSIONID") String sessionId,
        String options); @POST @Path("/logbook/operations/last") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("logbook:operations:read") Response getLogbookResultLast(@Context HttpServletRequest request, JsonNode query); @POST @Path("/logbook/operations/{idOperation}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("logbook:operations:read") Response getLogbookResultById(@Context HttpServletRequest request,
        @PathParam("idOperation") String operationId,
        String options); @Path("ingest/upload") @POST @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("ingest:create") Response ingest(@Context HttpServletResponse response,
        @Context HttpServletRequest request, byte[] stream); @Path("check/{id_op}") @GET @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("check:read") Response checkUploadOperation(@PathParam("id_op") String operationId, @Context HttpServletRequest request,
        @QueryParam("action") String action); @Path("clear/{id_op}") @GET @RequiresPermissions("clear:delete") Response clearUploadOperationHistory(@PathParam("id_op") String operationId); @POST @Path("/elimination/analysis") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("elimination:analysis") Response startEliminationAnalysis(@Context HttpServletRequest request, String updateSet); @POST @Path("/elimination/action") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("elimination:action") Response startEliminationAction(@Context HttpServletRequest request, String updateSet); @POST @Path("/archiveupdate/units") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveupdate:units:update") Response massiveArchiveUnitUpdate(@Context HttpServletRequest request, String updateSet); @POST @Path("/archiveupdate/units/{id}") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveupdate:units:update") Response updateArchiveUnitDetails(@Context HttpServletRequest request, @PathParam("id") String unitId,
        String updateSet); @POST @Path("/admin/formats") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:formats:read") Response getFileFormats(@Context HttpServletRequest request, @CookieParam("JSESSIONID") String sessionId,
        String options); @POST @Path("/admin/formats/{idFormat:.+}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:formats:read") Response getFormatById(@Context HttpServletRequest request, @PathParam("idFormat") String formatId,
        String options); @POST @Path("/format/check") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("format:check") Response checkRefFormat(@Context HttpServletRequest request, InputStream input); @POST @Path("/format/upload") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("format:create") Response uploadRefFormat(@Context HttpServletRequest request, InputStream input); @GET @Path("/archiveunit/objects/{idOG}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveunit:objects:read") Response getArchiveObjectGroup(@Context HttpServletRequest request,
        @PathParam("idOG") String objectGroupId); @GET @Path("/archiveunit/objects/download/{unitId}") @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("archiveunit:objects:read") void getObjectAsInputStreamAsync(@PathParam("unitId") String unitId,
        @QueryParam("usage") String usage, @QueryParam("filename") String filename,
        @QueryParam("tenantId") Integer tenantId,
        @QueryParam("contractId") String contractId,
        @Suspended final AsyncResponse asyncResponse); @GET @Path("/ingests/{idObject}/{type}") @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("ingests:read") void getObjectFromStorageAsInputStreamAsync(@Context HttpServletRequest request,
        @PathParam("idObject") String objectId, @PathParam("type") String type,
        @Suspended final AsyncResponse asyncResponse); @POST @Path("/admin/rules") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:rules:read") Response getFileRules(@Context HttpServletRequest request, @CookieParam("JSESSIONID") String sessionId,
        String options); @POST @Path("/admin/rules/{id_rule}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:rules:read") Response getRuleById(@Context HttpServletRequest request, @PathParam("id_rule") String ruleId,
        String options); @GET @Path("/rules/report/download/{id}") @Produces(MediaType.APPLICATION_OCTET_STREAM) Response downloadRulesReport(@Context HttpServletRequest request, @PathParam("id") String id); @GET @Path("/report/distribution/download/{id}") @Produces(MediaType.APPLICATION_OCTET_STREAM) Response downloadDistributionReport(@Context HttpServletRequest request, @PathParam("id") String id); @GET @Path("/report/batchreport/download/{id}") @Produces(MediaType.APPLICATION_OCTET_STREAM) Response downloadBatchReport(@Context HttpServletRequest request, @PathParam("id") String id); @GET @Path("/referential/download/{id}/{type}") @Produces(MediaType.APPLICATION_OCTET_STREAM) Response downloadCsvReferential(@Context HttpServletRequest request,
        @PathParam("id") String id, @PathParam("type") String type); @POST @Path("/rules/check") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("rules:create") void checkRefRule(@Context HttpServletRequest request, InputStream input,
        @Suspended final AsyncResponse asyncResponse); @POST @Path("/rules/upload") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("rules:create") Response uploadRefRule(@Context HttpServletRequest request, InputStream input); @POST @Path("/admin/accession-register") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:accession-register:read") Response getAccessionRegister(@Context HttpServletRequest request,
        @CookieParam("JSESSIONID") String sessionId, String options); @POST @Path("/admin/accession-register/symbolic") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:accessionregisterssymbolic:read") Response getAccessionRegisterSymbolic(@Context HttpServletRequest request,
        @CookieParam("JSESSIONID") String sessionId, String options); @POST @Path("/admin/accession-register/{originatingAgency}/accession-register-detail") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:accession-register:read") Response getAccessionRegisterDetail(@Context HttpServletRequest request,
        @PathParam("originatingAgency") String originatingAgency,
        @CookieParam("JSESSIONID") String sessionId,
        String options); @POST @Path("/archiveunit/tree") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveunit:tree:read") Response getUnitTree(@Context HttpServletRequest request, JsonNode dslQuery); @POST @Path("login") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response login(@Context HttpServletRequest request, @Context HttpServletRequest httpRequest,
        JsonNode object); @GET @Path("permissions") @Produces(MediaType.APPLICATION_JSON) Response getPermissions(@Context HttpServletRequest httpRequest); @GET @Path("/logbookunitlifecycles/{id_lc}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("logbookunitlifecycles:read") Response getUnitLifeCycleById(@Context HttpServletRequest request,
        @PathParam("id_lc") String unitLifeCycleId); @GET @Path("/logbookobjectslifecycles/{id_lc}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("logbookobjectslifecycles:read") Response getObjectGroupLifeCycleById(@Context HttpServletRequest request,
        @PathParam("id_lc") String objectGroupLifeCycleId); @POST @Path("/operations") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("operations:read") Response listOperationsDetails(@Context HttpServletRequest request, ProcessQuery query); @Path("operations/{id}") @PUT @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("operations:update") Response updateWorkFlowStatus(@Context HttpServletRequest request, @PathParam("id") String id); @DELETE @Path("/operations/{id}") @RequiresPermissions("operations:delete") Response cancelProcess(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/contracts") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("contracts:create") Response uploadRefContracts(@Context HttpServletRequest request, InputStream input); @POST @Path("/contracts") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("contracts:read") Response findIngestContracts(@Context HttpServletRequest request, String select); @GET @Path("/contracts/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("contracts:read") Response findContractsById(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/contracts/{id}") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @RequiresPermissions("contracts:update") Response updateIngestContracts(@Context HttpServletRequest request, @PathParam("id") String contractId,
        JsonNode updateOptions); @POST @Path("/accesscontracts") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("accesscontracts:create") Response uploadAccessContracts(@Context HttpServletRequest request, InputStream input); @POST @Path("/accesscontracts") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("accesscontracts:read") Response findAccessContracts(@Context HttpServletRequest request, String select); @GET @Path("/accesscontracts/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("accesscontracts:read") Response findAccessContract(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/accesscontracts/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("accesscontracts:update") Response updateAccessContracts(@Context HttpServletRequest request, @PathParam("id") String contractId,
        JsonNode updateOptions); @POST @Path("/managementcontracts") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("managementcontracts:create") Response uploadManagementContracts(@Context HttpServletRequest request, InputStream input); @POST @Path("/managementcontracts") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("managementcontracts:read") Response findManagementContracts(@Context HttpServletRequest request, String select); @GET @Path("/managementcontracts/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("managementcontracts:read") Response findManagementContract(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/managementcontracts/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("managementcontracts:update") Response updateManagementContracts(@Context HttpServletRequest request, @PathParam("id") String contractId,
                                          JsonNode updateOptions); @POST @Path("/contexts/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("contexts:update") Response updateContexts(@Context HttpServletRequest request, @PathParam("id") String contextId,
        JsonNode updateOptions); @POST @Path("/contexts") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("contexts:create") Response uploadContext(@Context HttpServletRequest request, InputStream input); @POST @Path("/contexts") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("contexts:read") Response findContext(@Context HttpServletRequest request, String select); @GET @Path("/contexts/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("contexts:read") Response findContextByID(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/profiles") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("profiles:create") Response createProfilesMetadata(@Context HttpServletRequest request, InputStream input); @PUT @Path("/profiles/{id}") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("profiles:create") Response importProfileFile(@Context HttpServletRequest request, InputStream input,
        @PathParam("id") String id); @PUT @Path("/profiles/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("profiles:update") Response updateProfile(@Context HttpServletRequest request, @PathParam("id") String profileMetadataId,
        JsonNode updateOptions); @GET @Path("/profiles/{id}") @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("profiles:read") void downloadProfileFile(@Context HttpServletRequest request, @PathParam("id") String profileMetadataId,
        @Suspended final AsyncResponse asyncResponse); @POST @Path("/profiles") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("profiles:read") Response findProfiles(@Context HttpServletRequest request, String select); @GET @Path("/profiles/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("profiles:read") Response findProfileByID(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/traceability/check") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("traceability:check:create") Response checkOperationTraceability(@Context HttpServletRequest request, String operationCriteria); @GET @Path("/traceability/{idOperation}/content") @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("traceability:content:read") void downloadTraceabilityFile(@Context HttpServletRequest request,
        @PathParam("idOperation") String operationId,
        @QueryParam("contractId") String contractId, @QueryParam("tenantId") String tenantIdParam,
        @Suspended final AsyncResponse asyncResponse); @POST @Path("/traceability/extractTimestamp") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @RequiresPermissions("logbook:operations:read") Response extractTimeStampInformation(String timestamp); @GET @Path("/workflows") @Produces(MediaType.APPLICATION_JSON) Response getWorkflowDefinitions(@Context HttpServletRequest request); @POST @Path("/audits") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:audit") Response launchAudit(@Context HttpServletRequest request, JsonNode auditOption); @POST @Path("/agencies") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("agencies:create") Response uploadServiceAgencies(@Context HttpServletRequest request, InputStream input); @POST @Path("/agencies") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("agencies:read") Response findServiceAgencies(@Context HttpServletRequest request, String select); @GET @Path("/agencies/{id:.+}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("agencies:read") Response findServiceAgencyById(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/archiveunitprofiles") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveunitprofiles:create") Response createArchiveUnitProfileMetadata(@Context HttpServletRequest request, InputStream input); @PUT @Path("/archiveunitprofiles/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveunitprofiles:update") Response updateArchiveUnitProfile(@Context HttpServletRequest request,
        @PathParam("id") String archiveUnitprofileId,
        JsonNode updateOptions); @POST @Path("/archiveunitprofiles") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveunitprofiles:read") Response findArchiveUnitProfiles(@Context HttpServletRequest request, String select); @GET @Path("/archiveunitprofiles/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveunitprofiles:read") Response findArchiveUnitProfileByID(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/ontologies") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("ontologies:create") Response importOntologies(@HeaderParam(GlobalDataRest.FORCE_UPDATE) boolean forceUpdate,
        @Context HttpServletRequest request, InputStream input); @POST @Path("/ontologies") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("ontologies:read") Response findOntologies(@Context HttpServletRequest request, String select); @GET @Path("/ontologies/{id:.+}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("ontologies:read") Response findOntologyById(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/archiveunit/evidenceaudit") @RequiresPermissions("evidenceaudit:check") Response launchEvidanceAudit(@Context HttpServletRequest request, String criteria); @POST @Path("/archiveunit/probativevalueexport") @RequiresPermissions("probativevalue:check") Response exportProbativeValue(@Context HttpServletRequest request, String criteria); @POST @Path("/archiveunit/dipexport") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("dipexportv2:create") Response createDIPForExport(@Context HttpServletRequest request, DipRequest criteria); @POST @Path("/archiveunit/transfers") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("transfers:create") Response createTransferSIP(@Context HttpServletRequest request, TransferRequest criteria); @GET @Path("/archiveunit/dipexport/{id}") @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("dipexport:read") void getDIPAsInputStreamAsync(@Context HttpServletRequest request,
        @PathParam("id") String id, @Suspended final AsyncResponse asyncResponse); @GET @Path("/archiveunit/transfers/{id}") @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("transfers:read") void getTransferSIPAsInputStreamAsync(@Context HttpServletRequest request,
        @PathParam("id") String id, @Suspended final AsyncResponse asyncResponse); @POST @Path("/archiveunit/computedinheritedrules") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveupdate:units:update") Response computedInheritedRules(@Context HttpServletRequest request, String Query); @POST @Path("/archiveunit/deletecomputedinheritedrules") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveupdate:units:update") Response deleteComputedInheritedRules(@Context HttpServletRequest request, String Query); @GET @Path("/securemode") @Produces(MediaType.APPLICATION_JSON) Response getSecureMode(); @GET @Path("/admintenant") @Produces(MediaType.APPLICATION_JSON) Response getAdminTenant(); @POST @Path("/objectssearch/objects") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("objects:read") Response getObjectsSearchResult(@Context HttpServletRequest request,
        @CookieParam("JSESSIONID") String sessionId,
        String criteria); }
WebApplicationResource extends ApplicationStatusResource { @GET @Path("/archivesearch/unit/{id}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archivesearch:units:read") public Response getArchiveUnitDetails(@Context HttpServletRequest request, @PathParam("id") String unitId) { ParametersChecker.checkParameter(SEARCH_CRITERIA_MANDATORY_MSG, unitId); try { SanityChecker.checkJsonAll(JsonHandler.toJsonNode(unitId)); final Map<String, String> selectUnitIdMap = new HashMap<>(); selectUnitIdMap.put(dslQueryHelper.PROJECTION_DSL, BuilderToken.GLOBAL.RULES.exactToken()); JsonNode preparedQueryDsl = dslQueryHelper.createGetByIdDSLSelectMultipleQuery(selectUnitIdMap); final RequestResponse<JsonNode> archiveDetails = userInterfaceTransactionManager .getArchiveUnitDetails(preparedQueryDsl, unitId, userInterfaceTransactionManager.getVitamContext(request)); return archiveDetails.toResponse(); } catch (final InvalidCreateOperationException | InvalidParseOperationException e) { LOGGER.error(BAD_REQUEST_EXCEPTION_MSG, e); return Response.status(Status.BAD_REQUEST).build(); } catch (final AccessUnauthorizedException e) { LOGGER.error(ACCESS_SERVER_EXCEPTION_MSG, e); return Response.status(Status.UNAUTHORIZED).build(); } catch (final VitamClientException e) { LOGGER.error(ACCESS_SERVER_EXCEPTION_MSG, e); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } catch (final Exception e) { LOGGER.error(INTERNAL_SERVER_ERROR_MSG, e); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } } WebApplicationResource(Set<String> permissions,
        WebApplicationConfig webApplicationConfig); @VisibleForTesting  WebApplicationResource(Set<String> permissions,
        WebApplicationConfig webApplicationConfig, IngestExternalClientFactory ingestExternalClientFactory,
        AdminExternalClientFactory adminExternalClientFactory,
        UserInterfaceTransactionManager userInterfaceTransactionManager,
        DslQueryHelper dslQueryHelper, PaginationHelper paginationHelper); @GET @Path("/messages/logbook") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("messages:logbook:read") Response getLogbookMessages(); @POST @Path("/archivesearch/units") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archivesearch:units:read") Response getArchiveSearchResult(@Context HttpServletRequest request,
        @CookieParam("JSESSIONID") String sessionId,
        String criteria); @GET @Path("/archivesearch/unit/{id}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archivesearch:units:read") Response getArchiveUnitDetails(@Context HttpServletRequest request, @PathParam("id") String unitId); @GET @Path("/archivesearch/unitsWithInheritedRules/{id}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archivesearch:units:read") Response getArchiveUnitDetailsWithInheritance(@Context HttpServletRequest request,
        @PathParam("id") String unitId); @POST @Path("/logbook/operations") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("logbook:operations:read") Response getLogbookResult(@Context HttpServletRequest request, @CookieParam("JSESSIONID") String sessionId,
        String options); @POST @Path("/logbook/operations/last") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("logbook:operations:read") Response getLogbookResultLast(@Context HttpServletRequest request, JsonNode query); @POST @Path("/logbook/operations/{idOperation}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("logbook:operations:read") Response getLogbookResultById(@Context HttpServletRequest request,
        @PathParam("idOperation") String operationId,
        String options); @Path("ingest/upload") @POST @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("ingest:create") Response ingest(@Context HttpServletResponse response,
        @Context HttpServletRequest request, byte[] stream); @Path("check/{id_op}") @GET @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("check:read") Response checkUploadOperation(@PathParam("id_op") String operationId, @Context HttpServletRequest request,
        @QueryParam("action") String action); @Path("clear/{id_op}") @GET @RequiresPermissions("clear:delete") Response clearUploadOperationHistory(@PathParam("id_op") String operationId); @POST @Path("/elimination/analysis") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("elimination:analysis") Response startEliminationAnalysis(@Context HttpServletRequest request, String updateSet); @POST @Path("/elimination/action") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("elimination:action") Response startEliminationAction(@Context HttpServletRequest request, String updateSet); @POST @Path("/archiveupdate/units") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveupdate:units:update") Response massiveArchiveUnitUpdate(@Context HttpServletRequest request, String updateSet); @POST @Path("/archiveupdate/units/{id}") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveupdate:units:update") Response updateArchiveUnitDetails(@Context HttpServletRequest request, @PathParam("id") String unitId,
        String updateSet); @POST @Path("/admin/formats") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:formats:read") Response getFileFormats(@Context HttpServletRequest request, @CookieParam("JSESSIONID") String sessionId,
        String options); @POST @Path("/admin/formats/{idFormat:.+}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:formats:read") Response getFormatById(@Context HttpServletRequest request, @PathParam("idFormat") String formatId,
        String options); @POST @Path("/format/check") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("format:check") Response checkRefFormat(@Context HttpServletRequest request, InputStream input); @POST @Path("/format/upload") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("format:create") Response uploadRefFormat(@Context HttpServletRequest request, InputStream input); @GET @Path("/archiveunit/objects/{idOG}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveunit:objects:read") Response getArchiveObjectGroup(@Context HttpServletRequest request,
        @PathParam("idOG") String objectGroupId); @GET @Path("/archiveunit/objects/download/{unitId}") @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("archiveunit:objects:read") void getObjectAsInputStreamAsync(@PathParam("unitId") String unitId,
        @QueryParam("usage") String usage, @QueryParam("filename") String filename,
        @QueryParam("tenantId") Integer tenantId,
        @QueryParam("contractId") String contractId,
        @Suspended final AsyncResponse asyncResponse); @GET @Path("/ingests/{idObject}/{type}") @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("ingests:read") void getObjectFromStorageAsInputStreamAsync(@Context HttpServletRequest request,
        @PathParam("idObject") String objectId, @PathParam("type") String type,
        @Suspended final AsyncResponse asyncResponse); @POST @Path("/admin/rules") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:rules:read") Response getFileRules(@Context HttpServletRequest request, @CookieParam("JSESSIONID") String sessionId,
        String options); @POST @Path("/admin/rules/{id_rule}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:rules:read") Response getRuleById(@Context HttpServletRequest request, @PathParam("id_rule") String ruleId,
        String options); @GET @Path("/rules/report/download/{id}") @Produces(MediaType.APPLICATION_OCTET_STREAM) Response downloadRulesReport(@Context HttpServletRequest request, @PathParam("id") String id); @GET @Path("/report/distribution/download/{id}") @Produces(MediaType.APPLICATION_OCTET_STREAM) Response downloadDistributionReport(@Context HttpServletRequest request, @PathParam("id") String id); @GET @Path("/report/batchreport/download/{id}") @Produces(MediaType.APPLICATION_OCTET_STREAM) Response downloadBatchReport(@Context HttpServletRequest request, @PathParam("id") String id); @GET @Path("/referential/download/{id}/{type}") @Produces(MediaType.APPLICATION_OCTET_STREAM) Response downloadCsvReferential(@Context HttpServletRequest request,
        @PathParam("id") String id, @PathParam("type") String type); @POST @Path("/rules/check") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("rules:create") void checkRefRule(@Context HttpServletRequest request, InputStream input,
        @Suspended final AsyncResponse asyncResponse); @POST @Path("/rules/upload") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("rules:create") Response uploadRefRule(@Context HttpServletRequest request, InputStream input); @POST @Path("/admin/accession-register") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:accession-register:read") Response getAccessionRegister(@Context HttpServletRequest request,
        @CookieParam("JSESSIONID") String sessionId, String options); @POST @Path("/admin/accession-register/symbolic") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:accessionregisterssymbolic:read") Response getAccessionRegisterSymbolic(@Context HttpServletRequest request,
        @CookieParam("JSESSIONID") String sessionId, String options); @POST @Path("/admin/accession-register/{originatingAgency}/accession-register-detail") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:accession-register:read") Response getAccessionRegisterDetail(@Context HttpServletRequest request,
        @PathParam("originatingAgency") String originatingAgency,
        @CookieParam("JSESSIONID") String sessionId,
        String options); @POST @Path("/archiveunit/tree") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveunit:tree:read") Response getUnitTree(@Context HttpServletRequest request, JsonNode dslQuery); @POST @Path("login") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response login(@Context HttpServletRequest request, @Context HttpServletRequest httpRequest,
        JsonNode object); @GET @Path("permissions") @Produces(MediaType.APPLICATION_JSON) Response getPermissions(@Context HttpServletRequest httpRequest); @GET @Path("/logbookunitlifecycles/{id_lc}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("logbookunitlifecycles:read") Response getUnitLifeCycleById(@Context HttpServletRequest request,
        @PathParam("id_lc") String unitLifeCycleId); @GET @Path("/logbookobjectslifecycles/{id_lc}") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("logbookobjectslifecycles:read") Response getObjectGroupLifeCycleById(@Context HttpServletRequest request,
        @PathParam("id_lc") String objectGroupLifeCycleId); @POST @Path("/operations") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("operations:read") Response listOperationsDetails(@Context HttpServletRequest request, ProcessQuery query); @Path("operations/{id}") @PUT @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("operations:update") Response updateWorkFlowStatus(@Context HttpServletRequest request, @PathParam("id") String id); @DELETE @Path("/operations/{id}") @RequiresPermissions("operations:delete") Response cancelProcess(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/contracts") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("contracts:create") Response uploadRefContracts(@Context HttpServletRequest request, InputStream input); @POST @Path("/contracts") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("contracts:read") Response findIngestContracts(@Context HttpServletRequest request, String select); @GET @Path("/contracts/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("contracts:read") Response findContractsById(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/contracts/{id}") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @RequiresPermissions("contracts:update") Response updateIngestContracts(@Context HttpServletRequest request, @PathParam("id") String contractId,
        JsonNode updateOptions); @POST @Path("/accesscontracts") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("accesscontracts:create") Response uploadAccessContracts(@Context HttpServletRequest request, InputStream input); @POST @Path("/accesscontracts") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("accesscontracts:read") Response findAccessContracts(@Context HttpServletRequest request, String select); @GET @Path("/accesscontracts/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("accesscontracts:read") Response findAccessContract(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/accesscontracts/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("accesscontracts:update") Response updateAccessContracts(@Context HttpServletRequest request, @PathParam("id") String contractId,
        JsonNode updateOptions); @POST @Path("/managementcontracts") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("managementcontracts:create") Response uploadManagementContracts(@Context HttpServletRequest request, InputStream input); @POST @Path("/managementcontracts") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("managementcontracts:read") Response findManagementContracts(@Context HttpServletRequest request, String select); @GET @Path("/managementcontracts/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("managementcontracts:read") Response findManagementContract(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/managementcontracts/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("managementcontracts:update") Response updateManagementContracts(@Context HttpServletRequest request, @PathParam("id") String contractId,
                                          JsonNode updateOptions); @POST @Path("/contexts/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("contexts:update") Response updateContexts(@Context HttpServletRequest request, @PathParam("id") String contextId,
        JsonNode updateOptions); @POST @Path("/contexts") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("contexts:create") Response uploadContext(@Context HttpServletRequest request, InputStream input); @POST @Path("/contexts") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("contexts:read") Response findContext(@Context HttpServletRequest request, String select); @GET @Path("/contexts/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("contexts:read") Response findContextByID(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/profiles") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("profiles:create") Response createProfilesMetadata(@Context HttpServletRequest request, InputStream input); @PUT @Path("/profiles/{id}") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("profiles:create") Response importProfileFile(@Context HttpServletRequest request, InputStream input,
        @PathParam("id") String id); @PUT @Path("/profiles/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("profiles:update") Response updateProfile(@Context HttpServletRequest request, @PathParam("id") String profileMetadataId,
        JsonNode updateOptions); @GET @Path("/profiles/{id}") @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("profiles:read") void downloadProfileFile(@Context HttpServletRequest request, @PathParam("id") String profileMetadataId,
        @Suspended final AsyncResponse asyncResponse); @POST @Path("/profiles") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("profiles:read") Response findProfiles(@Context HttpServletRequest request, String select); @GET @Path("/profiles/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("profiles:read") Response findProfileByID(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/traceability/check") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("traceability:check:create") Response checkOperationTraceability(@Context HttpServletRequest request, String operationCriteria); @GET @Path("/traceability/{idOperation}/content") @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("traceability:content:read") void downloadTraceabilityFile(@Context HttpServletRequest request,
        @PathParam("idOperation") String operationId,
        @QueryParam("contractId") String contractId, @QueryParam("tenantId") String tenantIdParam,
        @Suspended final AsyncResponse asyncResponse); @POST @Path("/traceability/extractTimestamp") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @RequiresPermissions("logbook:operations:read") Response extractTimeStampInformation(String timestamp); @GET @Path("/workflows") @Produces(MediaType.APPLICATION_JSON) Response getWorkflowDefinitions(@Context HttpServletRequest request); @POST @Path("/audits") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("admin:audit") Response launchAudit(@Context HttpServletRequest request, JsonNode auditOption); @POST @Path("/agencies") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("agencies:create") Response uploadServiceAgencies(@Context HttpServletRequest request, InputStream input); @POST @Path("/agencies") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("agencies:read") Response findServiceAgencies(@Context HttpServletRequest request, String select); @GET @Path("/agencies/{id:.+}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("agencies:read") Response findServiceAgencyById(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/archiveunitprofiles") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveunitprofiles:create") Response createArchiveUnitProfileMetadata(@Context HttpServletRequest request, InputStream input); @PUT @Path("/archiveunitprofiles/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveunitprofiles:update") Response updateArchiveUnitProfile(@Context HttpServletRequest request,
        @PathParam("id") String archiveUnitprofileId,
        JsonNode updateOptions); @POST @Path("/archiveunitprofiles") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveunitprofiles:read") Response findArchiveUnitProfiles(@Context HttpServletRequest request, String select); @GET @Path("/archiveunitprofiles/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveunitprofiles:read") Response findArchiveUnitProfileByID(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/ontologies") @Consumes(MediaType.APPLICATION_OCTET_STREAM) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("ontologies:create") Response importOntologies(@HeaderParam(GlobalDataRest.FORCE_UPDATE) boolean forceUpdate,
        @Context HttpServletRequest request, InputStream input); @POST @Path("/ontologies") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("ontologies:read") Response findOntologies(@Context HttpServletRequest request, String select); @GET @Path("/ontologies/{id:.+}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("ontologies:read") Response findOntologyById(@Context HttpServletRequest request, @PathParam("id") String id); @POST @Path("/archiveunit/evidenceaudit") @RequiresPermissions("evidenceaudit:check") Response launchEvidanceAudit(@Context HttpServletRequest request, String criteria); @POST @Path("/archiveunit/probativevalueexport") @RequiresPermissions("probativevalue:check") Response exportProbativeValue(@Context HttpServletRequest request, String criteria); @POST @Path("/archiveunit/dipexport") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("dipexportv2:create") Response createDIPForExport(@Context HttpServletRequest request, DipRequest criteria); @POST @Path("/archiveunit/transfers") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("transfers:create") Response createTransferSIP(@Context HttpServletRequest request, TransferRequest criteria); @GET @Path("/archiveunit/dipexport/{id}") @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("dipexport:read") void getDIPAsInputStreamAsync(@Context HttpServletRequest request,
        @PathParam("id") String id, @Suspended final AsyncResponse asyncResponse); @GET @Path("/archiveunit/transfers/{id}") @Produces(MediaType.APPLICATION_OCTET_STREAM) @RequiresPermissions("transfers:read") void getTransferSIPAsInputStreamAsync(@Context HttpServletRequest request,
        @PathParam("id") String id, @Suspended final AsyncResponse asyncResponse); @POST @Path("/archiveunit/computedinheritedrules") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveupdate:units:update") Response computedInheritedRules(@Context HttpServletRequest request, String Query); @POST @Path("/archiveunit/deletecomputedinheritedrules") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @RequiresPermissions("archiveupdate:units:update") Response deleteComputedInheritedRules(@Context HttpServletRequest request, String Query); @GET @Path("/securemode") @Produces(MediaType.APPLICATION_JSON) Response getSecureMode(); @GET @Path("/admintenant") @Produces(MediaType.APPLICATION_JSON) Response getAdminTenant(); @POST @Path("/objectssearch/objects") @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions("objects:read") Response getObjectsSearchResult(@Context HttpServletRequest request,
        @CookieParam("JSESSIONID") String sessionId,
        String criteria); static final String X_SIZE_TOTAL; static final String X_CHUNK_OFFSET; }