Class DefaultImportParameterParser

    • Field Summary

      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getOrder()  
      boolean matches​(java.lang.String referenceFormat)  
      DefaultValues parseDefaultValues​(java.lang.String referenceFormat, java.lang.String defaultValues)
      Parses referencePattern cell (which is located in the second row) and default values cell (which is located in the third row) and creates map where key is equals to reference key and value is equals to value provided in the third row.
      ParsedValues parseValue​(java.lang.String cellValue, DefaultValues defaultValues)
      Parses referencePattern cell (which is located in the second row) and cell with data (which is located in the data row) and creates map where key is equal to reference key and value is equals to value provided in the data row.
      void setMatcher​(ExcelParserMatcher matcher)  
      void setOrder​(int order)  
      void setSplitter​(ExcelParserSplitter splitter)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultImportParameterParser

        public DefaultImportParameterParser()
    • Method Detail

      • matches

        public boolean matches​(@Nonnull
                               java.lang.String referenceFormat)
        Specified by:
        matches in interface ImportParameterParser
      • parseDefaultValues

        public DefaultValues parseDefaultValues​(java.lang.String referenceFormat,
                                                java.lang.String defaultValues)
        Parses referencePattern cell (which is located in the second row) and default values cell (which is located in the third row) and creates map where key is equals to reference key and value is equals to value provided in the third row. For example, for the following reference cell's value: catalog:version and default value cell: Default:Online the following map will be returned: {{key: catalog, value: Default}, {key: version, value: Online}}
        Specified by:
        parseDefaultValues in interface ImportParameterParser
        Parameters:
        referenceFormat - cell's value from second row of excel sheet
        defaultValues - cell's value from third row of excel sheet
        Returns:
        DefaultValues object. If default values are not provided then only keys will be returned.
      • parseValue

        public ParsedValues parseValue​(java.lang.String cellValue,
                                       DefaultValues defaultValues)
        Parses referencePattern cell (which is located in the second row) and cell with data (which is located in the data row) and creates map where key is equal to reference key and value is equals to value provided in the data row. If value is null then default value is taken into account. For example, for the following reference cell's value: catalog:version and cell's value: Default:Online the following map will be returned: {{key: catalog, value: Default}, {key: version, value: Online}}. Parameters map always contains key : ImportParameters.RAW_VALUE which represents not parsed value, but merged with default values
        Specified by:
        parseValue in interface ImportParameterParser
        Parameters:
        cellValue - value of cell's data
        defaultValues - parsed default values
        Returns:
        ParsedValues object. If default values are not provided then only keys will be returned.
      • getOrder

        public int getOrder()
        Specified by:
        getOrder in interface org.springframework.core.Ordered
      • setOrder

        public void setOrder​(int order)