public ConstantAuthenticator (@Nullable final String sDomain, @Nonnull final String sUserName, @Nonnull final String sPassword) { this (StringHelper.getConcatenatedOnDemand (sDomain, DOMAIN_SEPARATOR, sUserName), sPassword); }
@Nonnull private static String _getRealMessage (@Nullable final String sMsg, @Nullable final Throwable aCause) { final String ret = StringHelper.getNotNull (sMsg); final String sFaultMessage = SMLExceptionHelper.getFaultMessage (aCause); return StringHelper.getConcatenatedOnDemand (ret, " - ", sFaultMessage); }
@Nonnull private static String _getRealMessage (@Nullable final String sMsg, @Nullable final Throwable aCause) { final String ret = StringHelper.getNotNull (sMsg); final String sFaultMessage = SMLExceptionHelper.getFaultMessage (aCause); return StringHelper.getConcatenatedOnDemand (ret, " - ", sFaultMessage); }
@Nullable public String getDisplayText (@Nonnull final Locale aContentLocale) { return StringHelper.getConcatenatedOnDemand (aThis.getDisplayText (aContentLocale), " + ", aOther.getDisplayText (aContentLocale)); } };
@Override @Nonnull public String getPlainText () { return StringHelper.getConcatenatedOnDemand (m_aHead.getPlainText (), " ", m_aBody.getPlainText ()); }
/** * Create the request HTTP header value for use with the * {@link com.helger.commons.http.CHttpHeader#AUTHORIZATION} header name. * * @return The HTTP header value to use. Neither <code>null</code> nor empty. */ @Nonnull @Nonempty public String getRequestValue () { final String sCombined = StringHelper.getConcatenatedOnDemand (m_sUserName, HttpBasicAuth.USERNAME_PASSWORD_SEPARATOR, m_sPassword); return HttpBasicAuth.HEADER_VALUE_PREFIX_BASIC + " " + Base64.safeEncode (sCombined, HttpBasicAuth.CHARSET); }
@Nonnull @Nonempty default String getAsString () { return StringHelper.getConcatenatedOnDemand (getName (), ' ', getValue ()); }
@Nonnull @Nonempty public static String getApplicationTitleAndVersion () { return StringHelper.getConcatenatedOnDemand (getApplicationTitle (), " ", CSMPServer.getVersionNumber ()); } }
@Nonnull @Nonempty public static String getApplicationTitleAndVersion () { return StringHelper.getConcatenatedOnDemand (getApplicationTitle (), " ", CSMPServer.getVersionNumber ()); } }
if (aObjStart[2] != null) sValue = StringHelper.getConcatenatedOnDemand (aObjStart[0], aObjStart[2]).trim (); if (sValue.length () > 0)
/** * Set the storage file provider to the default before v8.0.3. The difference to * {@link #setDefaultStorageFileProvider()} is, that this version does not * contain a "month" subfolder. * * @see #setStorageFileProvider(IFunction) * @since 8.0.3 */ public static void setDefaultStorageFileProviderUpTo802 () { setStorageFileProvider (aMetadata -> { final LocalDateTime aNow = PDTFactory.getCurrentLocalDateTime (); final String sFilename = StringHelper.getConcatenatedOnDemand (PDTIOHelper.getLocalDateTimeForFilename (aNow), "-", aMetadata.getErrorID ()) + ".xml"; return WebFileIO.getDataIO ().getFile ("internal-errors/" + aNow.getYear () + "/" + sFilename); }); } }
/** * Set the default storage file provider. In case you played around and want to * restore the default behavior. * * @see #setStorageFileProvider(IFunction) * @since 8.0.3 */ public static void setDefaultStorageFileProvider () { setStorageFileProvider (aMetadata -> { final LocalDateTime aNow = PDTFactory.getCurrentLocalDateTime (); final String sFilename = StringHelper.getConcatenatedOnDemand (PDTIOHelper.getLocalDateTimeForFilename (aNow), "-", aMetadata.getErrorID ()) + ".xml"; return WebFileIO.getDataIO () .getFile ("internal-errors/" + aNow.getYear () + "/" + StringHelper.getLeadingZero (aNow.getMonthValue (), 2) + "/" + sFilename); }); }
aHead.setPageTitle (StringHelper.getConcatenatedOnDemand (CSMP.getApplicationTitle (), " - ", aMenuItem.getDisplayText (aDisplayLocale)));
aHead.setPageTitle (StringHelper.getConcatenatedOnDemand (CSMP.getApplicationTitle (), " - ", aMenuItem.getDisplayText (aDisplayLocale)));