Class MobileDataType
java.lang.Object
com.inductiveautomation.perspective.common.mobile.MobileDataType
A convenience class for collecting the different data type identifiers used by the mobile device, as well as the
script handlers that are associated with the originating data source. These types consist of a subset of the
client's MobileDataType.ts enum, and include only those types which are intended to be submitted to the gw and
handled as session events.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Set<MobileDataHelper>
handlers()
Provides a set of all the data handling method names used to deal with mobile data submissions.static Optional<MobileDataHelper>
helperForType
(String type) Returns the MobileDataHelper for the given method name;scriptNameForType
(String typeKey) Get the name of the event script that executes when data of the specified type is being handled.typeKeyForScriptName
(String handlerName) Get the name of the event script that executes when data of the specified type is being handled.types()
Return the set of know Mobile data source type IDs.
-
Field Details
-
ACCELEROMETER_TYPE
- See Also:
-
BARCODE_TYPE
- See Also:
-
BLUETOOTH_TYPE
- See Also:
-
NFC_TYPE
- See Also:
-
IMAGE_TYPE
- See Also:
-
BARCODE_SCRIPT
- See Also:
-
BLUETOOTH_SCRIPT
- See Also:
-
ACCELEROMETER_SCRIPT
- See Also:
-
NFC_SCRIPT
- See Also:
-
IMAGE_SCRIPT
- See Also:
-
-
Method Details
-
typeKeyForScriptName
Get the name of the event script that executes when data of the specified type is being handled.- Parameters:
handlerName
- the name of the script handler that handles a specific data type- Returns:
- the mobile data type id for the given handler name, or null if matching script handler name not found
-
scriptNameForType
Get the name of the event script that executes when data of the specified type is being handled.- Parameters:
typeKey
- one of the types defined by the native mobile application and typescript MobileDataType client side class- Returns:
- the script handler name or null if matching script handler name not found
-
types
Return the set of know Mobile data source type IDs. -
handlers
Provides a set of all the data handling method names used to deal with mobile data submissions. For example "onBarcodeScan" -
helperForType
Returns the MobileDataHelper for the given method name;- Parameters:
type
- the mobile data type fetch the handler for, e.g 'native/ndef'
-