Gibt zu einer gegebenen Bankleitzahl die PIN/TAN-URL
zurück.

@param blz Bankleitzahl der Bank
@return PIN/TAN-URL. Falls keine URL bekannt
ist, wird ein leerer String zurückgegeben.
@deprecated Bitte {@link HBCIUtils#getBankInfo(String)} verwenden.
766917
public static String getPinTanURLForBLZ(String blz) {
        BankInfo info = getBankInfo(blz);
        if (info == null)
            return "";
        return info.getPinTanAddress() != null ? info.getPinTanAddress() : "";
    }
523917
public BaseDestinationDefinition getSIBDestination(String busName, String name) throws SIBExceptionBase, SIBExceptionDestinationNotFound {

        String thisMethodName = "getSIBDestination";

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.entry(tc, thisMethodName, new Object[] { busName, name });
        }

        BaseDestinationDefinition bdd = null;
        if (oldDestCache == null) {
            bdd = (BaseDestinationDefinition) _bus.getDestinationCache().getSIBDestination(busName, name).clone();
        } else {
            bdd = (BaseDestinationDefinition) oldDestCache.getSIBDestination(busName, name).clone();
        }

        // Resolve Exception Destination if necessary
        resolveExceptionDestination(bdd);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.exit(tc, thisMethodName, bdd);
        }

        return bdd;
    }
186154
private BTag createDay(AccountReport12 report) {
        BTag tag = new BTag();
        tag.start = new Saldo();
        tag.end = new Saldo();
        tag.starttype = 'F';
        tag.endtype = 'F';

        ////////////////////////////////////////////////////////////////
        // Start- un End-Saldo ermitteln
        final long day = 24 * 60 * 60 * 1000L;
        for (CashBalance3 bal : report.getBal()) {
            BalanceType12Code code = bal.getTp().getCdOrPrtry().getCd();

            // Schluss-Saldo vom Vortag
            if (code == BalanceType12Code.PRCD) {
                tag.start.value = new Value(this.checkDebit(bal.getAmt().getValue(), bal.getCdtDbtInd()));
                tag.start.value.setCurr(bal.getAmt().getCcy());

                //  Wir erhoehen noch das Datum um einen Tag, damit aus dem
                // Schlusssaldo des Vortages der Startsaldo des aktuellen Tages wird.
                tag.start.timestamp = new Date(SepaUtil.toDate(bal.getDt().getDt()).getTime() + day);
            }

            // End-Saldo
            else if (code == BalanceType12Code.CLBD) {
                tag.end.value = new Value(this.checkDebit(bal.getAmt().getValue(), bal.getCdtDbtInd()));
                tag.end.value.setCurr(bal.getAmt().getCcy());
                tag.end.timestamp = SepaUtil.toDate(bal.getDt().getDt());
            }
        }
        //
        ////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////
        // Das eigene Konto ermitteln
        CashAccount25 acc = report.getAcct();
        tag.my = new Konto();
        tag.my.iban = trim(acc.getId().getIBAN());
        tag.my.curr = trim(acc.getCcy());

        BranchAndFinancialInstitutionIdentification5 bank = acc.getSvcr();
        if (bank != null && bank.getFinInstnId() != null)
            tag.my.bic = trim(bank.getFinInstnId().getBICFI());
        ////////////////////////////////////////////////////////////////

        return tag;
    }
