@Test public void givenStartedServer_WhenUpdateUnitError_ThenReturnError() throws Exception { when(metaDataClient.updateUnitById(any(), any())) .thenThrow(new MetaDataExecutionException("Wanted exception")); given().contentType(ContentType.JSON).body(buildDSLWithOptions(QUERY_SIMPLE_TEST, DATA)) .header(GlobalDataRest.X_ACCESS_CONTRAT_ID, "all") .when().put("/units/" + ID).then().statusCode(Status.INTERNAL_SERVER_ERROR.getStatusCode()); }
@Override @PUT @Path("/units/{id_unit}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response updateUnitById(JsonNode queryDsl, @PathParam("id_unit") String idUnit, @HeaderParam(GlobalDataRest.X_REQUEST_ID) String requestId) { LOGGER.debug(EXECUTION_OF_DSL_VITAM_FROM_ACCESS_ONGOING); Status status; try { SanityChecker.checkJsonAll(queryDsl); SanityChecker.checkParameter(idUnit); SanityChecker.checkParameter(requestId); accessModule.checkClassificationLevel(queryDsl); JsonNode result = accessModule .updateUnitById(AccessContractRestrictionHelper.applyAccessContractRestrictionForUnitForUpdate(queryDsl, getVitamSession().getContract()), idUnit, requestId); LOGGER.debug(END_OF_EXECUTION_OF_DSL_VITAM_FROM_ACCESS); return Response.status(Status.OK).entity(result).build(); } catch (final IllegalArgumentException | InvalidParseOperationException | InvalidCreateOperationException e) { LOGGER.error(BAD_REQUEST_EXCEPTION, e); status = Status.BAD_REQUEST; return Response.status(status).entity(getErrorEntity(status, e.getMessage())).build(); } catch (final AccessInternalRuleExecutionException e) { LOGGER.error(e.getMessage(), e); return buildErrorResponse(VitamCode.ACCESS_INTERNAL_UPDATE_UNIT_CHECK_RULES, e.getMessage()); } catch (final UpdatePermissionException e) { LOGGER.error(e.getMessage(), e); return buildErrorResponse(VitamCode.UPDATE_UNIT_PERMISSION, e.getMessage()); } catch (final AccessInternalExecutionException e) { LOGGER.error(e.getMessage(), e); status = INTERNAL_SERVER_ERROR; return Response.status(status).entity(getErrorEntity(status, e.getMessage())).build(); } catch (final MetaDataNotFoundException e) { LOGGER.error(NOT_FOUND_EXCEPTION, e); status = Status.NOT_FOUND; return Response.status(status).entity(getErrorEntity(status, e.getMessage())).build(); } }
AccessInternalResourceImpl extends ApplicationStatusResource implements AccessInternalResource { @Override @PUT @Path("/units/{id_unit}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response updateUnitById(JsonNode queryDsl, @PathParam("id_unit") String idUnit, @HeaderParam(GlobalDataRest.X_REQUEST_ID) String requestId) { LOGGER.debug(EXECUTION_OF_DSL_VITAM_FROM_ACCESS_ONGOING); Status status; try { SanityChecker.checkJsonAll(queryDsl); SanityChecker.checkParameter(idUnit); SanityChecker.checkParameter(requestId); accessModule.checkClassificationLevel(queryDsl); JsonNode result = accessModule .updateUnitById(AccessContractRestrictionHelper.applyAccessContractRestrictionForUnitForUpdate(queryDsl, getVitamSession().getContract()), idUnit, requestId); LOGGER.debug(END_OF_EXECUTION_OF_DSL_VITAM_FROM_ACCESS); return Response.status(Status.OK).entity(result).build(); } catch (final IllegalArgumentException | InvalidParseOperationException | InvalidCreateOperationException e) { LOGGER.error(BAD_REQUEST_EXCEPTION, e); status = Status.BAD_REQUEST; return Response.status(status).entity(getErrorEntity(status, e.getMessage())).build(); } catch (final AccessInternalRuleExecutionException e) { LOGGER.error(e.getMessage(), e); return buildErrorResponse(VitamCode.ACCESS_INTERNAL_UPDATE_UNIT_CHECK_RULES, e.getMessage()); } catch (final UpdatePermissionException e) { LOGGER.error(e.getMessage(), e); return buildErrorResponse(VitamCode.UPDATE_UNIT_PERMISSION, e.getMessage()); } catch (final AccessInternalExecutionException e) { LOGGER.error(e.getMessage(), e); status = INTERNAL_SERVER_ERROR; return Response.status(status).entity(getErrorEntity(status, e.getMessage())).build(); } catch (final MetaDataNotFoundException e) { LOGGER.error(NOT_FOUND_EXCEPTION, e); status = Status.NOT_FOUND; return Response.status(status).entity(getErrorEntity(status, e.getMessage())).build(); } } }
AccessInternalResourceImpl extends ApplicationStatusResource implements AccessInternalResource { @Override @PUT @Path("/units/{id_unit}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response updateUnitById(JsonNode queryDsl, @PathParam("id_unit") String idUnit, @HeaderParam(GlobalDataRest.X_REQUEST_ID) String requestId) { LOGGER.debug(EXECUTION_OF_DSL_VITAM_FROM_ACCESS_ONGOING); Status status; try { SanityChecker.checkJsonAll(queryDsl); SanityChecker.checkParameter(idUnit); SanityChecker.checkParameter(requestId); accessModule.checkClassificationLevel(queryDsl); JsonNode result = accessModule .updateUnitById(AccessContractRestrictionHelper.applyAccessContractRestrictionForUnitForUpdate(queryDsl, getVitamSession().getContract()), idUnit, requestId); LOGGER.debug(END_OF_EXECUTION_OF_DSL_VITAM_FROM_ACCESS); return Response.status(Status.OK).entity(result).build(); } catch (final IllegalArgumentException | InvalidParseOperationException | InvalidCreateOperationException e) { LOGGER.error(BAD_REQUEST_EXCEPTION, e); status = Status.BAD_REQUEST; return Response.status(status).entity(getErrorEntity(status, e.getMessage())).build(); } catch (final AccessInternalRuleExecutionException e) { LOGGER.error(e.getMessage(), e); return buildErrorResponse(VitamCode.ACCESS_INTERNAL_UPDATE_UNIT_CHECK_RULES, e.getMessage()); } catch (final UpdatePermissionException e) { LOGGER.error(e.getMessage(), e); return buildErrorResponse(VitamCode.UPDATE_UNIT_PERMISSION, e.getMessage()); } catch (final AccessInternalExecutionException e) { LOGGER.error(e.getMessage(), e); status = INTERNAL_SERVER_ERROR; return Response.status(status).entity(getErrorEntity(status, e.getMessage())).build(); } catch (final MetaDataNotFoundException e) { LOGGER.error(NOT_FOUND_EXCEPTION, e); status = Status.NOT_FOUND; return Response.status(status).entity(getErrorEntity(status, e.getMessage())).build(); } } AccessInternalResourceImpl(AccessInternalConfiguration configuration); @VisibleForTesting  AccessInternalResourceImpl(LogbookLifeCyclesClientFactory logbookLifeCyclesClientFactory,
        LogbookOperationsClientFactory logbookOperationsClientFactory, StorageClientFactory storageClientFactory,
        WorkspaceClientFactory workspaceClientFactory, AdminManagementClientFactory adminManagementClientFactory,
        MetaDataClientFactory metaDataClientFactory,
        ProcessingManagementClientFactory processingManagementClientFactory); @VisibleForTesting private  AccessInternalResourceImpl(AccessInternalModule accessModule,
        LogbookOperationsClientFactory logbookOperationsClientFactory,
        WorkspaceClientFactory workspaceClientFactory,
        ProcessingManagementClientFactory processingManagementClientFactory); }
AccessInternalResourceImpl extends ApplicationStatusResource implements AccessInternalResource { @Override @PUT @Path("/units/{id_unit}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response updateUnitById(JsonNode queryDsl, @PathParam("id_unit") String idUnit, @HeaderParam(GlobalDataRest.X_REQUEST_ID) String requestId) { LOGGER.debug(EXECUTION_OF_DSL_VITAM_FROM_ACCESS_ONGOING); Status status; try { SanityChecker.checkJsonAll(queryDsl); SanityChecker.checkParameter(idUnit); SanityChecker.checkParameter(requestId); accessModule.checkClassificationLevel(queryDsl); JsonNode result = accessModule .updateUnitById(AccessContractRestrictionHelper.applyAccessContractRestrictionForUnitForUpdate(queryDsl, getVitamSession().getContract()), idUnit, requestId); LOGGER.debug(END_OF_EXECUTION_OF_DSL_VITAM_FROM_ACCESS); return Response.status(Status.OK).entity(result).build(); } catch (final IllegalArgumentException | InvalidParseOperationException | InvalidCreateOperationException e) { LOGGER.error(BAD_REQUEST_EXCEPTION, e); status = Status.BAD_REQUEST; return Response.status(status).entity(getErrorEntity(status, e.getMessage())).build(); } catch (final AccessInternalRuleExecutionException e) { LOGGER.error(e.getMessage(), e); return buildErrorResponse(VitamCode.ACCESS_INTERNAL_UPDATE_UNIT_CHECK_RULES, e.getMessage()); } catch (final UpdatePermissionException e) { LOGGER.error(e.getMessage(), e); return buildErrorResponse(VitamCode.UPDATE_UNIT_PERMISSION, e.getMessage()); } catch (final AccessInternalExecutionException e) { LOGGER.error(e.getMessage(), e); status = INTERNAL_SERVER_ERROR; return Response.status(status).entity(getErrorEntity(status, e.getMessage())).build(); } catch (final MetaDataNotFoundException e) { LOGGER.error(NOT_FOUND_EXCEPTION, e); status = Status.NOT_FOUND; return Response.status(status).entity(getErrorEntity(status, e.getMessage())).build(); } } AccessInternalResourceImpl(AccessInternalConfiguration configuration); @VisibleForTesting  AccessInternalResourceImpl(LogbookLifeCyclesClientFactory logbookLifeCyclesClientFactory,
        LogbookOperationsClientFactory logbookOperationsClientFactory, StorageClientFactory storageClientFactory,
        WorkspaceClientFactory workspaceClientFactory, AdminManagementClientFactory adminManagementClientFactory,
        MetaDataClientFactory metaDataClientFactory,
        ProcessingManagementClientFactory processingManagementClientFactory); @VisibleForTesting private  AccessInternalResourceImpl(AccessInternalModule accessModule,
        LogbookOperationsClientFactory logbookOperationsClientFactory,
        WorkspaceClientFactory workspaceClientFactory,
        ProcessingManagementClientFactory processingManagementClientFactory); @Override @GET @Path("/units") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response getUnits(JsonNode queryDsl); @Override @GET @Path("/unitsWithInheritedRules") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response selectUnitsWithInheritedRules(JsonNode queryDsl); @Override @POST @Path("/dipexport") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response exportDIP(JsonNode dslRequest); @Override @POST @Path("/export/usagefilter") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response exportByUsageFilter(ExportRequest exportRequest); @POST @Path("/transfers/reply") @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_JSON) Response transferReply(InputStream transferReply); @Override @GET @Path("/dipexport/{id}/dip") @Consumes(MediaType.APPLICATION_OCTET_STREAM) Response findDIPByID(@PathParam("id") String id); @Override @GET @Path("/transferexport/{id}/sip") @Consumes(MediaType.APPLICATION_OCTET_STREAM) Response findTransferSIPByID(@PathParam("id") String id); @Override @POST @Path("/reclassification") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response startReclassificationWorkflow(JsonNode reclassificationRequestJson); Response startReclassificationWorkflow(JsonNode reclassificationRequestJson, ProcessAction processAction); @Override @POST @Path("/elimination/analysis") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response startEliminationAnalysisWorkflow(EliminationRequestBody eliminationRequestBody); @Override @POST @Path("/elimination/action") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response startEliminationActionWorkflow(EliminationRequestBody eliminationRequestBody); @Override @GET @Path("/units/{id_unit}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response getUnitById(JsonNode queryDsl,
        @PathParam("id_unit") String idUnit); @GET @Path("/units/{id_unit}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_XML) @Override Response getUnitByIdWithXMLFormat(JsonNode queryDsl, @PathParam("id_unit") String idUnit); @Override @PUT @Path("/units/{id_unit}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response updateUnitById(JsonNode queryDsl,
        @PathParam("id_unit") String idUnit, @HeaderParam(GlobalDataRest.X_REQUEST_ID) String requestId); @Override @GET @Path("/objects/{id_object_group}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response getObjectGroup(@PathParam("id_object_group") String idObjectGroup, JsonNode query); @GET @Path("/objects/{id_object_group}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_XML) @Override Response getObjectByIdWithXMLFormat(JsonNode dslQuery, @PathParam("id_object_group") String objectId); @GET @Path("/units/{id_unit}/object") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_XML) @Override Response getObjectByUnitIdWithXMLFormat(JsonNode queryDsl, @PathParam("id_unit") String idUnit); @Override @GET @Path("/objects/{id_object_group}/{id_unit}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_OCTET_STREAM) Response getObjectStreamAsync(@Context HttpHeaders headers,
        @PathParam("id_object_group") String idObjectGroup, @PathParam("id_unit") String idUnit); @Override @GET @Path("/storageaccesslog") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_OCTET_STREAM) Response getAccessLogStreamAsync(@Context HttpHeaders headers, JsonNode params); @Override @POST @Path(UNITS_URI) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response massUpdateUnits(JsonNode queryDsl); @Override @POST @Path(UNITS_RULES_URI) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response massUpdateUnitsRules(MassUpdateUnitRuleRequest massUpdateUnitRuleRequest); @Path("/units/computedInheritedRules") @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response startComputeInheritedRules(JsonNode dslQuery); @Path("/units/computedInheritedRules") @DELETE @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response deleteComputeInheritedRules(JsonNode dslQuery); @Override @GET @Path("/objects") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response getObjects(JsonNode queryDsl); @Path("/preservation") @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response startPreservation(PreservationRequest preservationRequest); }
AccessInternalResourceImpl extends ApplicationStatusResource implements AccessInternalResource { @Override @PUT @Path("/units/{id_unit}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response updateUnitById(JsonNode queryDsl, @PathParam("id_unit") String idUnit, @HeaderParam(GlobalDataRest.X_REQUEST_ID) String requestId) { LOGGER.debug(EXECUTION_OF_DSL_VITAM_FROM_ACCESS_ONGOING); Status status; try { SanityChecker.checkJsonAll(queryDsl); SanityChecker.checkParameter(idUnit); SanityChecker.checkParameter(requestId); accessModule.checkClassificationLevel(queryDsl); JsonNode result = accessModule .updateUnitById(AccessContractRestrictionHelper.applyAccessContractRestrictionForUnitForUpdate(queryDsl, getVitamSession().getContract()), idUnit, requestId); LOGGER.debug(END_OF_EXECUTION_OF_DSL_VITAM_FROM_ACCESS); return Response.status(Status.OK).entity(result).build(); } catch (final IllegalArgumentException | InvalidParseOperationException | InvalidCreateOperationException e) { LOGGER.error(BAD_REQUEST_EXCEPTION, e); status = Status.BAD_REQUEST; return Response.status(status).entity(getErrorEntity(status, e.getMessage())).build(); } catch (final AccessInternalRuleExecutionException e) { LOGGER.error(e.getMessage(), e); return buildErrorResponse(VitamCode.ACCESS_INTERNAL_UPDATE_UNIT_CHECK_RULES, e.getMessage()); } catch (final UpdatePermissionException e) { LOGGER.error(e.getMessage(), e); return buildErrorResponse(VitamCode.UPDATE_UNIT_PERMISSION, e.getMessage()); } catch (final AccessInternalExecutionException e) { LOGGER.error(e.getMessage(), e); status = INTERNAL_SERVER_ERROR; return Response.status(status).entity(getErrorEntity(status, e.getMessage())).build(); } catch (final MetaDataNotFoundException e) { LOGGER.error(NOT_FOUND_EXCEPTION, e); status = Status.NOT_FOUND; return Response.status(status).entity(getErrorEntity(status, e.getMessage())).build(); } } AccessInternalResourceImpl(AccessInternalConfiguration configuration); @VisibleForTesting  AccessInternalResourceImpl(LogbookLifeCyclesClientFactory logbookLifeCyclesClientFactory,
        LogbookOperationsClientFactory logbookOperationsClientFactory, StorageClientFactory storageClientFactory,
        WorkspaceClientFactory workspaceClientFactory, AdminManagementClientFactory adminManagementClientFactory,
        MetaDataClientFactory metaDataClientFactory,
        ProcessingManagementClientFactory processingManagementClientFactory); @VisibleForTesting private  AccessInternalResourceImpl(AccessInternalModule accessModule,
        LogbookOperationsClientFactory logbookOperationsClientFactory,
        WorkspaceClientFactory workspaceClientFactory,
        ProcessingManagementClientFactory processingManagementClientFactory); @Override @GET @Path("/units") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response getUnits(JsonNode queryDsl); @Override @GET @Path("/unitsWithInheritedRules") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response selectUnitsWithInheritedRules(JsonNode queryDsl); @Override @POST @Path("/dipexport") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response exportDIP(JsonNode dslRequest); @Override @POST @Path("/export/usagefilter") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response exportByUsageFilter(ExportRequest exportRequest); @POST @Path("/transfers/reply") @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_JSON) Response transferReply(InputStream transferReply); @Override @GET @Path("/dipexport/{id}/dip") @Consumes(MediaType.APPLICATION_OCTET_STREAM) Response findDIPByID(@PathParam("id") String id); @Override @GET @Path("/transferexport/{id}/sip") @Consumes(MediaType.APPLICATION_OCTET_STREAM) Response findTransferSIPByID(@PathParam("id") String id); @Override @POST @Path("/reclassification") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response startReclassificationWorkflow(JsonNode reclassificationRequestJson); Response startReclassificationWorkflow(JsonNode reclassificationRequestJson, ProcessAction processAction); @Override @POST @Path("/elimination/analysis") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response startEliminationAnalysisWorkflow(EliminationRequestBody eliminationRequestBody); @Override @POST @Path("/elimination/action") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response startEliminationActionWorkflow(EliminationRequestBody eliminationRequestBody); @Override @GET @Path("/units/{id_unit}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response getUnitById(JsonNode queryDsl,
        @PathParam("id_unit") String idUnit); @GET @Path("/units/{id_unit}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_XML) @Override Response getUnitByIdWithXMLFormat(JsonNode queryDsl, @PathParam("id_unit") String idUnit); @Override @PUT @Path("/units/{id_unit}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response updateUnitById(JsonNode queryDsl,
        @PathParam("id_unit") String idUnit, @HeaderParam(GlobalDataRest.X_REQUEST_ID) String requestId); @Override @GET @Path("/objects/{id_object_group}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response getObjectGroup(@PathParam("id_object_group") String idObjectGroup, JsonNode query); @GET @Path("/objects/{id_object_group}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_XML) @Override Response getObjectByIdWithXMLFormat(JsonNode dslQuery, @PathParam("id_object_group") String objectId); @GET @Path("/units/{id_unit}/object") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_XML) @Override Response getObjectByUnitIdWithXMLFormat(JsonNode queryDsl, @PathParam("id_unit") String idUnit); @Override @GET @Path("/objects/{id_object_group}/{id_unit}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_OCTET_STREAM) Response getObjectStreamAsync(@Context HttpHeaders headers,
        @PathParam("id_object_group") String idObjectGroup, @PathParam("id_unit") String idUnit); @Override @GET @Path("/storageaccesslog") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_OCTET_STREAM) Response getAccessLogStreamAsync(@Context HttpHeaders headers, JsonNode params); @Override @POST @Path(UNITS_URI) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response massUpdateUnits(JsonNode queryDsl); @Override @POST @Path(UNITS_RULES_URI) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response massUpdateUnitsRules(MassUpdateUnitRuleRequest massUpdateUnitRuleRequest); @Path("/units/computedInheritedRules") @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response startComputeInheritedRules(JsonNode dslQuery); @Path("/units/computedInheritedRules") @DELETE @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response deleteComputeInheritedRules(JsonNode dslQuery); @Override @GET @Path("/objects") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response getObjects(JsonNode queryDsl); @Path("/preservation") @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response startPreservation(PreservationRequest preservationRequest);  }