Class DataFormats

java.lang.Object
org.camunda.spin.DataFormats

public class DataFormats extends Object
Provides access to all builtin data formats.
Author:
Sebastian Menski, Daniel Meyer
  • Field Details

    • JSON_DATAFORMAT_NAME

      public static String JSON_DATAFORMAT_NAME
    • XML_DATAFORMAT_NAME

      public static String XML_DATAFORMAT_NAME
    • availableDataFormats

      protected Map<String,DataFormat<?>> availableDataFormats
  • Constructor Details

    • DataFormats

      public DataFormats()
  • Method Details

    • getInstance

      public static DataFormats getInstance()
      Provides the global instance of the DataFormats manager.
      Returns:
      the global instance.
    • xml

      public static DataFormat<SpinXmlElement> xml()
      Returns the global xml data format that can be provided with configuration that applies to any Spin xml operation.
    • json

      public static DataFormat<SpinJsonNode> json()
      Returns the global json data format that can be provided with configuration that applies to any Spin json operation.
    • getDataFormat

      public static DataFormat<? extends Spin<?>> getDataFormat(String dataFormatName)
      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

      public static Set<DataFormat<? extends Spin<?>>> getAvailableDataFormats()
      Returns:
      a set of all registered data formats
    • getAllAvailableDataFormats

      public Set<DataFormat<? extends Spin<?>>> getAllAvailableDataFormats()
    • getDataFormatByName

      public DataFormat<? extends Spin<?>> getDataFormatByName(String name)
    • ensureDataformatsInitialized

      protected void ensureDataformatsInitialized()
      Detect all available dataformats on the classpath using a ServiceLoader.
    • registerDataFormats

      public void registerDataFormats(ClassLoader classloader)
    • 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

      protected void registerProvider(Map<String,DataFormat<?>> dataFormats, DataFormatProvider provider)
    • registerProvider

      protected void registerProvider(Map<String,DataFormat<?>> dataFormats, DataFormatProvider provider, Map<String,Object> configurationProperties)
    • applyConfigurators

      protected void applyConfigurators(Map<String,DataFormat<?>> dataFormats, ClassLoader classloader)
    • 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

      public static void loadDataFormats(ClassLoader classloader)
    • loadDataFormats

      public static void loadDataFormats(ClassLoader classloader, List<DataFormatConfigurator> configurators)
    • loadDataFormats

      public static void loadDataFormats(ClassLoader classloader, Map configurationProperties)