26915
void fetchBPDAnonymous() {
        // BPD abholen, wenn nicht vorhanden oder HBCI-Version geaendert
        Map<String, String> bpd = passport.getBPD();
        String hbciVersionOfBPD = (bpd != null) ? bpd.get(BPD_KEY_HBCIVERSION) : null;

        final String version = passport.getBPDVersion();
        if (version.equals("0") || isBPDExpired() || hbciVersionOfBPD == null || !hbciVersionOfBPD.equals(passport.getHBCIVersion())) {
            try {
                // Wenn wir die BPD per anonymem Dialog neu abrufen, muessen wir sicherstellen,
                // dass die BPD-Version im Passport auf "0" zurueckgesetzt ist. Denn wenn die
                // Bank den anonymen Abruf nicht unterstuetzt, wuerde dieser Abruf hier fehlschlagen,
                // der erneute Versuch mit authentifiziertem Dialog wuerde jedoch nicht zum
                // Neuabruf der BPD fuehren, da dort (in HBCIUser#fetchUPD bzw. HBCIDialog#doDialogInit)
                // weiterhin die (u.U. ja noch aktuelle) BPD-Version an die Bank geschickt wird
                // und diese daraufhin keine neuen BPD schickt. Das wuerde in einer endlosen
                // Schleife enden, in der wir hier immer wieder versuchen wuerden, neu abzurufen
                // (weil expired). Siehe https://www.willuhn.de/bugzilla/show_bug.cgi?id=1567
                // Also muessen wir die BPD-Version auf 0 setzen. Fuer den Fall, dass wir in dem
                // "if" hier aus einem der anderen beiden o.g. Gruende (BPD-Expiry oder neue HBCI-Version)
                // gelandet sind.
                if (!version.equals("0")) {
                    log.info("resetting BPD version from " + version + " to 0");
                    passport.getBPD().put("BPA.version", "0");
                }

                passport.getCallback().status(HBCICallback.STATUS_INST_BPD_INIT, null);
                log.info("fetching BPD");

                HBCIMsgStatus msgStatus = anonymousDialogInit();

                updateBPD(msgStatus.getData());

                if (!msgStatus.isDialogClosed()) {
                    anonymousDialogEnd(msgStatus.getData());
                }

                if (!msgStatus.isOK()) {
                    log.error("fetching BPD failed");
                    throw new ProcessException(HBCIUtils.getLocMsg("ERR_INST_BPDFAILED"), msgStatus);
                }
            } catch (HBCI_Exception e) {
                if (e.isFatal())
                    throw e;
            } catch (Exception e) {
                // Viele Kreditinstitute unterstützen den anonymen Login nicht. Dass sollte nicht als Fehler den
                // Anwender beunruhigen
                log.info("FAILED! - maybe this institute does not support anonymous logins");
                log.info("we will nevertheless go on");
            }
        }

        // ueberpruefen, ob angeforderte sicherheitsmethode auch
        // tatsaechlich unterstuetzt wird
        log.debug("checking if requested hbci parameters are supported");
        if (passport.getBPD() != null) {
            if (!Arrays.asList(passport.getSuppVersions()).contains(passport.getHBCIVersion())) {
                String msg = HBCIUtils.getLocMsg("EXCMSG_VERSIONNOTSUPP");
                throw new InvalidUserDataException(msg);
            }
        } else {
            log.warn("can not check if requested parameters are supported");
        }
    }
590966
public static String validate(String zahl) {
        try {
            return Geldbetrag.valueOf(zahl).toString();
        } catch (IllegalArgumentException ex) {
            throw new InvalidValueException(zahl, "money_amount", ex);
        }
    }
1325841
@Deprecated
    public static String validate(String blz) {
        return VALIDATOR.validate(PackedDecimal.of(blz)).toString();
    }
202964
public static String getWebRoot()
	{
		if (webroot != null) {
			return webroot;
		}
		try
		{
			String path = BeetlUtil.class.getClassLoader().getResource("").toURI().getPath();
			if (path == null)
			{
				throw new RuntimeException("Beetl未能自动检测到WebRoot，请手工指定WebRoot路径");
			}
			File file = new File(path);
			String root = null;
			if(file.getParentFile()!=null&&file.getParentFile().getParentFile()!=null) {
				root = file.getParentFile().getParentFile().getCanonicalPath();
			}else {
				throw new RuntimeException("Beetl检测到Beetl.jar位于"+path+"但未能自动检测到WebRoot，请手工指定WebRoot路径");
			}
			
			return root;
		}

		catch (IOException e)
		{
			throw new RuntimeException(e);
		}
		catch (URISyntaxException e)
		{
			throw new RuntimeException(e);
		}

	}
1331556
public byte[] getRawBlobContent(GitlabProject project, String sha) throws IOException {
        String tailUrl = GitlabProject.URL + "/" + project.getId() + "/repository/blobs/" + sha + "/raw";
        return retrieve().to(tailUrl, byte[].class);
    }
502057
@SuppressWarnings("unchecked")
	public Account getAccByLabel(final String labelAccount) {
		DetachedCriteria criteria = DetachedCriteria.forClass(Account.class);
		criteria.add(Restrictions.eq(Account.PROP_LABEL, labelAccount));
		List<Account> acc = getHibernateTemplate().findByCriteria(criteria); 
		if (acc.size() != 0) { return acc.get(0);
		} else { return null; }
		
	}
