Class TextExportSettings

All Implemented Interfaces:
HasHandlers

public class TextExportSettings extends TextSettings
Settings for use with DataSource.recordsAsText().
  • Constructor Details

    • TextExportSettings

      public TextExportSettings()
    • TextExportSettings

      public TextExportSettings(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static TextExportSettings getOrCreateRef(JavaScriptObject jsObj)
    • create

      public JavaScriptObject create()
      Overrides:
      create in class TextSettings
    • setDateFormat

      public TextExportSettings setDateFormat(DateDisplayFormat dateFormat) throws IllegalStateException
      Format to use when outputting date values. Default is to use the format expected by Microsoft Excel (eg 1-2-2011), which Excel will turn into a real date value (see ExcelPasting). The current month-day-year order as set by DateUtil.setInputFormat() will be used.
      Parameters:
      dateFormat - New dateFormat value. Default value is null
      Returns:
      TextExportSettings instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getDateFormat

      public DateDisplayFormat getDateFormat()
      Format to use when outputting date values. Default is to use the format expected by Microsoft Excel (eg 1-2-2011), which Excel will turn into a real date value (see ExcelPasting). The current month-day-year order as set by DateUtil.setInputFormat() will be used.
      Returns:
      Current dateFormat value. Default value is null
    • setDateTimeFormat

      public TextExportSettings setDateTimeFormat(DateDisplayFormat dateTimeFormat) throws IllegalStateException
      Format to use when outputting datetime values. Default is to combine the configured date and time formats with a space (" ").
      Parameters:
      dateTimeFormat - New dateTimeFormat value. Default value is null
      Returns:
      TextExportSettings instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getDateTimeFormat

      public DateDisplayFormat getDateTimeFormat()
      Format to use when outputting datetime values. Default is to combine the configured date and time formats with a space (" ").
      Returns:
      Current dateTimeFormat value. Default value is null
    • setForceText

      public TextExportSettings setForceText(ForceTextApproach forceText) throws IllegalStateException
      If set, all text fields will use the indicated ForceTextApproach unless they have a specific setting for DataSourceField.exportForceText.
      Parameters:
      forceText - New forceText value. Default value is null
      Returns:
      TextExportSettings instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getForceText

      public ForceTextApproach getForceText()
      If set, all text fields will use the indicated ForceTextApproach unless they have a specific setting for DataSourceField.exportForceText.
      Returns:
      Current forceText value. Default value is null
    • setLineSeparator

      public TextExportSettings setLineSeparator(String lineSeparator) throws IllegalStateException
      Separator between Records. Default is a newline character ("\n").
      Overrides:
      setLineSeparator in class TextSettings
      Parameters:
      lineSeparator - New lineSeparator value. Default value is "\n"
      Returns:
      TextExportSettings instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getLineSeparator

      public String getLineSeparator()
      Separator between Records. Default is a newline character ("\n").
      Overrides:
      getLineSeparator in class TextSettings
      Returns:
      Current lineSeparator value. Default value is "\n"
    • setNullValueText

      public TextExportSettings setNullValueText(String nullValueText) throws IllegalStateException
      Text to export for a field with a null value. If this property is null, then null fields will be assumed to have the default value for their field type.
      Parameters:
      nullValueText - New nullValueText value. Default value is ""
      Returns:
      TextExportSettings instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getNullValueText

      public String getNullValueText()
      Text to export for a field with a null value. If this property is null, then null fields will be assumed to have the default value for their field type.
      Returns:
      Current nullValueText value. Default value is ""
    • setQuoteValues

      public TextExportSettings setQuoteValues(Boolean quoteValues) throws IllegalStateException
      Whether to surround each value with quotes ("").
      Parameters:
      quoteValues - New quoteValues value. Default value is true
      Returns:
      TextExportSettings instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getQuoteValues

      public Boolean getQuoteValues()
      Whether to surround each value with quotes ("").
      Returns:
      Current quoteValues value. Default value is true
    • setTimeFormat

      public TextExportSettings setTimeFormat(TimeDisplayFormat timeFormat) throws IllegalStateException
      Format to use when outputting time values. Default is 24 hour time.
      Parameters:
      timeFormat - New timeFormat value. Default value is null
      Returns:
      TextExportSettings instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getTimeFormat

      public TimeDisplayFormat getTimeFormat()
      Format to use when outputting time values. Default is 24 hour time.
      Returns:
      Current timeFormat value. Default value is null
    • setUseDisplayValue

      public TextExportSettings setUseDisplayValue(Boolean useDisplayValue) throws IllegalStateException
      Whether to convert each field's value to the corresponding display value for export. Default of false will directly export the field's value.
      Parameters:
      useDisplayValue - New useDisplayValue value. Default value is false
      Returns:
      TextExportSettings instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getUseDisplayValue

      public Boolean getUseDisplayValue()
      Whether to convert each field's value to the corresponding display value for export. Default of false will directly export the field's value.
      Returns:
      Current useDisplayValue value. Default value is false