Class ExportDirective

java.lang.Object
com.seeq.link.sdk.export.ExportDirective

public class ExportDirective extends Object
Specifies the parameters for the exporting an item, being able to serialize to/de-serialize from a human readable String of the form [EXPORT TO "connection" AS "name"]
  • Constructor Details

    • ExportDirective

      public ExportDirective()
  • Method Details

    • getLatencyOrDefault

      public Duration getLatencyOrDefault(Duration defaultLatency)
      Returns the latency, which is how often the item is exported. It is specified in the EVERY "5min" part of the directive.
      Parameters:
      defaultLatency - A Duration that provides the latency to use if not configured in the ExportDirective
      Returns:
      A Duration representing the specified latency, or the provided default
    • getBackfillDateOrDefault

      public TimeInstant getBackfillDateOrDefault()
      Returns the backfill date, which is the date to which data is written when the CLEAN clause is supplied or data is being written for the first time.
      Returns:
      A TimeInstant representing the backfill date, or the default of "5 hours before now".
    • getSyntax

      public static String getSyntax()
      Returns a String describing the syntax of the export directive.
    • parse

      public static ExportDirective parse(String input, Duration minimumLatency)
      Parses a (serialized) String representation of the export directive and returns a populated ExportDirective object.
      Parameters:
      input - An export directive in String form. See Syntax property for format.
      minimumLatency - Minimum latency from export configuration
      Returns:
      A populated Export Directive.
      Throws:
      IllegalArgumentException - When the String could not be parsed as an export directive.
    • getExtendedDescriptor

      public static String getExtendedDescriptor(String itemID, DatasourceConnectionServiceV2 connectionService)
      Returns a helpful "descriptor" that can be optionally written to the target datasource that refers to the name and workbook within Seeq of the exported item. This is useful for admins to be able to track down an item and potentially rename it or adjust its directive in other ways.
      Parameters:
      itemID - The Seeq ID of the item
      connectionService - The DatasourceConnectionServiceV2 for the connection
      Returns:
      Descriptor to write to target datasource
    • getUsageLabel

      public String getUsageLabel()
      A useful "Source" label that identifies the export in the Usage tab of Seeq's Administration page
      Returns:
      the Source label
    • getUsageUrl

      public String getUsageUrl(DatasourceConnectionServiceV2 connectionService)
      The URL that is used as a hyperlink in the Usage tab of Seeq's Administration page
      Parameters:
      connectionService - The DatasourceConnectionServiceV2 for the connection
      Returns:
      the URL to the workbook containing the item
    • toString

      public String toString()
      Serializes the export directive to its String representation.
      Overrides:
      toString in class Object
      Returns:
      Export directive as a String