@Test public void testFallbackIgnore() { String testInput = "my_field"; String result = underTest.fallbackIfRequired(testInput, "spec label", true, false, true, null, null); assertEquals("spec label", result); }
public String fallbackIfRequired(String field, String label, boolean replaceUnderscore, boolean replaceUppercaseInWord, boolean capitalizeAll) { if (isEnabled() && StringUtils.isBlank(label)) { return fallback(field,replaceUnderscore, replaceUppercaseInWord, capitalizeAll); } return label; }
LabelFallbackHandler { public String fallbackIfRequired(String field, String label, boolean replaceUnderscore, boolean replaceUppercaseInWord, boolean capitalizeAll) { if (isEnabled() && StringUtils.isBlank(label)) { return fallback(field,replaceUnderscore, replaceUppercaseInWord, capitalizeAll); } return label; } }
LabelFallbackHandler { public String fallbackIfRequired(String field, String label, boolean replaceUnderscore, boolean replaceUppercaseInWord, boolean capitalizeAll) { if (isEnabled() && StringUtils.isBlank(label)) { return fallback(field,replaceUnderscore, replaceUppercaseInWord, capitalizeAll); } return label; } @Inject  LabelFallbackHandler(UIMappingConfig uiMappingConfig); }
LabelFallbackHandler { public String fallbackIfRequired(String field, String label, boolean replaceUnderscore, boolean replaceUppercaseInWord, boolean capitalizeAll) { if (isEnabled() && StringUtils.isBlank(label)) { return fallback(field,replaceUnderscore, replaceUppercaseInWord, capitalizeAll); } return label; } @Inject  LabelFallbackHandler(UIMappingConfig uiMappingConfig); String fallbackIfRequired(String field, String label, boolean replaceUnderscore,
                                   boolean replaceUppercaseInWord, boolean capitalizeAll); String fallbackIfRequired(String field, String label, boolean replaceUnderscore,
                                   boolean replaceUppercaseInWord, boolean capitalizeAll, List<String> prefixesToRemove, List<String> suffixesToRemove); String fallback(String field, boolean replaceUnderscore, boolean replaceUppercaseInWord, boolean capitalizeAll); String fallback(String field, boolean replaceUnderscore, boolean replaceUppercaseInWord, boolean capitalizeAll,
                         List<String> prefixesToRemove,  List<String> suffixesToRemove); boolean isEnabled(); }
LabelFallbackHandler { public String fallbackIfRequired(String field, String label, boolean replaceUnderscore, boolean replaceUppercaseInWord, boolean capitalizeAll) { if (isEnabled() && StringUtils.isBlank(label)) { return fallback(field,replaceUnderscore, replaceUppercaseInWord, capitalizeAll); } return label; } @Inject  LabelFallbackHandler(UIMappingConfig uiMappingConfig); String fallbackIfRequired(String field, String label, boolean replaceUnderscore,
                                   boolean replaceUppercaseInWord, boolean capitalizeAll); String fallbackIfRequired(String field, String label, boolean replaceUnderscore,
                                   boolean replaceUppercaseInWord, boolean capitalizeAll, List<String> prefixesToRemove, List<String> suffixesToRemove); String fallback(String field, boolean replaceUnderscore, boolean replaceUppercaseInWord, boolean capitalizeAll); String fallback(String field, boolean replaceUnderscore, boolean replaceUppercaseInWord, boolean capitalizeAll,
                         List<String> prefixesToRemove,  List<String> suffixesToRemove); boolean isEnabled();  }