Package org.camunda.spin
Class DataFormats
java.lang.Object
org.camunda.spin.DataFormats
Provides access to all builtin data formats.
- Author:
- Sebastian Menski, Daniel Meyer
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
applyConfigurator
(Map<String, DataFormat<?>> dataFormats, DataFormatConfigurator configurator) protected void
applyConfigurators
(Map<String, DataFormat<?>> dataFormats, ClassLoader classloader) protected void
applyConfigurators
(Map<String, DataFormat<?>> dataFormats, ClassLoader classloader, List<DataFormatConfigurator> dataFormatConfigurators) protected void
Detect all available dataformats on the classpath using aServiceLoader
.Set<DataFormat<? extends Spin<?>>>
static Set<DataFormat<? extends Spin<?>>>
static DataFormat<? extends Spin<?>>
getDataFormat
(String dataFormatName) Returns the registered data format for the given name.DataFormat<? extends Spin<?>>
getDataFormatByName
(String name) static DataFormats
Provides the global instance of the DataFormats manager.static DataFormat<SpinJsonNode>
json()
Returns the global json data format that can be provided with configuration that applies to any Spin json operation.static void
static void
loadDataFormats
(ClassLoader classloader) static void
loadDataFormats
(ClassLoader classloader, List<DataFormatConfigurator> configurators) static void
loadDataFormats
(ClassLoader classloader, Map configurationProperties) protected void
registerCustomDataFormats
(Map<String, DataFormat<?>> dataFormats, ClassLoader classloader) protected void
registerCustomDataFormats
(Map<String, DataFormat<?>> dataFormats, ClassLoader classloader, Map<String, Object> configurationProperties) void
registerDataFormats
(ClassLoader classloader) void
registerDataFormats
(ClassLoader classloader, List<DataFormatConfigurator> configurators) void
registerDataFormats
(ClassLoader classloader, List<DataFormatConfigurator> configurators, Map<String, Object> configurationProperties) protected void
registerProvider
(Map<String, DataFormat<?>> dataFormats, DataFormatProvider provider) protected void
registerProvider
(Map<String, DataFormat<?>> dataFormats, DataFormatProvider provider, Map<String, Object> configurationProperties) static DataFormat<SpinXmlElement>
xml()
Returns the global xml data format that can be provided with configuration that applies to any Spin xml operation.
-
Field Details
-
JSON_DATAFORMAT_NAME
-
XML_DATAFORMAT_NAME
-
availableDataFormats
-
-
Constructor Details
-
DataFormats
public DataFormats()
-
-
Method Details
-
getInstance
Provides the global instance of the DataFormats manager.- Returns:
- the global instance.
-
xml
Returns the global xml data format that can be provided with configuration that applies to any Spin xml operation. -
json
Returns the global json data format that can be provided with configuration that applies to any Spin json operation. -
getDataFormat
Returns the registered data format for the given name.- Parameters:
dataFormatName
- the name of the data format- Returns:
- the data format or null if non is registered for this name
-
getAvailableDataFormats
- Returns:
- a set of all registered data formats
-
getAllAvailableDataFormats
-
getDataFormatByName
-
ensureDataformatsInitialized
protected void ensureDataformatsInitialized()Detect all available dataformats on the classpath using aServiceLoader
. -
registerDataFormats
-
registerDataFormats
public void registerDataFormats(ClassLoader classloader, List<DataFormatConfigurator> configurators) -
registerDataFormats
public void registerDataFormats(ClassLoader classloader, List<DataFormatConfigurator> configurators, Map<String, Object> configurationProperties) -
registerCustomDataFormats
protected void registerCustomDataFormats(Map<String, DataFormat<?>> dataFormats, ClassLoader classloader) -
registerCustomDataFormats
protected void registerCustomDataFormats(Map<String, DataFormat<?>> dataFormats, ClassLoader classloader, Map<String, Object> configurationProperties) -
registerProvider
-
registerProvider
protected void registerProvider(Map<String, DataFormat<?>> dataFormats, DataFormatProvider provider, Map<String, Object> configurationProperties) -
applyConfigurators
-
applyConfigurators
protected void applyConfigurators(Map<String, DataFormat<?>> dataFormats, ClassLoader classloader, List<DataFormatConfigurator> dataFormatConfigurators) -
applyConfigurator
protected void applyConfigurator(Map<String, DataFormat<?>> dataFormats, DataFormatConfigurator configurator) -
loadDataFormats
public static void loadDataFormats() -
loadDataFormats
-
loadDataFormats
public static void loadDataFormats(ClassLoader classloader, List<DataFormatConfigurator> configurators) -
loadDataFormats
-