Package com.seeq.link.sdk.export
Class ExportDirective
java.lang.Object
com.seeq.link.sdk.export.ExportDirective
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns 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.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.getLatencyOrDefault
(Duration defaultLatency) Returns the latency, which is how often the item is exported.static String
Returns a String describing the syntax of the export directive.A useful "Source" label that identifies the export in the Usage tab of Seeq's Administration pagegetUsageUrl
(DatasourceConnectionServiceV2 connectionService) The URL that is used as a hyperlink in the Usage tab of Seeq's Administration pagestatic ExportDirective
Parses a (serialized) String representation of the export directive and returns a populated ExportDirective object.toString()
Serializes the export directive to its String representation.
-
Constructor Details
-
ExportDirective
public ExportDirective()
-
-
Method Details
-
getLatencyOrDefault
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
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
Returns a String describing the syntax of the export directive. -
parse
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 itemconnectionService
- The DatasourceConnectionServiceV2 for the connection- Returns:
- Descriptor to write to target datasource
-
getUsageLabel
A useful "Source" label that identifies the export in the Usage tab of Seeq's Administration page- Returns:
- the Source label
-
getUsageUrl
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
Serializes the export directive to its String representation.
-