Class ConverterRepository

All Implemented Interfaces:
Constructable

public class ConverterRepository extends AbstractComponentRepository<ConverterKey,Converter<?,?>,ConverterFactory> implements Constructable
Since:
1.0.0
  • Constructor Details

    • ConverterRepository

      public ConverterRepository()
  • Method Details

    • setComponentFactories

      @Inject public void setComponentFactories(Optional<Collection<ConverterFactory>> componentFactories)
    • setComponents

      @Inject public void setComponents(Optional<Collection<Converter<?,?>>> components)
    • init

      public void init()
      Specified by:
      init in interface Constructable
    • getConverter

      public <T, F> Converter<T,F> getConverter(String fromNamespace, String toNamespace)
    • getConverter

      public <T, F> Converter<T,F> getConverter(ConverterKey key)
    • getFromNamespaceConverterTo

      public Set<String> getFromNamespaceConverterTo(String toNamespace)
      Get all namespaces for which a converter is available to convert from requested format to default format
      Parameters:
      toNamespace - Requested format
      Returns:
      Swt with all possible formats
    • getToNamespaceConverterFrom

      public Set<String> getToNamespaceConverterFrom(String fromNamespace)
      Get all namespaces for which a converter is available to convert to requested format to default format
      Parameters:
      fromNamespace - Requested format
      Returns:
      Swt with all possible formats
    • hasConverter

      public boolean hasConverter(String fromNamespace, String toNamespace)
      Checks if a converter is available to convert the stored object from the default format to the requested format
      Parameters:
      fromNamespace - Default format
      toNamespace - Requested fromat
      Returns:
      If a converter is available
    • hasConverter

      public boolean hasConverter(ConverterKey key)