Class AbstractFormatConverter

    • Constructor Detail

      • AbstractFormatConverter

        public AbstractFormatConverter()
    • Method Detail

      • loadParameters

        public void loadParameters()
        Description copied from interface: FormatConverter
        Reads it's own parameters and stores them in the parameters map
        Specified by:
        loadParameters in interface FormatConverter
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: FormatConverter
        Checks if the converter is enabled or not
        Specified by:
        isEnabled in interface FormatConverter
        Returns:
        if the converter is enabled
      • setEnabled

        public void setEnabled​(boolean enabled)
        Description copied from interface: FormatConverter
        Enables or disables the converter
        Specified by:
        setEnabled in interface FormatConverter
        Parameters:
        enabled - the enabled flag
      • getParameter

        public String getParameter​(String name)
        Description copied from interface: FormatConverter
        Gets the value of a parameter
        Specified by:
        getParameter in interface FormatConverter
        Parameters:
        name - name of the configuration parameter
        Returns:
        the value of the configuration parameter
      • getParameterNames

        public List<String> getParameterNames()
        Description copied from interface: FormatConverter
        Implementations should return the list of the required parameters. A parameter is stored in the context as converter.SimpleClassName.parameter = value
        Specified by:
        getParameterNames in interface FormatConverter
        Returns:
        list of the configuration parameters
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getExtension

        public static String getExtension​(String fileNameOrExtension)
        Gets the extension for the given filename, if an alias is found then the value of the alias is returned as well. For instance if in the settings you have converter.alias.eft=txt then a file named test.eft will be considered a txt.
        Parameters:
        fileNameOrExtension - file name or just the extension
        Returns:
        the real extension to use