Ejemplo n.º 1
0
  @SuppressWarnings({"unchecked", "resource"})
  private ElementScript getClassName(Node node, String normailzator) {
    String value = XMLUtil.getTextContent(node, ".", true);
    ValueSourceType qsSourceType =
        ValueSourceType.valueOf(XMLUtil.getTextContent(node, "@source", true, "STATIC", true));
    try {
      if (qsSourceType == ValueSourceType.GROOVY_FILE
          || qsSourceType == ValueSourceType.FILE
          || qsSourceType == ValueSourceType.JAVA_CLASS) {
        return new ElementScript(qsSourceType, value);
      } else {
        AppEnv.logger.errorLogEntry(
            "Included script did not implemented, form rule="
                + parentRule.getID()
                + ", node="
                + node.getBaseURI());
      }

    } catch (MultipleCompilationErrorsException e) {
      AppEnv.logger.errorLogEntry(
          "Script compilation error at form rule compiling="
              + parentRule.getID()
              + ", node="
              + node.getBaseURI());
      AppEnv.logger.errorLogEntry(e.getMessage());
    }
    return null;
  }