Example #1
0
 private void extractPlaintextResults(HBCIMsgStatus status, String header, int idx) {
   Properties result = status.getData();
   for (Enumeration e = result.keys(); e.hasMoreElements(); ) {
     String key = (String) (e.nextElement());
     if (key.startsWith(header + ".")) {
       jobResult.storeResult(
           HBCIUtilsInternal.withCounter("content", idx)
               + "."
               + key.substring(header.length() + 1),
           result.getProperty(key));
     }
   }
 }
Example #2
0
  protected SyntaxElement parseAndAppendNewElement(
      Node ref,
      String path,
      char predelim,
      int idx,
      StringBuffer res,
      int fullResLen,
      Document syntax,
      Hashtable<String, String> predefs,
      Hashtable<String, String> valids) {
    SyntaxElement ret = null;

    if (idx != 0 && valids != null) {
      String header = getPath() + ".value";
      for (Enumeration<String> e = valids.keys(); e.hasMoreElements(); ) {
        String key = (e.nextElement());

        if (key.startsWith(header) && key.indexOf(".", header.length()) == -1) {

          int dotPos = key.lastIndexOf('.');
          String newkey =
              key.substring(0, dotPos)
                  + HBCIUtilsInternal.withCounter("", idx)
                  + key.substring(dotPos);
          valids.put(newkey, valids.get(key));
        }
      }
    }

    addElement(
        (ret =
            DEFactory.getInstance()
                .createDE(
                    ref,
                    getName(),
                    path,
                    predelim,
                    idx,
                    res,
                    fullResLen,
                    syntax,
                    predefs,
                    valids)));
    return ret;
  }