[New] Added further i18n props to ServiceResult.i18n()

This commit is contained in:
Robert von Burg 2019-08-28 12:05:14 +02:00
parent c822f00473
commit 1627a60b9a
1 changed files with 26 additions and 2 deletions

View File

@ -145,14 +145,38 @@ public class ServiceResult {
@SuppressWarnings("unchecked")
public <T extends ServiceResult> T i18n(ResourceBundle bundle, String key, String prop, Object value) {
this.i18nMessage = new I18nMessage(bundle, key).value(prop, value);
this.i18nMessage = new I18nMessage(bundle, key) //
.value(prop, value);
return (T) this;
}
@SuppressWarnings("unchecked")
public <T extends ServiceResult> T i18n(ResourceBundle bundle, String key, String prop1, Object value1,
String prop2, Object value2) {
this.i18nMessage = new I18nMessage(bundle, key).value(prop1, value1).value(prop2, value2);
this.i18nMessage = new I18nMessage(bundle, key) //
.value(prop1, value1) //
.value(prop2, value2);
return (T) this;
}
@SuppressWarnings("unchecked")
public <T extends ServiceResult> T i18n(ResourceBundle bundle, String key, String prop1, Object value1,
String prop2, Object value2, String prop3, Object value3) {
this.i18nMessage = new I18nMessage(bundle, key) //
.value(prop1, value1) //
.value(prop2, value2) //
.value(prop3, value3);
return (T) this;
}
@SuppressWarnings("unchecked")
public <T extends ServiceResult> T i18n(ResourceBundle bundle, String key, String prop1, Object value1,
String prop2, Object value2, String prop3, Object value3, String prop4, Object value4) {
this.i18nMessage = new I18nMessage(bundle, key) //
.value(prop1, value1) //
.value(prop2, value2) //
.value(prop3, value3) //
.value(prop4, value4);
return (T) this;
}