Class TranslationDynamicHeaderFieldMapping.FieldNamesToHeaderNamesInitializer

java.lang.Object
org.apache.commons.lang3.concurrent.LazyInitializer<Map<String,Map<String,String>>>
com.broadleafcommerce.dataimport.processor.specification.translation.TranslationDynamicHeaderFieldMapping.FieldNamesToHeaderNamesInitializer
All Implemented Interfaces:
org.apache.commons.lang3.concurrent.ConcurrentInitializer<Map<String,Map<String,String>>>
Enclosing class:
TranslationDynamicHeaderFieldMapping

public static class TranslationDynamicHeaderFieldMapping.FieldNamesToHeaderNamesInitializer extends org.apache.commons.lang3.concurrent.LazyInitializer<Map<String,Map<String,String>>>
For reverse-mapping cases as are needed in TranslationDynamicHeaderFieldMapping.mapFromFieldToHeader(String, String), we want the reverse mappings from ImportSpecification.getHeaderFieldConfigsByRowType() to be computed exactly once and in a thread-safe way. Thus, we leverage the lazy initializer pattern.
  • Constructor Details

    • FieldNamesToHeaderNamesInitializer

      public FieldNamesToHeaderNamesInitializer(ImportSpecification parentSpecification)
  • Method Details

    • initialize

      protected Map<String,Map<String,String>> initialize() throws org.apache.commons.lang3.concurrent.ConcurrentException
      Specified by:
      initialize in class org.apache.commons.lang3.concurrent.LazyInitializer<Map<String,Map<String,String>>>
      Throws:
      org.apache.commons.lang3.concurrent.ConcurrentException