Package com.atlassian.bamboo.util
Class TextProviderUtils
java.lang.Object
com.atlassian.bamboo.util.TextProviderUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic com.opensymphony.xwork2.TextProvidertextSupplier(com.atlassian.sal.api.message.I18nResolver i18nResolver, String key, String... params) textSupplier(com.opensymphony.xwork2.TextProvider textProvider, String key, String... params) One can utilize this method together with BambooPreconditions:BambooPreconditions.checkThat(1==1, ArithmeticException::new, textSupplier("arithmetic.incomplete", "1==1"));Thanks to a supplier creation of the error message is deferred until error condition actually occurs.
-
Method Details
-
getText
-
getText
-
textSupplier
public static Supplier<String> textSupplier(com.opensymphony.xwork2.TextProvider textProvider, String key, String... params) One can utilize this method together with BambooPreconditions:BambooPreconditions.checkThat(1==1, ArithmeticException::new, textSupplier("arithmetic.incomplete", "1==1"));Thanks to a supplier creation of the error message is deferred until error condition actually occurs.- Parameters:
textProvider- A TextProvider instancekey- Key to look up in the text providerparams- Parameters for the given key- Returns:
-
textSupplier
-
getHtml
-
getHtml
-
getTextProvider
public static com.opensymphony.xwork2.TextProvider getTextProvider() -
getText
-