/** * Deactivates the catalog service * * @param id the URN of an catalog service to be deactivated * @brief Deactivate Catalog Service * @return OK if deactivation completed successfully * @throws DatabaseException when a DB error occurs */ @POST @Path("/{id}/deactivate") @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) @CheckPermission(roles = {Role.TENANT_ADMIN}) public Response deactivateCatalogService(@PathParam("id") URI id) throws DatabaseException { CatalogService catalogService = queryResource(id); ArgValidator.checkEntity(catalogService, id, true); catalogServiceManager.deleteCatalogService(catalogService); auditOpSuccess(OperationTypeEnum.DELETE_CATALOG_SERVICE, catalogService.auditParameters()); return Response.ok().build(); }
private CatalogService getCatalogServiceById(URI id, boolean checkInactive) { CatalogService catalogService = catalogServiceManager.getCatalogServiceById(id); ArgValidator.checkEntity(catalogService, id, isIdEmbeddedInURL(id), checkInactive); return catalogService; }
private ApprovalRequest getApprovalById(URI id, boolean checkInactive) { ApprovalRequest approval = approvalManager.getApprovalById(id); ArgValidator.checkEntity(approval, id, isIdEmbeddedInURL(id), checkInactive); return approval; }