コード例 #1
0
  /**
   * @param path
   * @return
   */
  private boolean handlePrimitivePath(Path path) {
    PrimitiveInputController inputController =
        new PrimitiveInputController(path, new PrimitiveInputControllerDataTypeAdapter(path));
    FormInput input = formGenerator.addPrimitiveInput(getRootContainer(), inputController);
    getRootContainer().getInputs().add(input);

    getFullPathInputControllerMap().put("/" + path.getId(), inputController);
    getTopLevelInputControllerMap().put(path.getId(), inputController);

    return true;
  }
コード例 #2
0
  /**
   * @param systemPath
   * @return
   */
  private boolean handleSystemPath(IppSystemPath systemPath) {
    PrimitiveInputController inputController =
        new PrimitiveInputController(
            systemPath, new PrimitiveInputControllerDataTypeAdapter(systemPath));

    FormInput input = null;
    if (systemPath.isEnumeration()) {
      input = formGenerator.addEnumerationInput(getRootContainer(), inputController);
    } else if (systemPath.isPrimitive()) {
      input = formGenerator.addPrimitiveInput(getRootContainer(), inputController);
    }

    if (null != input) {
      getRootContainer().getInputs().add(input);
      getFullPathInputControllerMap().put("/" + systemPath.getId(), inputController);
      getTopLevelInputControllerMap().put(systemPath.getId(), inputController);

      return true;
    } else {
      return false;
    }
  }