Package org.sonar.api.utils.text

Examples of org.sonar.api.utils.text.JsonWriter.endArray()


        .prop("language", profile.getLanguage())
        .prop("name", profile.getName())
        .prop("rulesUpdatedAt", UtcDateUtils.formatDateTime(profile.getRulesUpdatedAt()))
        .endObject();
    }
    writer.endArray();
    writer.close();
    return json.toString();
  }

  public UsedQProfiles add(UsedQProfiles other) {
View Full Code Here


          json.beginObject();
          json.prop("key", prop.getPropertyKey());
          json.prop("val", prop.getTextValue());
          json.endObject();
        }
        json.endArray().endObject();
      }

      json.endArray();
      json.endObject();
      json.close();
View Full Code Here

          json.endObject();
        }
        json.endArray().endObject();
      }

      json.endArray();
      json.endObject();
      json.close();
    } finally {
      dbSession.close();
    }
View Full Code Here

      }
    });
    for (Controller controller : ordering.sortedCopy(controllers)) {
      writeController(writer, controller, includeInternals);
    }
    writer.endArray();
    writer.endObject();
    writer.close();
  }

  private void writeController(JsonWriter writer, Controller controller, boolean includeInternals) {
View Full Code Here

    JsonWriter json = response.newJsonWriter().beginObject();
    json.name("tags").beginArray();
    for (String tag : tags) {
      json.value(tag);
    }
    json.endArray().endObject().close();
  }
}
View Full Code Here

          .beginObject()
          .prop("id", favorite.id())
          .prop("name", favorite.name())
          .endObject();
      }
      json.endArray();
    }

    json.endObject();
    json.close();
  }
View Full Code Here

    writer.beginObject().prop("more", associations.hasMoreResults());
    writer.name("results").beginArray();
    for (ProjectQgateAssociation project : associations.projects()) {
      writer.beginObject().prop("id", project.id()).prop("name", project.name()).prop(QGatesWs.PARAM_SELECTED, project.isMember()).endObject();
    }
    writer.endArray().endObject().close();
  }

}
View Full Code Here

  public void handle(Request request, Response response) {
    JsonWriter writer = response.newJsonWriter().beginObject().name("qualitygates").beginArray();
    for (QualityGateDto qgate : qualityGates.list()) {
      QGatesWs.writeQualityGate(qgate, writer);
    }
    writer.endArray();
    QualityGateDto defaultQgate = qualityGates.getDefault();
    if (defaultQgate != null) {
      writer.prop("default", defaultQgate.getId());
    }
    writer.endObject().close();
View Full Code Here

    if (!conditions.isEmpty()) {
      writer.name("conditions").beginArray();
      for (QualityGateConditionDto condition : conditions) {
        QGatesWs.writeQualityGateCondition(condition, writer);
      }
      writer.endArray();
    }
    writer.endObject().close();
  }

  private void checkOneOfIdOrNamePresent(@Nullable Long qGateId, @Nullable String qGateName) {
View Full Code Here

        json.prop("shared", favorite.shared());
        // no need to export description and query fields
        json.endObject();
      }
    }
    json.endArray().endObject().close();
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.