@POST @PreAuthorize("isAuthenticated()") @Produces(MediaType.APPLICATION_JSON + ";charset=UTF-8") @Consumes(MediaType.APPLICATION_JSON + ";charset=UTF-8") @ApiOperation( value = "Luo uuden koulutuksen", notes = "Operaatio luo uuden koulutuksen", response = KoulutusV1RDTO.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Operation successful"), @ApiResponse(code = 400, message = "Invalid request payload"), @ApiResponse(code = 401, message = "Unauthorized request"), @ApiResponse(code = 403, message = "Permission denied") }) public Response postKoulutus(KoulutusV1RDTO koulutus);
@GET @Path("/describeServices") @ApiOperation(value = "List the available services in POIProxy with their operations, configuration and expected output", notes = "Prints every single service configured in POIProxy in a key, value object, where the key that defines a service can be used to other API requests as the service parameter", response = es.alrocar.poiproxy.configuration.DescribeServices.class) @ApiResponses(value = { @ApiResponse(code = 500, message = "Server error"), @ApiResponse(code = 200, message = "OK", response = es.alrocar.poiproxy.configuration.DescribeServices.class) }) public void describeServices() { }
@GET @Consumes({UmaConstants.JSON_MEDIA_TYPE}) @Produces({UmaConstants.JSON_MEDIA_TYPE}) @ApiOperation(value = "Not allowed") @ApiResponses(value = { @ApiResponse(code = 405, message = "Introspection of RPT is not allowed by GET HTTP method.") }) public Response requestRptStatusGet(@HeaderParam("Authorization") String authorization, @FormParam("token") String rpt, @FormParam("token_type_hint") String tokenTypeHint) { throw new WebApplicationException(Response.status(405).entity("Introspection of RPT is not allowed by GET HTTP method.").build()); } }
@GET @Path("/{taskId: [0-9-]+}/content") @ApiOperation(value = "Get the content associated with a specific task", notes = "Returns Task content") @ApiResponses(value = { @ApiResponse(code = 404, message = "Task can not be found") }) public Response getTaskContentByTaskId( @PathParam("taskId") long taskId );
@GET @Path("/{taskId: [0-9-]+}") @ApiOperation(value = "Get a specific task", notes = "Returns a Task") @ApiResponses(value = { @ApiResponse(code = 404, message = "Task can not be found") }) public Response getTask( @PathParam("taskId") long taskId );
@GET @Path("/content/{contentId: [0-9-]+}") @ApiOperation(value = "Get a specific task content", notes = "Returns task content") @ApiResponses(value = { @ApiResponse(code = 404, message = "Content can not be found") }) public Response getTaskContentByContentId( @PathParam("contentId") long contentId );
@POST @Path("/{taskId: [0-9-]+}/{oper: [a-zA-Z]+}") @ApiOperation(value = "Get a specific task", notes = "Returns a Task") @ApiResponses(value = { @ApiResponse(code = 404, message = "Task can not be found") }) public Response doTaskOperation( @PathParam("taskId") long taskId, @ApiParam(value = "Operation names", required = true, allowableValues = "activate, claim, claimnextavailable, complete, delegate, exit, fail, forward, nominate, release, resume, skip, start, stop, suspend", allowMultiple = false) @PathParam("oper") String operation );
@ApiOperation( "Retrieve JSON describing the add-ons that are available on the system" ) @ApiResponse( code = 200, response = AddOnListing.class, message = "The description object" ) @Path( "/addons/active" ) @GET @Produces( ApplicationContent.application_json ) public Response getAddonList() { return formatOkResponseWithJsonEntity( statsController.getActiveAddOns(), objectMapper ); }
@ApiOperation( "Retrieve versioning information about this AProx instance" ) @ApiResponse( code = 200, response = AProxVersioning.class, message = "The version metadata" ) @Path( "/version-info" ) @GET @Produces( ApplicationContent.application_json ) public Response getAProxVersion() { return formatOkResponseWithJsonEntity( statsController.getVersionInfo(), objectMapper ); }
/** * Hakee yksittäisen ryhmäsähköpostiviestin tiedot * * @param Ryhmäsähköpostiviestin tunnus * @return Raportoitavan ryhmäsähköpostin tiedot {@link ReportedMessageDTO}} */ @PreAuthorize(SecurityConstants.READ) @Produces(MediaType.APPLICATION_JSON) @Path(RestConstants.PATH_REPORT_MESSAGE_VIEW) @GET @ApiOperation(value = "Hakee halutun ryhmäsähköpostiviestin tiedot", notes = "Hakee avainta vastaavaa ryhmäsähköpostiviestin tiedot.", response = ReportedMessageDTO.class) @ApiResponses(value = {@ApiResponse(code = 500, message = "Internal service error")}) public Response getReportedMessage(@ApiParam(value = "Ryhmäsähköpostiviestin avain", required = true) @PathParam(RestConstants.PARAM_MESSAGE_ID) Long messageID);
/** * Pyytää tiedot raportoittavista ryhmäsähköposteista * * @param sendId Ryhmäsähköpostin tunnus * @return Raportoitavan ryhmäsähköpostin tiedot */ @POST @Consumes("application/json") @Produces("application/json") @Path("sendResult") @PreAuthorize(SecurityConstants.SEND) @ApiOperation(value = "Palauttaa lähetetyn ryhmäsähköpostin raportin", response = ReportedMessageDTO.class) @ApiResponses({@ApiResponse(code = 500, message = "Internal service error tai liittymävirhe")}) public Response sendResult(@ApiParam(value = "Ryhmäsähköpostiviestin avain", required = true) String sendId); }
@ApiOperation( value="Delete import run", notes="Removes a pending or finished import configuration from the server.") @ApiResponses({ @ApiResponse(code = 204, message = "Delete successful"), @ApiResponse(code = 404, message = "Code system version or import not found", response = RestApiError.class), }) @RequestMapping(value="/{importId}", method=RequestMethod.DELETE) @ResponseStatus(HttpStatus.NO_CONTENT) public void deleteImportDetails( @ApiParam(value="The import identifier") @PathVariable(value="importId") final UUID importId) { delegate.deleteImportDetails(importId); }
@ApiOperation( value = "Retrieve MRCM relationship rules for a concept.", notes = "Retrieve mrcm relationship rules for a concept. There are other rule types but they are not yet returned here.") @ApiResponses({ @ApiResponse(code = 200, message = "OK", response=CollectionResource.class) }) @RequestMapping(value="/{conceptId}", method=RequestMethod.GET) public List<Predicate> getPredicates(@PathVariable String conceptId) { return mrcmService.getPredicates(conceptId); }
@ApiOperation( value="Retrieve classification runs from branch", notes="Returns a list of classification runs for a branch.") @ApiResponses({ @ApiResponse(code = 200, message = "OK"), @ApiResponse(code = 404, message = "Branch not found", response=RestApiError.class) }) @RequestMapping(value="/{path:**}/classifications", method=RequestMethod.GET) public @ResponseBody CollectionResource<IClassificationRun> getAllClassificationRuns( @ApiParam(value="The branch path") @PathVariable(value="path") final String branchPath) { return CollectionResource.of(delegate.getAllClassificationRuns(branchPath)); }
@ApiOperation( value = "Get merge or rebase status", notes = "Retrieves the parameters and status for a queued request.") @ApiResponses({ @ApiResponse(code = 200, message = "OK"), @ApiResponse(code = 400, message = "Bad request", response=RestApiError.class), @ApiResponse(code = 404, message = "Merge request not found in queue", response=RestApiError.class) }) @RequestMapping(method = RequestMethod.GET, value="/{id}") public DeferredResult<Merge> getMerge(@PathVariable("id") UUID id) { return DeferredResults.wrap(RepositoryRequests.merging().prepareGet(id).build(repositoryId).execute(bus)); }
@ApiOperation( value="Retrieve import run details", notes="Returns the specified import run's configuration and status.") @ApiResponses({ @ApiResponse(code = 200, message = "OK"), @ApiResponse(code = 404, message = "Code system version or import not found", response = RestApiError.class), }) @RequestMapping(value="/{importId}", method=RequestMethod.GET) public SnomedImportDetails getImportDetails( @ApiParam(value="The import identifier") @PathVariable(value="importId") final UUID importId) { return convertToDetails(importId, delegate.getImportDetails(importId)); }
@GET @ApiOperation( "Retrieve all not-found cache entries currently tracked" ) @ApiResponses( { @ApiResponse( code = 200, response = NotFoundCacheDTO.class, message = "The full not-found cache" ) } ) @Produces( ApplicationContent.application_json ) public Response getAll() { final NotFoundCacheDTO dto = controller.getAllMissing(); return formatOkResponseWithJsonEntity( dto, serializer ); }
@ApiOperation( value="Reload validation rules", notes="Reloads snomed-drools validation rules across all branches.") @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = Void.class) }) @RequestMapping(value="/reload-validation-rules", method=RequestMethod.POST) public @ResponseBody ReloadRulesResponse reloadValidationRules() { int rulesLoaded = validationService.reloadRules(); return new ReloadRulesResponse(rulesLoaded); }
@ApiOperation(value = "Delete an existing ReDBox object", tags = "object") @ApiResponses({ @ApiResponse(code = 200, message = "The object is deleted"), @ApiResponse(code = 500, message = "General Error", response = Exception.class) }) @Delete public String deleteObjectResource() throws IOException, PluginException, MessagingException { Storage storage = (Storage) ApplicationContextProvider.getApplicationContext().getBean("fascinatorStorage"); Indexer indexer = (Indexer) ApplicationContextProvider.getApplicationContext().getBean("fascinatorIndexer"); String oid = getAttribute("oid"); storage.removeObject(oid); indexer.remove(oid); return getSuccessResponseString(oid); } }
@ApiOperation(value = "Queues a message on the specified message queue", tags = "messaging") @ApiResponses({ @ApiResponse(code = 200, message = "The record's metadata is updated"), @ApiResponse(code = 500, message = "General Error", response = Exception.class) }) @Post("json") public String sendMessageToQueue(JsonRepresentation data) throws IOException, MessagingException { MessagingServices ms = MessagingServices.getInstance(); String messageQueue = getAttribute("messageQueue"); String message = data.getText(); ms.queueMessage(messageQueue, message); return getSuccessResponseString(null); }