Class MobileDataType


  • public class MobileDataType
    extends java.lang.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.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Set<MobileDataHelper> handlers()
      Provides a set of all the data handling method names used to deal with mobile data submissions.
      static java.util.Optional<MobileDataHelper> helperForType​(java.lang.String type)
      Returns the MobileDataHelper for the given method name;
      static java.util.Optional<java.lang.String> scriptNameForType​(java.lang.String typeKey)
      Get the name of the event script that executes when data of the specified type is being handled.
      static java.util.Optional<java.lang.String> typeKeyForScriptName​(java.lang.String handlerName)
      Get the name of the event script that executes when data of the specified type is being handled.
      static java.util.Set<java.lang.String> types()
      Return the set of know Mobile data source type IDs.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • typeKeyForScriptName

        public static java.util.Optional<java.lang.String> typeKeyForScriptName​(@Nonnull
                                                                                java.lang.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 java.util.Optional<java.lang.String> scriptNameForType​(@Nonnull
                                                                             java.lang.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 java.util.Set<java.lang.String> types()
        Return the set of know Mobile data source type IDs.
      • handlers

        public static java.util.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 java.util.Optional<MobileDataHelper> helperForType​(java.lang.String type)
        Returns the MobileDataHelper for the given method name;
        Parameters:
        type - the mobile data type fetch the handler for, e.g 'native/ndef'