Package com.seeq.link.sdk.interfaces
Interface DatasourceConnectionServiceV2
- All Known Implementing Classes:
DatasourceConnectionV2Host
public interface DatasourceConnectionServiceV2
Provides services to the class that manages a connection to an external system.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
The interpolation method to be used for a particular signal. -
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteDatasourceProperties
(List<String> additionalPropertiesToDelete) Deletes the specified properties from the datasourcevoid
disable()
Disables a connection, which disconnects and shuts down the monitoring thread.void
enable()
Enables a connection, which causes a connect and monitor thread to be created.List<com.seeq.model.ItemUpdateOutputV1>
Writes the asset buffer to the Seeq application server.List<com.seeq.model.ItemUpdateOutputV1>
Writes the condition buffer to the Seeq application server.List<com.seeq.model.ItemUpdateOutputV1>
Writes the buffer of relationships to the Seeq application server.List<com.seeq.model.ItemUpdateOutputV1>
Writes the root asset buffer to the Seeq application server.List<com.seeq.model.ItemUpdateOutputV1>
Writes the scalar buffer to the Seeq application server.List<com.seeq.model.ItemUpdateOutputV1>
Writes the signal buffer to the Seeq application server.List<com.seeq.model.ItemUpdateOutputV1>
Writes the user group buffer to the Seeq application server.Retrieves the agent service that can be used to access the REST API directly, among other things.Provides the current state of the connection to the external datasource.com.seeq.model.DatasourceOutputV1
Get information about the Seeq datasource this connection services.Returns the current state of indexing activity, or null if the connector does not support indexing.void
initializeExport
(ExportSamples exportInterface, ExportConnectionConfigV1 exportConfig) If the connector supports exporting from Seeq to the datasource, this method must be called during each connection's Initialize() method.boolean
isLicensed
(String featureName) Checks the Seeq License for the required feature, logs the result, and returns true if the license includes the feature.org.slf4j.Logger
log()
Prints diagnostic messages to the Seeq agent log file (and the console).List<com.seeq.model.ItemUpdateOutputV1>
putAsset
(com.seeq.model.AssetInputV1 assetDefinition) Deprecated.List<com.seeq.model.ItemUpdateOutputV1>
putAsset
(com.seeq.model.PutAssetInputV1 assetDefinition) Creates a new asset in the Seeq database.List<com.seeq.model.ItemUpdateOutputV1>
putCondition
(com.seeq.model.ConditionUpdateInputV1 conditionDefinition) Creates a new condition in the Seeq database or overwrites an existing item with the same DatasourceClass/DatasourceId/DataId if it already exists.List<com.seeq.model.ItemUpdateOutputV1>
putRelationship
(com.seeq.model.AssetTreeSingleInputV1 relationshipDefinition) Establishes a relationship in the Seeq database.List<com.seeq.model.ItemUpdateOutputV1>
putRootAsset
(com.seeq.model.AssetInputV1 assetDefinition) Creates a new asset in the Seeq database at the root of the asset tree.List<com.seeq.model.ItemUpdateOutputV1>
putRootAsset
(com.seeq.model.PutAssetInputV1 assetDefinition) Creates a new asset in the Seeq database at the root of the asset tree.List<com.seeq.model.ItemUpdateOutputV1>
putScalar
(com.seeq.model.PutScalarInputV1 scalarDefinition) Creates a new scalar in the Seeq database or overwrites an existing item with the same DatasourceClass/DatasourceId/DataId if it already exists.List<com.seeq.model.ItemUpdateOutputV1>
putScalar
(com.seeq.model.ScalarInputV1 scalarDefinition) Creates a new scalar in the Seeq database or overwrites an existing item with the same DatasourceClass/DatasourceId/DataId if it already exists.List<com.seeq.model.ItemUpdateOutputV1>
putSignal
(com.seeq.model.SignalWithIdInputV1 signalDefinition) Creates a new signal in the Seeq database or overwrites an existing item with the same DatasourceClass/DatasourceId/DataId if it already exists.List<com.seeq.model.ItemUpdateOutputV1>
putUserGroup
(com.seeq.model.UserGroupWithIdInputV1 userGroupDefinition) Creates a new user group in Seeq database or overwrites an existing user group with the same DatasourceClass/DatasourceId/DataId if it already exists.void
setConnectionState
(Connection.ConnectionState newState) Called by the connect/monitor/disconnect functions if the state of the connection changes.void
setConnectionStatusMessage
(String message) Called by the connect/monitor/disconnect functions to set a new connection status message.void
Sets the datasource item DataId exclude Regex filter.void
Sets the datasource item DataId Regex filter.void
Sets the datasource item name exclude Regex filter.void
Sets the datasource item name Regex filter.void
setDatasourceItemTypeCleanupFilter
(List<String> itemTypeCleanupFilter) Sets the datasource item type cleanup filter.void
setTransforms
(List<PropertyTransformer.Spec> transforms) Sets a list of transforms to apply to all indexed signals.void
If called from theIndexingDatasourceConnection.index(SyncMode)
method, archiving will be skipped after indexing has finished.void
storeDatasourceProperties
(boolean storedInSeeq, List<com.seeq.model.ScalarPropertyV1> additionalProperties) Store the specified additional properties and storedInSeeq flag on the datasource.
-
Method Details
-
getAgentService
AgentService getAgentService()Retrieves the agent service that can be used to access the REST API directly, among other things.- Returns:
- The agent service.
-
enable
void enable()Enables a connection, which causes a connect and monitor thread to be created. -
disable
void disable()Disables a connection, which disconnects and shuts down the monitoring thread. -
isLicensed
Checks the Seeq License for the required feature, logs the result, and returns true if the license includes the feature.- Parameters:
featureName
- The feature for which the license is being checked- Returns:
- whether the License has been found to have the feature
-
getConnectionState
Connection.ConnectionState getConnectionState()Provides the current state of the connection to the external datasource.- Returns:
- the current state of the connection to the external datasource
-
setConnectionState
Called by the connect/monitor/disconnect functions if the state of the connection changes.- Parameters:
newState
- The new state to which the connection is being transitioned.
-
setConnectionStatusMessage
Called by the connect/monitor/disconnect functions to set a new connection status message.- Parameters:
message
- The new status message.
-
getIndexingState
IndexingState getIndexingState()Returns the current state of indexing activity, or null if the connector does not support indexing.- Returns:
- the current state of indexing activity
-
setTransforms
Sets a list of transforms to apply to all indexed signals.- Parameters:
transforms
- The list of transforms to apply to the signals.
-
initializeExport
If the connector supports exporting from Seeq to the datasource, this method must be called during each connection's Initialize() method.- Parameters:
exportInterface
- The IExportSamples interface used to put samples in the external datasource.exportConfig
- The configuration that dictates how exporting takes place and what signals need to be created in the external system to receive the exported data.
-
putSignal
List<com.seeq.model.ItemUpdateOutputV1> putSignal(com.seeq.model.SignalWithIdInputV1 signalDefinition) throws com.seeq.ApiException Creates a new signal in the Seeq database or overwrites an existing item with the same DatasourceClass/DatasourceId/DataId if it already exists.- Parameters:
signalDefinition
- An Object describing the properties of the signal.- Returns:
- The list of items created in Seeq during this call. The return value will be null if the items are being queued into a batch.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
flushSignals
Writes the signal buffer to the Seeq application server. This function should be called if it is important that the signals exist in the Seeq database before any other activity takes place.- Returns:
- The list of items created in Seeq during this call.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
putUserGroup
List<com.seeq.model.ItemUpdateOutputV1> putUserGroup(com.seeq.model.UserGroupWithIdInputV1 userGroupDefinition) throws com.seeq.ApiException Creates a new user group in Seeq database or overwrites an existing user group with the same DatasourceClass/DatasourceId/DataId if it already exists.- Parameters:
userGroupDefinition
- An Object describing the properties of the user group- Returns:
- The list of items created in Seeq during this call. The return value will be null if the items are being queued into a batch.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
flushUserGroups
Writes the user group buffer to the Seeq application server. This function should be called if it is important that the signals exist in the Seeq database before any other activity takes place.- Returns:
- The list of items created in Seeq during this call.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
putCondition
List<com.seeq.model.ItemUpdateOutputV1> putCondition(com.seeq.model.ConditionUpdateInputV1 conditionDefinition) throws com.seeq.ApiException Creates a new condition in the Seeq database or overwrites an existing item with the same DatasourceClass/DatasourceId/DataId if it already exists.- Parameters:
conditionDefinition
- An Object describing the properties of the condition.- Returns:
- The list of items created in Seeq during this call. The return value will be null if the items are being queued into a batch.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
flushConditions
Writes the condition buffer to the Seeq application server. This function should be called if it is important that the conditions exist in the Seeq database before any other activity takes place.- Returns:
- The list of items created in Seeq during this call.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
putScalar
List<com.seeq.model.ItemUpdateOutputV1> putScalar(com.seeq.model.PutScalarInputV1 scalarDefinition) throws com.seeq.ApiException Creates a new scalar in the Seeq database or overwrites an existing item with the same DatasourceClass/DatasourceId/DataId if it already exists. Scalar values should be set in the Formula field of PutScalarInputV1, in a format that can be parsed by the Seeq Formula language. Units should be set in the UnitOfMeasure field as they will be parsed more permissively and applied to the Formula if they can be parsed to a Seeq standard unit. Unrecognized units in this field will result in a unitless Scalar, but unrecognized units in the Formula will lead to rejection of the Scalar.- Parameters:
scalarDefinition
- An Object describing the properties of the scalar.- Returns:
- The list of items created in Seeq during this call. The return value will be null if the items are being queued into a batch.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
putScalar
List<com.seeq.model.ItemUpdateOutputV1> putScalar(com.seeq.model.ScalarInputV1 scalarDefinition) throws com.seeq.ApiException Creates a new scalar in the Seeq database or overwrites an existing item with the same DatasourceClass/DatasourceId/DataId if it already exists. This method is deprecated - use PutScalarInputV1 as the argument instead, which enables use of previousDataId property. Scalar values should be set in the Formula field of PutScalarInputV1, in a format that can be parsed by the Seeq Formula language. Units should be set in the UnitOfMeasure field as they will be parsed more permissively and applied to the Formula if they can be parsed to a Seeq standard unit. Unrecognized units in this field will result in a unitless Scalar, but unrecognized units in the Formula will lead to rejection of the Scalar.- Parameters:
scalarDefinition
- An Object describing the properties of the scalar.- Returns:
- The list of items created in Seeq during this call. The return value will be null if the items are being queued into a batch.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
flushScalars
Writes the scalar buffer to the Seeq application server. This function should be called if it is important that the scalars exist in the Seeq database before any other activity takes place.- Returns:
- The list of items created in Seeq during this call.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
putAsset
List<com.seeq.model.ItemUpdateOutputV1> putAsset(com.seeq.model.PutAssetInputV1 assetDefinition) throws com.seeq.ApiException Creates a new asset in the Seeq database.- Parameters:
assetDefinition
- An Object describing the properties of the asset.- Returns:
- The list of items created in Seeq during this call. The return value will be null if the items are being queued into a batch.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
putAsset
@Deprecated List<com.seeq.model.ItemUpdateOutputV1> putAsset(com.seeq.model.AssetInputV1 assetDefinition) throws com.seeq.ApiException Deprecated.Creates a new asset in the Seeq database. This method is deprecated - use PutAssetInputV1 as the argument instead, which enables use of previousDataId property.- Parameters:
assetDefinition
- An Object describing the properties of the asset.- Returns:
- The list of items created in Seeq during this call. The return value will be null if the items are being queued into a batch.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
flushAssets
Writes the asset buffer to the Seeq application server. This function should be called if it is important that the assets exist in the Seeq database before any other activity takes place.- Returns:
- The list of items created in Seeq during this call.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
putRootAsset
List<com.seeq.model.ItemUpdateOutputV1> putRootAsset(com.seeq.model.PutAssetInputV1 assetDefinition) throws com.seeq.ApiException Creates a new asset in the Seeq database at the root of the asset tree.- Parameters:
assetDefinition
- An Object describing the properties of the root asset.- Returns:
- The list of items created in Seeq during this call. The return value will be null if the items are being queued into a batch.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
putRootAsset
List<com.seeq.model.ItemUpdateOutputV1> putRootAsset(com.seeq.model.AssetInputV1 assetDefinition) throws com.seeq.ApiException Creates a new asset in the Seeq database at the root of the asset tree. This method is deprecated - use PutAssetInputV1 as the argument instead, which enables use of previousDataId property.- Parameters:
assetDefinition
- An Object describing the properties of the root asset.- Returns:
- The list of items created in Seeq during this call. The return value will be null if the items are being queued into a batch.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
flushRootAssets
Writes the root asset buffer to the Seeq application server. This function should be called if it is important that the root assets exist in the Seeq database before any other activity takes place.- Returns:
- The list of items created in Seeq during this call.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
putRelationship
List<com.seeq.model.ItemUpdateOutputV1> putRelationship(com.seeq.model.AssetTreeSingleInputV1 relationshipDefinition) throws com.seeq.ApiException Establishes a relationship in the Seeq database.- Parameters:
relationshipDefinition
- The relationship to create.- Returns:
- The list of items created in Seeq during this call. The return value will be null if the items are being queued into a batch.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
flushRelationships
Writes the buffer of relationships to the Seeq application server. This function should be called if it is important that the relationships exist in the Seeq database before any other activity takes place.- Returns:
- The list of items created in Seeq during this call.
- Throws:
com.seeq.ApiException
- If there is an error communicating with Seeq server, or Seeq server returns an error code during communication.
-
getDatasource
com.seeq.model.DatasourceOutputV1 getDatasource()Get information about the Seeq datasource this connection services.- Returns:
- Information about the datasource this connection services
-
skipArchiving
void skipArchiving()If called from theIndexingDatasourceConnection.index(SyncMode)
method, archiving will be skipped after indexing has finished. The default is that any items not present during aSyncMode.FULL
sync will be archived in Seeq; this skips that step. -
storeDatasourceProperties
void storeDatasourceProperties(boolean storedInSeeq, List<com.seeq.model.ScalarPropertyV1> additionalProperties) Store the specified additional properties and storedInSeeq flag on the datasource.- Parameters:
storedInSeeq
- Whether this datasource's data will be stored in Seeq (true) or a remote datasource (false).additionalProperties
- Additional properties that should be set on the datasource. The 'normal' datasource properties cannot be set with this parameter, only 'custom' properties.
-
deleteDatasourceProperties
Deletes the specified properties from the datasource- Parameters:
additionalPropertiesToDelete
- The names of the properties to delete. The 'normal' datasource properties cannot be deleted with this method, only 'custom' properties.
-
log
org.slf4j.Logger log()Prints diagnostic messages to the Seeq agent log file (and the console). The logging facility used is Logback. The log file is in the Seeq data folder: "log/jvm-link/jvm-link.log". When using the Debugging Agent, logs are only sent to the debug console.- Returns:
- logging interface
-
setDatasourceItemTypeCleanupFilter
Sets the datasource item type cleanup filter. By default, the filter is set to null (meaning no filter is applied, all items are considered in cleaning up of stale items)- Parameters:
itemTypeCleanupFilter
- List of item types to be considered in datasource cleanup process
-
setDatasourceItemDataIdRegexFilter
Sets the datasource item DataId Regex filter. When set, only items having the DataId matching the RegEx will be included in the cleanup process. By default, the filter is set to null (meaning that all items are considered in cleaning up of stale items).- Parameters:
regex
- the Regex to apply
-
setDatasourceItemDataIdExcludeRegexFilter
Sets the datasource item DataId exclude Regex filter. When set, the items having the DataID matching the RegEx will be excluded from cleanup process. By default, the filter is set to null (meaning that all items are considered in cleaning up of stale items).- Parameters:
regex
- the Regex to apply
-
setDatasourceItemNameRegexFilter
Sets the datasource item name Regex filter. When set, only items having the name matching the RegEx will be included in the cleanup process. By default, the filter is set to null (meaning that all items are considered in cleaning up of stale items).- Parameters:
regex
- the Regex to apply
-
setDatasourceItemNameExcludeRegexFilter
Sets the datasource item name exclude Regex filter. When set, the items having the name matching the RegEx will be excluded from cleanup process. By default, the filter is set to null (meaning that all items are considered in cleaning up of stale items).- Parameters:
regex
- the Regex to apply
-