Package io.jmix.ui.component.formatter
Class FormatterLoadFactory
java.lang.Object
io.jmix.ui.component.formatter.FormatterLoadFactory
Specific bean for loading formatters.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
protected final Map<String,
BiFunction<org.dom4j.Element, FormatterLoadFactory.Context, ? extends Formatter>> protected MessageTools
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionFormatter<?>
createFormatter
(org.dom4j.Element element, FormatterLoadFactory.Context context) Creates a formatter from XML element.boolean
isFormatter
(org.dom4j.Element element) Checks if XML element is a formatter.protected CollectionFormatter
loadCollectionFormatter
(org.dom4j.Element element, FormatterLoadFactory.Context context) protected Formatter
loadCustomFormatter
(org.dom4j.Element element, FormatterLoadFactory.Context context) protected DateFormatter
loadDateFormatter
(org.dom4j.Element element, FormatterLoadFactory.Context context) protected String
loadFormat
(String format, String messageGroup) protected NumberFormatter
loadNumberFormatter
(org.dom4j.Element element, FormatterLoadFactory.Context context) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setMessageTools
(MessageTools messageTools)
-
Field Details
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
messageTools
-
FORMATTERS_MAP
protected final Map<String,BiFunction<org.dom4j.Element, FORMATTERS_MAPFormatterLoadFactory.Context, ? extends Formatter>>
-
-
Constructor Details
-
FormatterLoadFactory
public FormatterLoadFactory()
-
-
Method Details
-
setApplicationContext
@Autowired public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) -
setMessageTools
-
createFormatter
@Nullable public Formatter<?> createFormatter(org.dom4j.Element element, FormatterLoadFactory.Context context) Creates a formatter from XML element.- Parameters:
element
- XML element- Returns:
- formatter or null if there is no such element
-
isFormatter
public boolean isFormatter(org.dom4j.Element element) Checks if XML element is a formatter.- Parameters:
element
- XML element- Returns:
true
if the element is formatter,false
otherwise
-
loadCollectionFormatter
protected CollectionFormatter loadCollectionFormatter(org.dom4j.Element element, FormatterLoadFactory.Context context) -
loadCustomFormatter
protected Formatter loadCustomFormatter(org.dom4j.Element element, FormatterLoadFactory.Context context) -
loadDateFormatter
protected DateFormatter loadDateFormatter(org.dom4j.Element element, FormatterLoadFactory.Context context) -
loadNumberFormatter
protected NumberFormatter loadNumberFormatter(org.dom4j.Element element, FormatterLoadFactory.Context context) -
loadFormat
-