v1.2.0.1-beta1
ConnectorRecord

Description

The ConnectorRecord object holds information about a Touch Portal Connector (Slider) instance.

These instances are reported by Touch Portal in the plugin API shortConnectorIdNotification message. These messages are parsed by the plugin and stored for future reference as objects in a database. The ConnectorRecord represents such a stored object.

Instances of ConnectorRecrord are obtained by calls to TP class functions like TP.getConnectorRecords(). Objects of this type cannot be created directly.

All properties are read-only.

See also
ConnectorData, Touch Portal Connectors API for reference
Since
v1.1.0.

Properties

String shortId
 
String connectorId
 
String actionType
 
String instanceName
 
DSE::ScriptInputType inputType = DSE::ScriptInputType::UnknownInputType
 
String expression
 
String file
 
String alias
 
DSE::EngineInstanceType instanceType = DSE::EngineInstanceType::UnknownInstanceType
 
Object otherData
 
int timestamp
 
bool isNull
 

Property Documentation

◆ shortId

String shortId
read

The "short connector ID" assigned by Touch Portal to this partulcar instance of a slider. This is the ID to be used for sending connectorUpdate() messages back to Touch Portal.

◆ connectorId

String connectorId
read

The full connectorId which Touch Portal uses to identify this type of connector action. This is the ID specified in the entry.tp plugin configuration JSON.
By convention this plugin uses IDs with "parts" separated by periods. For example us.paperno.max.tpp.dse.conn.script.eval
The IDs always start with the full plugin ID, followed by potentially other designators, and always ending with the actual "thing" name, in this case the name of an action a connector should perform. The last part of an ID should always be unique.

◆ actionType

String actionType
read

The type of connector action. May be either of:

  • Enumeration type, one of: "Eval", "Load", "Import", "Update", "OneTime"
  • Another string with an arbitrary action name, which is taken from the last part (when split on periods .) of the connectorId property (see below).

◆ instanceName

String instanceName
read

The State Name of the connector. This may be "ANONYMOUS" for "OneTime" actionType connectors, or an empty string for non-enumerated actionType types.

◆ inputType

DSE::ScriptInputType inputType = DSE::ScriptInputType::UnknownInputType
read

The type of scripting action. Enumeration type, one of: DSE.ExpressionInput, DSE.ScriptInput, DSE.ModuleInput, DSE.UnknownInputType
When used for search, an equivalent string may also be used, eg. "Expression", "Script", "Module", or "Unknown". Wildcards are not allowed.

◆ expression

String expression
read

The full expression string of the connector. This is exactly as entered in the slider setup, no variables or code is evaluated.

◆ file

String file
read

The script/module file as specified in the connector, if any. Only Script and Module connector types will have a file.

◆ alias

String alias
read

The module import alias as specified in the connector. Only Module type connects will have an alias.

◆ instanceType

DSE::EngineInstanceType instanceType = DSE::EngineInstanceType::UnknownInstanceType
read

This is the Engine Instance type specified in the connector. One of: DSE.SharedInstance or DSE.PrivateInstance
When used for search, an equivalent string may also be used: "Shared" or "Private". Wildcards are not allowed.

◆ otherData

Object otherData
read

This property holds an object with any other Connector data members which were found but do not fit into any of the other data member property types.

Note: This is for advanced use with custom connector definitions in a custom entry.tp file. By convention this plugin uses action/connector data IDs with "parts" separated by periods. For example us.paperno.max.tpp.dse.act.script.eval.expr
The property is returned as an Object type, possibly empty, with the last portion of the data ID (after the last period (.) separator, "expr" in the example above) as key(s) with the corresponding value(s) from the user's entry. The value is always a String type.
The property is searched (and stored) as compact serialized JSON text with both keys and values quoted. Eg. {"rangeMin":"100","rangeMax":"1000"}
The quotes and colons can be effectively used in search terms to limit the scope of the search. For example { otherData: '*"range*":"100?"*' }
Note the wildcards outside of the quoted object property and value – this is to ensure other properties properties in the JSON string are ignored.
This property can be specified multiple times in a search pattern when used with search array notation. For example

TP.getConnectorRecords([ { otherData: '*"rangeMin":"1000"*' }, { otherData: '*"rangeMax":"100"*' } ]);
Object otherData
This property holds an object with any other Connector data members which were found but do not fit i...
Definition: ConnectorData.h:98
The global TP namespace is used as a container for all Touch Portal API methods, which are invoked wi...
Definition: touchportal.dox:7
Array< ConnectorRecord > getConnectorRecords(Object criteria={})
Returns zero or more ConnectorRecord objects based on the given criteria from the currently logged co...

◆ timestamp

int timestamp
read

A timestamp of when the notifaction about this connector was received from Touch Portal. The format is the common "milliseconds since epoch". The latest notification will typically mean that slider actually exists in the user's page, whereas previous versions may or may not still exist. Touch Portal does not notify when a connector was removed. Note: This property cannot currently be used in search queries.

◆ isNull

bool isNull
read

true if this record holds no value (eg. the result of a failed database lookup); false if this record is valid. Note: This property cannot be used in search queries.