Class ExportConfig


  • public class ExportConfig
    extends java.lang.Object
    Class for configuring an export using the ExportService. If specific setter are not called, default values will be set (mentioned at setter methods). The export script is a mandatory parameter for export, so do not forget to call setScript(ImpExResource) method.
    Since:
    4.0
    • Constructor Detail

      • ExportConfig

        public ExportConfig()
    • Method Detail

      • getScript

        public ImpExResource getScript()
        Gets the configured export script. This is a mandatory field.
        Returns:
        the export script
      • setScript

        public void setScript​(ImpExResource script)
        Sets the export script to use for export. This parameter is mandatory and has no default value.
        Parameters:
        script - the export script to use
      • isFailOnError

        public boolean isFailOnError()
        Will the export fail on an error or tries to continue? Default is true.
        Returns:
        true if export will fail on error
      • isSynchronous

        public boolean isSynchronous()
        Will the export be executed synchronous? Default is true.
        Returns:
        true if export will be executed synchronous
      • getFieldSeparator

        public char getFieldSeparator()
        Gets the used field separator for separating the fields within the export csv files. Default is separator configured at "csv.fieldseparator" property which is by default the ';' sign.
        Returns:
        the used fieldseparator
      • getQuoteCharacter

        public char getQuoteCharacter()
        Gets the used field separator for escaping the fields within the export csv files. Default is character configured at "csv.quotecharacter" property which is by default the '"' sign.
        Returns:
        the used quotecharacter
      • getCommentCharacter

        public char getCommentCharacter()
        Gets the used comment character for commenting lines within the export csv files. Default is character configured at "csv.commentcharacter" property which is by default the '#' sign.
        Returns:
        the used comment character
      • isSingleFile

        public boolean isSingleFile()
        Will the exported data be located within one csv file or separated using one file per header. Default is false.
        Returns:
        true if the export is done in one file
      • setFailOnError

        public void setFailOnError​(boolean failOnError)
        Sets whether the export will fail on error or tries to continue execution. Default is true.
        Parameters:
        failOnError - true if it should fail on error
      • setSynchronous

        public void setSynchronous​(boolean synchronous)
        Sets whether the export will be executed synchronous. Default is true.
        Parameters:
        synchronous - true if execution will be synchronous
      • setFieldSeparator

        public void setFieldSeparator​(char fieldSeparator)
        Parameters:
        fieldSeparator - the fieldSeparator to set
      • setQuoteCharacter

        public void setQuoteCharacter​(char quoteCharacter)
        Parameters:
        quoteCharacter - the quoteCharacter to set
      • setCommentCharacter

        public void setCommentCharacter​(char commentCharacter)
        Sets character for commenting lines within the export csv files. Default is character configured at "csv.commentcharacter" property which is by default the '#' sign.
        Parameters:
        commentCharacter - the comment character to set
      • setSingleFile

        public void setSingleFile​(boolean singleFile)
        Sets whether the exported data will be located in one csv file. Default is false.
        Parameters:
        singleFile - true if the data will be located in one file
      • getEncoding

        public java.lang.String getEncoding()
        Gets the encoding used for creating export files. Default is UTF-8
        Returns:
        the encoding used for export
      • setEncoding

        public void setEncoding​(java.lang.String encoding)
        Sets the encoding used for export file creation. Default is UTF-8.
        Parameters:
        encoding - the encoding to set
      • getExportedDataCode

        public java.lang.String getExportedDataCode()
        Gets the code of the export media (containing the data). Default is null, so that a random code is created.
        Returns:
        the code of the export media (containing the data)
      • setExportedDataCode

        public void setExportedDataCode​(java.lang.String exportedDataCode)
        Sets the code of the export media (containing the data). Default is null, so that a random code is created.
        Parameters:
        exportedDataCode - the code of the export media (containing the data) to set
      • getExportedMediaCode

        public java.lang.String getExportedMediaCode()
        Gets the code of the export media (containing the media files). Default is null, so that a random code is created.
        Returns:
        the code of the export media (containing the media files)
      • setExportedMediaCode

        public void setExportedMediaCode​(java.lang.String exportedMediaCode)
        Sets the code of the export media (containing the media files). Default is null, so that a random code is created.
        Parameters:
        exportedMediaCode - the code of the export media (containing the media files) to set
      • setSessionUser

        public void setSessionUser​(EmployeeModel sessionUser)