Class CSVReader


  • public class CSVReader
    extends Object
    • Field Detail

      • nbCols

        protected int nbCols
      • colDefaultValues

        protected List<String> colDefaultValues
      • colMandatory

        protected List<String> colMandatory
      • separator

        protected String separator
      • utilMessages

        protected org.silverpeas.kernel.bundle.LocalizationBundle utilMessages
      • specificNbCols

        protected int specificNbCols
      • specificColNames

        protected List<String> specificColNames
      • specificColMaxLengths

        protected List<Integer> specificColMaxLengths
      • specificColTypes

        protected List<String> specificColTypes
      • specificColMandatory

        protected List<String> specificColMandatory
    • Constructor Detail

      • CSVReader

        public CSVReader​(String language)
        Parameters:
        language - the language of the UI
    • Method Detail

      • isExtraColumnsControlEnabled

        public boolean isExtraColumnsControlEnabled()
      • setExtraColumnsControlEnabled

        public void setExtraColumnsControlEnabled​(boolean extraColumnsControlEnabled)
      • isColumnNumberControlEnabled

        public boolean isColumnNumberControlEnabled()
      • setColumnNumberControlEnabled

        public void setColumnNumberControlEnabled​(boolean columnNumberControlEnabled)
      • initCSVFormat

        public void initCSVFormat​(String propertiesFile,
                                  String rootPropertyName,
                                  String separator)
      • initCSVFormat

        public void initCSVFormat​(String propertiesFile,
                                  String rootPropertyName,
                                  String separator,
                                  org.silverpeas.kernel.bundle.SettingBundle sP,
                                  String specificRootPropertyName,
                                  UnaryOperator<List<String>> specificFieldNameMapper)
      • parseArrayValue

        protected String[] parseArrayValue​(String arrayValue)
      • getNbCols

        public int getNbCols()
        Returns:
        the number of standard column.
      • getSpecificNbCols

        public int getSpecificNbCols()
        Returns:
        the number of specific columns.
      • setSpecificNbCols

        public void setSpecificNbCols​(int specificNbCols)
        Parameters:
        specificNbCols - the number of specific columns to set.
      • getSpecificColType

        public String getSpecificColType​(int i)
        Returns:
        the type of specific column i.
      • getSpecificParameterName

        public String getSpecificParameterName​(int i)
        Returns:
        the parameter name of specific column i.
      • getSpecificColMaxLength

        public int getSpecificColMaxLength​(int i)
        Returns:
        the maximum length of specific column i.
      • addSpecificCol

        public void addSpecificCol​(String name,
                                   int maxLength,
                                   String type,
                                   String mandatory)