461488
public String getHBCICode() {
        StringBuffer ret = null;

        // Macht aus z.Bsp. "KUmsZeit5" -> "KUmsZeitPar5.SegHead.code"
        StringBuilder searchString = new StringBuilder(name);
        for (int i = searchString.length() - 1; i >= 0; i--) {
            if (!(searchString.charAt(i) >= '0' && searchString.charAt(i) <= '9')) {
                searchString.insert(i + 1, "Par");
                searchString.append(".SegHead.code");
                break;
            }
        }

        StringBuilder tempkey = new StringBuilder();

        // durchsuchen aller param-segmente nach einem job mit dem jobnamen des
        // aktuellen jobs
        for (String key : passport.getBPD().keySet()) {
            if (key.indexOf("Params") == 0) {
                tempkey.setLength(0);
                tempkey.append(key);
                tempkey.delete(0, tempkey.indexOf(".") + 1);

                if (tempkey.toString().equals(searchString.toString())) {
                    ret = new StringBuffer(passport.getBPD().get(key));
                    ret.replace(1, 2, "K");
                    ret.deleteCharAt(ret.length() - 1);
                    break;
                }
            }
        }

        if (ret != null) {
            return ret.toString();
        }
        return null;
    }
290032
public ForeignBusDefinition getForeignBus(String busName) {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "getForeignBus", busName);

        JsBus jsBus = (JsBus) _engine.getBus();
        ForeignBusDefinition foreignBusDefinition = jsBus
                        .getForeignBus(busName);

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "getForeignBus", foreignBusDefinition);

        return foreignBusDefinition;
    }
468307
private BTag createDay(AccountReport9 report) {
        BTag tag = new BTag();
        tag.start = new Saldo();
        tag.end = new Saldo();
        tag.starttype = 'F';
        tag.endtype = 'F';

        ////////////////////////////////////////////////////////////////
        // Start- un End-Saldo ermitteln
        final long day = 24 * 60 * 60 * 1000L;
        for (CashBalance1 bal : report.getBal()) {
            BalanceType8Code code = bal.getTp().getCd();

            // Schluss-Saldo vom Vortag.
            if (code == BalanceType8Code.PRCD) {
                tag.start.value = new Value(this.checkDebit(bal.getAmt().getValue(), bal.getCdtDbtInd()));
                tag.start.value.setCurr(bal.getAmt().getCcy());

                //  Wir erhoehen noch das Datum um einen Tag, damit aus dem
                // Schlusssaldo des Vortages der Startsaldo des aktuellen Tages wird.
                tag.start.timestamp = new Date(SepaUtil.toDate(bal.getDt().getDt()).getTime() + day);
            }

            // End-Saldo
            else if (code == BalanceType8Code.CLBD) {
                tag.end.value = new Value(this.checkDebit(bal.getAmt().getValue(), bal.getCdtDbtInd()));
                tag.end.value.setCurr(bal.getAmt().getCcy());
                tag.end.timestamp = SepaUtil.toDate(bal.getDt().getDt());
            }
        }
        //
        ////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////
        // Das eigene Konto ermitteln
        CashAccount13 acc = report.getAcct();
        tag.my = new Konto();
        tag.my.iban = trim(acc.getId().getIBAN());
        tag.my.curr = trim(acc.getCcy());

        BranchAndFinancialInstitutionIdentification3 bank = acc.getSvcr();
        if (bank != null && bank.getFinInstnId() != null)
            tag.my.bic = trim(bank.getFinInstnId().getBIC());
        ////////////////////////////////////////////////////////////////

        return tag;
    }
674745
public static MozuUrl getTransactionsUrl(Integer accountId)
	{
		UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/transactions");
		formatter.formatUrl("accountId", accountId);
		return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
	}
737989
public BaseDestinationDefinition getSIBDestinationByUuid(String busName, String uuid) throws SIBExceptionBase, SIBExceptionDestinationNotFound {

        String thisMethodName = "getSIBDestinationByUuid";

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.entry(tc, thisMethodName, new Object[] { busName, uuid });
        }

        BaseDestinationDefinition bdd = getSIBDestinationByUuid(busName, uuid, false);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.exit(tc, thisMethodName, bdd);
        }

        return bdd;
    }
334910
@Override
	public String getWebInterfaceURL() {
		try {
			return getWebMonitorBaseUrl().get().toString();
		} catch (InterruptedException | ExecutionException e) {
			ExceptionUtils.checkInterrupted(e);

			log.warn("Could not retrieve the web interface URL for the cluster.", e);
			return "Unknown address.";
		}
	}
1350930
public static String queryBank(Map<String, String> params, String certPath, String certPassword) {
		return WxPayApi.doPostSSL(QUERY_BANK_URL, params, certPath, certPassword);
	}
1210767
public static MozuUrl deleteB2BAccountAttributeUrl(Integer accountId, String attributeFQN)
	{
		UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/b2baccounts/{accountId}/attributes/{attributeFQN}");
		formatter.formatUrl("accountId", accountId);
		formatter.formatUrl("attributeFQN", attributeFQN);
		return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
	}