Exemple #1
0
  public static List<String> parseDirectRecipients(DirectDocuments documents) {

    List<String> ret = new ArrayList();
    for (String recipient : documents.getSubmissionSet().getIntendedRecipient()) {

      String address = StringUtils.splitPreserveAllTokens(recipient, "|")[2];
      ret.add(parseXTN(address));
    }
    return ret;
  }
Exemple #2
0
  // based on old XDR stuff
  public static List<String> parseRecipients(DirectDocuments documents) {

    List<String> ret = new ArrayList();
    for (String recipient : documents.getSubmissionSet().getIntendedRecipient()) {
      if (recipient.startsWith("|")) {
        String address = StringUtils.remove(recipient, "|");
        ret.add(StringUtils.splitPreserveAllTokens(address, "^")[0]);
      } else {
        String id = getId(recipient);
        ret.add(id);
      }
    }
    return ret;
  }