java.lang.Object
com.inductiveautomation.perspective.common.mobile.MobileDataType

public class MobileDataType extends Object
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 Details

  • Method Details

    • typeKeyForScriptName

      public static Optional<String> typeKeyForScriptName(@Nonnull String handlerName)
      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

      public static Optional<String> scriptNameForType(@Nonnull String typeKey)
      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

      public static Set<String> types()
      Return the set of know Mobile data source type IDs.
    • handlers

      public static Set<MobileDataHelper> handlers()
      Provides a set of all the data handling method names used to deal with mobile data submissions. For example "onBarcodeScan"
    • helperForType

      public static Optional<MobileDataHelper> helperForType(String type)
      Returns the MobileDataHelper for the given method name;
      Parameters:
      type - the mobile data type fetch the handler for, e.g 'native/ndef'