Package org.sonar.api.server.ws

Examples of org.sonar.api.server.ws.WebService$Param


            JSONArray jsonArray = jsonObject.getJSONArray("params");
            for(int i=0; i<jsonArray.length(); i++) {
                try {
                    String paramName    = jsonArray.getJSONObject(i).getString("name");
                    String paramDefault = jsonArray.getJSONObject(i).getString("default");
                    Param param = request.addNewParam();
                    param.setName(paramName);
                    param.setDefault(paramDefault);
                    param.setStyle(ParamStyle.Enum.forString("query"));
                    param.setType("xs:string");
                } catch (JSONException ex) {
                    Logger.getLogger(WADLGenerator.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        } catch (JSONException ex) {
View Full Code Here


  }

  @Test
  public void defineFieldsParam() throws Exception {
    WebService.Context context = new WebService.Context();
    new WebService() {
      @Override
      public void define(Context context) {
        NewController newController = context.createController("api/foo");
        NewAction action = newController.createAction("search").setHandler(mock(RequestHandler.class));
        SearchOptions.defineFieldsParam(action, Lists.newArrayList("name", "lang", "severity"));
View Full Code Here

  }

  @Test
  public void definePageParams() throws Exception {
    WebService.Context context = new WebService.Context();
    new WebService() {
      @Override
      public void define(Context context) {
        NewController newController = context.createController("api/foo");
        NewAction action = newController.createAction("search").setHandler(mock(RequestHandler.class));
        SearchOptions.definePageParams(action);
View Full Code Here

TOP

Related Classes of org.sonar.api.server.ws.WebService$Param

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.