Class CharsetSettingsDefinition

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear​(Settings settings)
      Removes any values in the given settings object assocated with this settings definition
      void copySetting​(Settings settings, Settings destSettings)
      Copies any setting value associated with this settings definition from the srcSettings settings to the destSettings.
      java.lang.String getCharset​(Settings settings, java.lang.String defaultValue)  
      int getChoice​(Settings settings)
      Returns the current value for this settings
      java.lang.String getDescription()
      Returns a description of this settings definition
      java.lang.String getDisplayChoice​(int ordinalOfValue, Settings s1)
      Returns the String for the given enum value
      java.lang.String[] getDisplayChoices​(Settings settings)
      Gets the list of choices as strings based on the current settings
      java.lang.String getName()
      Returns the name of this SettingsDefinition
      boolean hasValue​(Settings setting)  
      void setCharset​(Settings settings, java.lang.String charset)  
      void setChoice​(Settings settings, int ordinalOfValue)
      Sets the given value into the settings object using this definition as a key
      static void setStaticEncodingMappingValues​(java.util.Map<java.lang.Long,​java.util.List<java.lang.String>> mappingValues)
      Sets a static lookup table that maps from old deprecated (language,encoding) index values to a charset name.
      • Methods inherited from class java.lang.Object

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

      • getCharset

        public java.lang.String getCharset​(Settings settings,
                                           java.lang.String defaultValue)
      • setCharset

        public void setCharset​(Settings settings,
                               java.lang.String charset)
      • getChoice

        public int getChoice​(Settings settings)
        Description copied from interface: EnumSettingsDefinition
        Returns the current value for this settings
        Specified by:
        getChoice in interface EnumSettingsDefinition
        Parameters:
        settings - The settings to search
        Returns:
        the value for the settingsDefintions
      • setChoice

        public void setChoice​(Settings settings,
                              int ordinalOfValue)
        Description copied from interface: EnumSettingsDefinition
        Sets the given value into the settings object using this definition as a key
        Specified by:
        setChoice in interface EnumSettingsDefinition
        Parameters:
        settings - the settings to store the value.
        ordinalOfValue - the settings value to be stored.
      • getDisplayChoices

        public java.lang.String[] getDisplayChoices​(Settings settings)
        Description copied from interface: EnumSettingsDefinition
        Gets the list of choices as strings based on the current settings
        Specified by:
        getDisplayChoices in interface EnumSettingsDefinition
        Parameters:
        settings - the instance settings
        Returns:
        an array of strings which represent valid choices based on the current settings.
      • getDisplayChoice

        public java.lang.String getDisplayChoice​(int ordinalOfValue,
                                                 Settings s1)
        Description copied from interface: EnumSettingsDefinition
        Returns the String for the given enum value
        Specified by:
        getDisplayChoice in interface EnumSettingsDefinition
        Parameters:
        ordinalOfValue - the value to get a display string for
        s1 - the instance settings which may affect the results
        Returns:
        the display string for the given settings.
      • clear

        public void clear​(Settings settings)
        Description copied from interface: SettingsDefinition
        Removes any values in the given settings object assocated with this settings definition
        Specified by:
        clear in interface SettingsDefinition
        Parameters:
        settings - the settings object to be cleared.
      • copySetting

        public void copySetting​(Settings settings,
                                Settings destSettings)
        Description copied from interface: SettingsDefinition
        Copies any setting value associated with this settings definition from the srcSettings settings to the destSettings.
        Specified by:
        copySetting in interface SettingsDefinition
        Parameters:
        settings - the settings to be copied
        destSettings - the settings to be updated.
      • setStaticEncodingMappingValues

        public static void setStaticEncodingMappingValues​(java.util.Map<java.lang.Long,​java.util.List<java.lang.String>> mappingValues)
        Sets a static lookup table that maps from old deprecated (language,encoding) index values to a charset name.

        The old index values were used by old-style MBCS data type.

        Parameters:
        mappingValues - map of language_id to list of charset names.