Exemplo n.º 1
0
  /**
   * 功能描述:保存修改好的jsonschema内容
   *
   * @return
   * @author <a href="mailto:[email protected]">李伟光 </a> created on: 2015-9-1
   */
  public String saveJsonSchema() {
    long curUserId = getCurUserId();
    if (curUserId <= 0) {
      setIsOk(false);
      setErrMsg(LOGIN_WARN_MSG);
      return JSON_ERROR;
    }

    boolean isOk = false;
    // System.out.println("actionId:" + actionId);
    // System.out.println("newJsonSchema:" + newJsonSchema);
    validationMgr.saveJsonSchema(actionId, newJsonSchema);
    isOk = true;

    if (isOk) {
      setJson("{\"isOk\":true}");
    }
    return SUCCESS;
  }
Exemplo n.º 2
0
  /**
   * 功能描述:generate JsonSchema for every API
   *
   * @return
   * @author <a href="mailto:[email protected]">李伟光 </a> created on: 2015-8-31
   */
  public String generateJsonSchema() {
    long curUserId = getCurUserId();
    if (curUserId <= 0) {
      setIsOk(false);
      setErrMsg(LOGIN_WARN_MSG);
      return JSON_ERROR;
    }

    boolean isOk = false;
    // System.out.println("ActionId():" + this.actionId);
    // System.out.println("projectId:"+ this.projectId);
    validationMgr.saveJsonSchema(
        this.actionId, validationMgr.generateJsonSchema(this.actionId, this.projectId));
    isOk = true;

    if (isOk) {
      setJson("{\"isOk\":true}");
    }
    return SUCCESS;
  }