/** * Execute service put. * * @param path * the path * @return result of the execution of the service */ @PUT @Path("/{path:.*}") @ApiOperation("Execute Server Side JavaScript Nashorn Resource") @ApiResponses({ @ApiResponse(code = 200, message = "Execution Result") }) public Response executeNashornServicePut(@PathParam("path") String path) { return executeNashornServiceGet(path); }
/** * Execute service delete. * * @param path * the path * @return result of the execution of the service */ @DELETE @Path("/{path:.*}") @ApiOperation("Execute Server Side JavaScript Nashorn Resource") @ApiResponses({ @ApiResponse(code = 200, message = "Execution Result") }) public Response executeServiceDelete(@PathParam("path") String path) { return executeService(path); }
/** * Execute service. * * @param path * the path * @return result of the execution of the service */ @GET @Path("/{path:.*}") @ApiOperation("Execute Server Side JavaScript Nashorn Resource") @ApiResponses({ @ApiResponse(code = 200, message = "Execution Result") }) public Response executeNashornServiceGet(@PathParam("path") String path) { try { processor.executeService(path); return Response.ok().build(); } catch (ScriptingDependencyException e) { logger.error(e.getMessage(), e); return Response.status(Response.Status.ACCEPTED).entity(e.getMessage()).build(); } catch (Throwable e) { String message = e.getMessage(); logger.error(message, e); sendErrorInternalServerError(response, message); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(message).build(); } }
/** * Execute service. * * @param path * the path * @return result of the execution of the service */ @GET @Path("/{path:.*}") @ApiOperation("Execute Server Side JavaScript Nashorn Resource") @ApiResponses({ @ApiResponse(code = 200, message = "Execution Result") }) public Response executeService(@PathParam("path") String path) { try { processor.executeService(path); return Response.ok().build(); } catch (ScriptingDependencyException e) { logger.error(e.getMessage(), e); return Response.status(Response.Status.ACCEPTED).entity(e.getMessage()).build(); } catch (Throwable e) { String message = e.getMessage(); logger.error(message, e); sendErrorInternalServerError(response, message); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(message).build(); } }
/** * Execute service post. * * @param path * the path * @return result of the execution of the service */ @POST @Path("/{path:.*}") @ApiOperation("Execute Server Side JavaScript Nashorn Resource") @ApiResponses({ @ApiResponse(code = 200, message = "Execution Result") }) public Response executeNashornServicePost(@PathParam("path") String path) { return executeNashornServiceGet(path); }
/** * Execute service post. * * @param path * the path * @return result of the execution of the service */ @POST @Path("/{path:.*}") @ApiOperation("Execute Server Side JavaScript Nashorn Resource") @ApiResponses({ @ApiResponse(code = 200, message = "Execution Result") }) public Response executeServicePost(@PathParam("path") String path) { return executeService(path); }
/** * Execute service delete. * * @param path * the path * @return result of the execution of the service */ @DELETE @Path("/{path:.*}") @ApiOperation("Execute Server Side JavaScript Nashorn Resource") @ApiResponses({ @ApiResponse(code = 200, message = "Execution Result") }) public Response executeNashornServiceDelete(@PathParam("path") String path) { return executeNashornServiceGet(path); }
/** * Execute service put. * * @param path * the path * @return result of the execution of the service */ @PUT @Path("/{path:.*}") @ApiOperation("Execute Server Side JavaScript Nashorn Resource") @ApiResponses({ @ApiResponse(code = 200, message = "Execution Result") }) public Response executeServicePut(@PathParam("path") String path) { return executeService(path); }
/** * Execute service head. * * @param path * the path * @return result of the execution of the service */ @HEAD @Path("/{path:.*}") @ApiOperation("Execute Server Side JavaScript Nashorn Resource") @ApiResponses({ @ApiResponse(code = 200, message = "Execution Result") }) public Response executeNashornServiceHead(@PathParam("path") String path) { return executeNashornServiceGet(path); }
/** * Execute service head. * * @param path * the path * @return result of the execution of the service */ @HEAD @Path("/{path:.*}") @ApiOperation("Execute Server Side JavaScript Nashorn Resource") @ApiResponses({ @ApiResponse(code = 200, message = "Execution Result") }) public Response executeServiceHead(@PathParam("path") String path) { return executeService(path); }