コード例 #1
0
  @Override
  public void define(NewController context) {
    NewAction changelog =
        context
            .createAction("changelog")
            .setSince("5.2")
            .setDescription(
                "Get the history of changes on a quality profile: rule activation/deactivation, change in parameters/severity. "
                    + "Events are ordered by date in descending order (most recent first).")
            .setHandler(this)
            .setResponseExample(getClass().getResource("example-changelog.json"));

    QProfileIdentificationParamUtils.defineProfileParams(changelog, languages);

    changelog.addPagingParams(50);

    changelog
        .createParam(PARAM_SINCE)
        .setDescription("Start date for the changelog.")
        .setExampleValue("2011-04-25T01:15:42+0100");

    changelog
        .createParam(PARAM_TO)
        .setDescription("End date for the changelog.")
        .setExampleValue("2013-07-25T07:35:42+0200");
  }