@POST @Path("register") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public String register(@FormParam("userName") String userName, @FormParam("password") String password, @FormParam("phone") Long phone, @FormParam("email") String email, @FormParam("nick") String nick, @FormParam("addr") String addr, @FormParam("gender") String gender) { // check not null User u = new User();// dao 应该查询 u.setAddr(addr); u.setEmail(email); u.setGender(gender); u.setNick(nick); u.setPassword(password); u.setPhone(phone); u.setUsername(userName); return JsonUtil.bean2Json(u); }
@Path("/save") @POST public Single<Response> save(@FormParam("id") String id, @FormParam("title") String title, @FormParam("markdown") String markdown, @FormParam("newPage") String newPage){ return fiber(() -> { boolean isNewPage = "yes".equals(newPage); String requiredPermission = isNewPage ? "create" : "update"; if(!await(user.rxIsAuthorised(requiredPermission))) throw new AuthorizationException("Not authorized"); PagesDao dao = (PagesDao) AppGlobals.get().getGlobal("dao"); Single<Integer> query; if(isNewPage) query = dao.client().execute(DSL.using(dao.configuration()).insertInto(dao.getTable()) .columns(Tables.PAGES.NAME, Tables.PAGES.CONTENT) .values(title, markdown)); else query = dao.updateExecAsync(new Pages().setId(Integer.valueOf(id)).setContent(markdown)); await(query); URI location = Router.getURI(WikiResource::renderPage, title); return Response.seeOther(location).build(); }); }
@PUT @Path("/users") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public String createUser( @FormParam("id") int id, @FormParam("name") String name, @FormParam("profession") String profession) { User user = new User(id, name, profession); int result = userDao.addUser(user); if (result == 1) { return SUCCESS_JSON; } return FAILURE_JSON; }
@Path("/save") @POST public Single<Response> save(@FormParam("id") String id, @FormParam("title") String title, @FormParam("markdown") String markdown, @FormParam("newPage") String newPage){ return fiber((con) -> { boolean isNewPage = "yes".equals(newPage); String requiredPermission = isNewPage ? "create" : "update"; if(!await(user.rxIsAuthorised(requiredPermission))) throw new AuthorizationException("Not authorized"); String sql = isNewPage ? SQL.SQL_CREATE_PAGE : SQL.SQL_SAVE_PAGE; JsonArray params = new JsonArray(); if (isNewPage) { params.add(title).add(markdown); } else { params.add(markdown).add(id); } await(con.rxUpdateWithParams(sql, params)); URI location = Router.getURI(WikiResource::renderPage, title); return Response.seeOther(location).build(); }); }
@POST @Path("accountalias") public BaseDTO accountStatus(@FormParam("username") String username) { BaseDTO baseDto = new BaseDTO(); try { baseDto.setCode(200); baseDto.setData(accountAliasConverter.convertAlias(username)); } catch (Exception ex) { logger.error(ex.getMessage(), ex); baseDto.setCode(500); baseDto.setMessage(ex.getMessage()); } return baseDto; }
@PUT @Path("/{id}/sampledata") @Consumes({ MediaType.APPLICATION_FORM_URLENCODED }) @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ApiOperation(value = "update sampledata") @ApiResponses(value = { @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns"), @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class), @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class), @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) }) public Response updateRegistrationTemplateSampleData(@Context HttpServletRequest request, @Context HttpHeaders header, @Context Company company, @Context Locale locale, @Context User user, @Context ServiceContext serviceContext, @ApiParam(value = "id of DeliverableType", required = true) @PathParam("id") long registrationTemplatesId, @ApiParam(value = "sampledata of registrationTemplate", required = true) @FormParam("sampleData") String sampledata);
@POST @Path("/new") @Consumes(APPLICATION_FORM_URLENCODED) public Response handleSubmit( @FormParam("name") final String name, @FormParam("address") final String address, @FormParam("city") final String city, @FormParam("telephone") final String telephone) { final Owner owner = new Owner(); owner.setName(name); owner.setAddress(address); owner.setCity(city); owner.setTelephone(telephone); dao.create(owner); return Response.seeOther(URI.create(owner.getUrl())).build(); }
@PUT @Path("/registrations/{id}/forms/{referenceUid}/formdata") @Consumes({ MediaType.APPLICATION_FORM_URLENCODED }) @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ApiOperation(value = "update RegistrationForm") @ApiResponses(value = { @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns"), @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class), @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class), @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) }) public Response updateRegFormFormData(@Context HttpServletRequest request, @Context HttpHeaders header, @Context Company company, @Context Locale locale, @Context User user, @Context ServiceContext serviceContext, @ApiParam(value = "registrationId", required = true) @PathParam("id") long id, @ApiParam(value = "referenceUid", required = true) @PathParam("referenceUid") String referenceUid, @ApiParam(value = "formdata of registrationForm", required = true) @FormParam("formdata") String formdata) throws PortalException;
@POST @Path("/option/{optionName}") @Consumes("application/x-www-form-urlencoded") @Produces(MediaType.TEXT_HTML) public Viewable updateSystemOption(@FormParam("name") String name, @FormParam("value") String value, @FormParam("kind") String kind) { try { work.getContext() .getOptionManager() .setOption(OptionValue.createOption( OptionValue.Kind.valueOf(kind), OptionValue.OptionType.SYSTEM, name, value)); } catch (Exception e) { logger.debug("Could not update.", e); } return getSystemOptions(); }
@POST @Consumes("application/x-www-form-urlencoded") @Produces("application/json") @Path("/save") public Object saveUser(@FormParam("userName") String userName,@FormParam("userPass") String userPass){ String jsonData = ""; User u = new User(); u.setUserName(userName); u.setUserPass(userPass); try { userService.save(u); } catch (Exception e) { //-- 统一在过滤器中添加跨域访问的header信息,所以这里就不添加了 jsonData = JsonUtil.toJsonByProperty("addUser","failure"); return Response.ok(jsonData).status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR ).build(); } jsonData = JsonUtil.toJsonByProperty("id", u.getId()); return Response.ok(jsonData).status(HttpServletResponse.SC_OK).build(); }
@POST @Produces(MediaType.TEXT_HTML) @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public FreeMarkerOnlineView formResult( @FormParam("template") String template, @FormParam("dataModel") String dataModel, @FormParam("outputFormat") String outputFormat, @FormParam("locale") String locale, @FormParam("timeZone") String timeZone) { FreeMarkerOnlineView view = new FreeMarkerOnlineView(); view.setTemplate(template); view.setDataModel(dataModel); view.setOutputFormat(outputFormat); view.setLocale(locale); view.setTimeZone(timeZone); view.setExecute(true); return view; }
@POST @Path("/{id}/edit") @Consumes(APPLICATION_FORM_URLENCODED) public Response handleSubmit( @PathParam("id") final UUID id, @FormParam("name") final String name, @FormParam("address") final String address, @FormParam("city") final String city, @FormParam("telephone") final String telephone) { final Owner owner = dao.read(Owner.class, id); if (owner == null) { throw new NotFoundException(); } owner.setName(name); owner.setAddress(address); owner.setCity(city); owner.setTelephone(telephone); dao.update(owner); return Response.seeOther(URI.create(owner.getUrl())).build(); }
@Override protected void initParameterAnnotationMgr() { super.initParameterAnnotationMgr(); parameterAnnotationMgr.register(PathParam.class, new PathParamAnnotationProcessor()); parameterAnnotationMgr.register(FormParam.class, new FormParamAnnotationProcessor()); parameterAnnotationMgr.register(CookieParam.class, new CookieParamAnnotationProcessor()); parameterAnnotationMgr.register(HeaderParam.class, new HeaderParamAnnotationProcessor()); parameterAnnotationMgr.register(QueryParam.class, new QueryParamAnnotationProcessor()); }
@POST @Path("login") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @AuthAnnotation public User login(@FormParam("userName") String userName, @FormParam("password") String password, @FormParam("verificationCode") String verificationCode, @FormParam("phone") Long phone) { // check not null return null; }
/** * Processes login requests. * @param username the asserted username * @param password the asserted password * @return a Response */ @POST @Produces(MediaType.TEXT_PLAIN) @ApiOperation( value = "Assert login credentials", notes = "Upon a successful login, a JWT will be returned in the response. This functionality requires authentication to be enabled.", response = String.class ) @ApiResponses(value = { @ApiResponse(code = 200, message = "Success"), @ApiResponse(code = 401, message = "Unauthorized") }) @AuthenticationNotRequired public Response validateCredentials(@FormParam("username") String username, @FormParam("password") String password) { final Authenticator auth = new Authenticator(username, password); try { final Principal principal = auth.authenticate(); if (principal != null) { LOGGER.info(SecurityMarkers.SECURITY_AUDIT, "Login succeeded (username: " + username + " / ip address: " + super.getRemoteAddress() + " / agent: " + super.getUserAgent() + ")"); final JsonWebToken jwt = new JsonWebToken(); final String token = jwt.createToken(principal); return Response.ok(token).build(); } } catch (AuthenticationException e) { LOGGER.warn(SecurityMarkers.SECURITY_AUDIT, "Unauthorized login attempt (username: " + username + " / ip address: " + super.getRemoteAddress() + " / agent: " + super.getUserAgent() + ")"); } return Response.status(Response.Status.UNAUTHORIZED).build(); }
@POST @Consumes({"application/x-www-form-urlencoded"}) @Path("/bookflights") @Produces("text/plain") public /*BookingInfo*/ Response bookFlights( @FormParam("userid") String userid, @FormParam("toFlightId") String toFlightId, @FormParam("toFlightSegId") String toFlightSegId, @FormParam("retFlightId") String retFlightId, @FormParam("retFlightSegId") String retFlightSegId, @FormParam("oneWayFlight") boolean oneWay) { try { String bookingIdTo = bs.bookFlight(userid, toFlightSegId, toFlightId); String bookingInfo = ""; String bookingIdReturn = null; if (!oneWay) { bookingIdReturn = bs.bookFlight(userid, retFlightSegId, retFlightId); bookingInfo = "{\"oneWay\":false,\"returnBookingId\":\"" + bookingIdReturn + "\",\"departBookingId\":\"" + bookingIdTo + "\"}"; } else { bookingInfo = "{\"oneWay\":true,\"departBookingId\":\"" + bookingIdTo + "\"}"; } return Response.ok(bookingInfo).build(); } catch (Exception e) { e.printStackTrace(); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } }
@POST @Path("/multipart-part") @Consumes(MediaType.MULTIPART_FORM_DATA) public static String getMultipartPart( @FormParam("content") final Part content) throws IOException { return content.getSubmittedFileName(); }
@POST @Consumes({"application/x-www-form-urlencoded"}) @Path("/bookflights") @Produces("text/plain") public /*BookingInfo*/ Response bookFlights( @FormParam("userid") String userid, @FormParam("toFlightId") String toFlightId, @FormParam("toFlightSegId") String toFlightSegId, @FormParam("retFlightId") String retFlightId, @FormParam("retFlightSegId") String retFlightSegId, @FormParam("oneWayFlight") boolean oneWay) { try { String bookingIdTo = bs.bookFlight(userid, toFlightSegId, toFlightId); String bookingInfo = ""; String bookingIdReturn = null; if (!oneWay) { bookingIdReturn = bs.bookFlight(userid, retFlightSegId, retFlightId); bookingInfo = "{\"oneWay\":false,\"returnBookingId\":\"" + bookingIdReturn + "\",\"departBookingId\":\"" + bookingIdTo + "\"}"; }else { bookingInfo = "{\"oneWay\":true,\"departBookingId\":\"" + bookingIdTo + "\"}"; } return Response.ok(bookingInfo).build(); } catch (Exception e) { e.printStackTrace(); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } }
@POST @Consumes({"application/x-www-form-urlencoded"}) @Path("/cancelbooking") @Produces("text/plain") public Response cancelBookingsByNumber( @FormParam("number") String number, @FormParam("userid") String userid) { try { bs.cancelBooking(userid, number); return Response.ok("booking " + number + " deleted.").build(); } catch (Exception e) { e.printStackTrace(); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } }
/** * Service endpoint that provide multiple types of results. * * @param sequences The input sequences in FASTA format. * @param outputOptions Comma delimited values output options * @return All results packed in JSON format. */ @POST @Produces("application/json") public Response getAll( @FormParam("sequences") String sequences, @FormParam("outputOptions") String outputOptions) { SequenceAnalysisServiceOutput output = new SequenceAnalysisServiceOutput(sequences, outputOptions); return Response.ok(output.toString()).build(); }
@RequiresPermissions("create") @Path("/create") @POST public Response create(@FormParam("name") String name){ URI location; if (name == null || name.isEmpty()) { location = Router.getURI(WikiResource::index); }else{ location = Router.getURI(WikiResource::renderPage, name); } return Response.seeOther(location).build(); }
@RequiresPermissions("delete") @Path("/delete") @POST public Single<Response> delete(@FormParam("id") String id){ return fiber((con) -> { await(con.rxUpdateWithParams(SQL.SQL_DELETE_PAGE, new JsonArray().add(id))); URI location = Router.getURI(WikiResource::index); return Response.seeOther(location).build(); }); }
@POST @Path("/loginAuth") public Single<Response> loginAuth(@FormParam("username") String username, @FormParam("password") String password, @FormParam("return_url") String returnUrl, @Context Session session, @Context RoutingContext ctx, @Context AuthProvider auth) throws URISyntaxException { if (username == null || username.isEmpty() || password == null || password.isEmpty()) return Single.just(Response.status(Status.BAD_REQUEST).build()); JsonObject authInfo = new JsonObject().put("username", username).put("password", password); return auth.rxAuthenticate(authInfo).map(user -> { ctx.setUser(user); if (session != null) { // the user has upgraded from unauthenticated to authenticated // session should be upgraded as recommended by owasp session.regenerateId(); } String redirectUrl = session.remove(REDIRECT_KEY); if (redirectUrl == null) redirectUrl = returnUrl; if (redirectUrl == null) redirectUrl = "/"; try { return Response.status(Status.FOUND).location(new URI(redirectUrl)).build(); } catch (URISyntaxException e) { throw new RuntimeException(e); } }).onErrorReturn(t -> { t.printStackTrace(); return Response.status(Status.FORBIDDEN).build(); }); }
@POST @Path("/plans/{plan}/{sync:sync|async}") @Consumes({ MediaType.APPLICATION_FORM_URLENCODED }) public Response annotate_POST_URLENCODED( @Context ServletContext servletContext, @Context HttpContext httpContext, @PathParam("plan") String planName, @PathParam("sync") String sync, @FormParam("text") @DefaultValue("") String text, @FormParam("sourcedb") @DefaultValue("") String sourcedb, @FormParam("sourceid") @DefaultValue("") String sourceid, MultivaluedMap<String,String> formParams ) throws Exception { return annotate(servletContext, httpContext, planName, text, sourcedb, sourceid, formParams, null, sync.equals("async")); }
/** * 创建任务. */ @POST @Path("kanbanCreateIssue") @Produces(MediaType.APPLICATION_JSON) public BaseDTO kanbanCreateIssue(@FormParam("name") String name, @FormParam("content") String content, @FormParam("sprintId") Long sprintId, @FormParam("step") String step, @FormParam("assigneeId") String assigneeId) throws Exception { String userId = currentUserHolder.getUserId(); PlmIssue plmIssue = new PlmIssue(); plmIssue.setName(name); plmIssue.setContent(content); PlmSprint plmSprint = plmSprintManager.get(sprintId); plmIssue.setPlmSprint(plmSprint); plmIssue.setPlmProject(plmSprint.getPlmProject()); plmIssue.setStep(step); plmIssue.setType("story"); plmIssue.setStatus("active"); plmIssue.setAssigneeId(assigneeId); plmIssue.setCreateTime(new Date()); plmIssue.setReporterId(userId); plmIssueManager.save(plmIssue); plmLogService.issueCreated(plmIssue); BaseDTO baseDto = new BaseDTO(); baseDto.setCode(200); return baseDto; }
@POST @Path("{id}") @Produces(MediaType.APPLICATION_JSON) @Consumes({MediaType.APPLICATION_FORM_URLENCODED}) public Cliente getById(@PathParam("id") int id, @QueryParam("citta") String citta, @FormParam("parametro") String nome) { Cliente c = new Cliente(); c.setNome(nome + " : " + id); c.setPartitaIva("658736457634"); c.setTelefono(citta); return c; }
@POST @Path("/validate") @Consumes({"application/x-www-form-urlencoded"}) @Produces(MediaType.APPLICATION_JSON) @ApiResponses(value = { @ApiResponse(code = 403, message = "Invalid user information")}) public CustomerSessionInfo validateCustomer(@FormParam("sessionId") String sessionId) { logger.info("Received customer validation request with session id {}", sessionId); CustomerSession customerSession = customerService.validateSession(sessionId); if (customerSession != null) { logger.info("Found customer session {}", customerSession); return new CustomerSessionInfo(customerSession); } throw new InvocationException(Status.FORBIDDEN, "invalid token"); }
@POST public BaseDTO log(@FormParam("username") String username, @FormParam("result") String result, @FormParam("reason") String reason, @FormParam("application") String application, @FormParam("logTime") String logTime, @FormParam("client") String client, @FormParam("server") String server, @FormParam("description") String description) { Date date = this.tryToParseTime(logTime); AccountLogDTO accountLogDto = new AccountLogDTO(); accountLogDto.setUsername(username); accountLogDto.setResult(result); accountLogDto.setReason(reason); accountLogDto.setApplication(application); accountLogDto.setLogTime(date); accountLogDto.setClient(client); accountLogDto.setServer(server); accountLogDto.setDescription(description); BaseDTO baseDto = new BaseDTO(); try { accountLogQueue.add(accountLogDto); baseDto.setCode(200); } catch (Exception ex) { logger.error(ex.getMessage(), ex); baseDto.setCode(500); baseDto.setMessage(ex.getMessage()); } return baseDto; }
@POST @Path("/changepassword") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @RolesAllowed("user") public Response handleChangePassword( @FormParam("oldPassword") final String oldPassword, @FormParam("newPassword") final String newPassword, @FormParam("confirmNewPassword") final String confirmNewPassword) { security.changePassword(oldPassword, newPassword, confirmNewPassword); return Response.ok().build(); }
/** * Performs client credential validation then dispatches to the appropriate * handler for a given grant type. */ @POST @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.APPLICATION_JSON) public OAuthTokenResponse dispatch( @ApiParam(allowableValues = "refresh_token, authorization_code") @FormParam("grant_type") final String grantType, @FormParam("code") final String code, @FormParam("assertion") final String assertion, @FormParam("aud") final String audience, @FormParam("refresh_token") final String refreshToken, @FormParam("jwks_uri") final URI jwksUri, @HeaderParam(HttpHeaders.AUTHORIZATION) final String authorization) { final String[] clientCredentials = HttpAuthorizationHeaders.parseBasicAuthorization(authorization); final String clientId = clientCredentials[0]; if (!clientValidator.isValid(grantType, clientId, clientCredentials[1])) { throw ErrorResponses.unauthorized(ErrorCodes.UNAUTHORIZED_CLIENT, "Unauthorized client", String.format("Basic realm=\"%s\", encoding=\"UTF-8\"", realmName)); } if (GrantTypes.REFRESH_TOKEN.equals(grantType)) { return handleRefreshGrant(refreshToken, clientId); } else if (GrantTypes.AUTHORIZATION_CODE.equals(grantType)) { return handleAuthorizationCodeGrant(code); } else if (GrantTypes.JWT_ASSERTION.equals(grantType)) { return handleJwtAssertionGrant(assertion, clientId, audience); } else { throw ErrorResponses.badRequest(ErrorCodes.UNSUPPORT_GRANT_TYPE, "Invalid grant type"); } }
/** * Performs client credential validation then invokes the revocation process * from the token cache. */ @POST @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.APPLICATION_JSON) public JsonObject revoke( @FormParam("token") final String token, @FormParam("token_type_hint") final String tokenTypeHint, @HeaderParam(HttpHeaders.AUTHORIZATION) final String authorization) { final String[] clientCredentials = HttpAuthorizationHeaders.parseBasicAuthorization(authorization); final String clientId = clientCredentials[0]; if (!clientValidator.isValid("revocation", clientId, clientCredentials[1])) { throw ErrorResponses.unauthorized(ErrorCodes.UNAUTHORIZED_CLIENT, "Unauthorized client", String.format("Basic realm=\"%s\", encoding=\"UTF-8\"", realmName)); } if (token == null) { throw ErrorResponses.invalidRequest("Missing token"); } if (tokenTypeHint != null && !"refresh_token".equals(tokenTypeHint)) { throw ErrorResponses.badRequest(ErrorCodes.UNSUPPORTED_TOKEN_TYPE, "Token type is not supported"); } tokenCache.revokeRefreshToken(token, clientId); LOG.debug("revoked token={}", token); final JsonObject okReturn = new JsonObject(); okReturn.addProperty("ok", 1); return okReturn; }
@POST @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.TEXT_PLAIN) public String helloHelloPost(@FormParam("me") final String me) { return "HelloHello " + me; }
@POST @Path("/browseflights") @Consumes({"application/x-www-form-urlencoded"}) @Produces("application/json") public TripFlightOptions browseFlights( @FormParam("fromAirport") String fromAirport, @FormParam("toAirport") String toAirport, @FormParam("oneWay") boolean oneWay) { TripFlightOptions options = new TripFlightOptions(); ArrayList<TripLegInfo> legs = new ArrayList<TripLegInfo>(); TripLegInfo toInfo = new TripLegInfo(); List<Flight> toFlights = flightService.getFlightByAirports(fromAirport, toAirport); toInfo.addFlightsOptions(toFlights); legs.add(toInfo); toInfo.setCurrentPage(0); toInfo.setHasMoreOptions(false); toInfo.setNumPages(1); toInfo.setPageSize(TripLegInfo.DEFAULT_PAGE_SIZE); if (!oneWay) { TripLegInfo retInfo = new TripLegInfo(); List<Flight> retFlights = flightService.getFlightByAirports(toAirport, fromAirport); retInfo.addFlightsOptions(retFlights); legs.add(retInfo); retInfo.setCurrentPage(0); retInfo.setHasMoreOptions(false); retInfo.setNumPages(1); retInfo.setPageSize(TripLegInfo.DEFAULT_PAGE_SIZE); options.setTripLegs(2); } else { options.setTripLegs(1); } options.setTripFlights(legs); return options; }
@POST @Path("/{id}/lock") @Consumes({ MediaType.APPLICATION_FORM_URLENCODED }) @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response lockEmployeeAccount(@Context HttpServletRequest request, @Context HttpHeaders header, @Context Company company, @Context Locale locale, @Context User user, @Context ServiceContext serviceContext, @PathParam("id") long id, @DefaultValue("false") @FormParam("locked") boolean locked);
@PUT @Path("/{id}/formscript") @Consumes({ MediaType.APPLICATION_FORM_URLENCODED }) @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ApiOperation(value = "update FormScript") @ApiResponses(value = { @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns"), @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class), @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class), @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) }) public Response updateRegistrationTemplateFormScript(@Context HttpServletRequest request, @Context HttpHeaders header, @Context Company company, @Context Locale locale, @Context User user, @Context ServiceContext serviceContext, @ApiParam(value = "id of registrationTemplate", required = true) @PathParam("id") long registrationTemplateId, @ApiParam(value = "FormScript of registrationTemplate", required = true) @FormParam("formScript") String formScript);
@PUT @Path("/{id}/formreport") @Consumes({ MediaType.APPLICATION_FORM_URLENCODED }) @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @ApiOperation(value = "update FormScript") @ApiResponses(value = { @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns"), @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class), @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class), @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) }) public Response updateRegistrationTemplateFormReport(@Context HttpServletRequest request, @Context HttpHeaders header, @Context Company company, @Context Locale locale, @Context User user, @Context ServiceContext serviceContext, @ApiParam(value = "id of registrationTemplateId", required = true) @PathParam("id") long registrationTemplateId, @ApiParam(value = "formReport of registrationTemplate", required = true) @FormParam("formReport") String formReport);
@POST @Path("/registrations/syncs") @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED }) @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED }) public Response registrationSyncs(@Context HttpServletRequest request, @Context HttpHeaders header, @Context Company company, @Context Locale locale, @Context User user, @Context ServiceContext serviceContext, @BeanParam RegistrationInputModel input, @FormParam("submitting") boolean submitting, @FormParam("uuid_") String uuid);