Interface MAMAppConfig

  • All Implemented Interfaces:
    com.microsoft.intune.mam.policy.appconfig.MAMAppConfigBase

    
    public interface MAMAppConfig
     implements MAMAppConfigBase
                        

    Represents the custom app configuration data configured for a given user with MAM or with Android Enterprise. It allows the caller to query for specific values, or to retrieve the raw config data.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Boolean getBooleanForKey(@NonNull() String key, @NonNull() MAMAppConfig.BooleanQueryType queryType) Returns a Boolean value for the given key if a value can be coerced into a Boolean, with conflicts resolved according to the given query type.
      abstract Long getIntegerForKey(@NonNull() String key, @NonNull() MAMAppConfig.NumberQueryType queryType) Returns a Long integer value for the given key, with conflicts resolved according to the given query type.
      abstract Double getDoubleForKey(@NonNull() String key, @NonNull() MAMAppConfig.NumberQueryType queryType) Returns a Double value for the given key, with conflicts resolved according to the given query type.
      abstract String getStringForKey(@NonNull() String key, @NonNull() MAMAppConfig.StringQueryType queryType) Returns a String value for the given key, with conflicts resolved according to the given query type.
      • Methods inherited from class com.microsoft.intune.mam.policy.appconfig.MAMAppConfigBase

        getAllBooleansForKey, getAllDoublesForKey, getAllIntegersForKey, getAllStringsForKey, getFullData, hasConflict
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • getBooleanForKey

        @Nullable() abstract Boolean getBooleanForKey(@NonNull() String key, @NonNull() MAMAppConfig.BooleanQueryType queryType)

        Returns a Boolean value for the given key if a value can be coerced into a Boolean, with conflicts resolved according to the given query type. Precisely, values will be returned from this function iff their String representation is case insensitively equal to "true" or "false".

        Parameters:
        key - the dictionary key of the value being queried.
        queryType - determines how conflicts are resolved in case the key exists in multiple dictionaries.
        Returns:

        a Boolean value for the given key if it can be coerced into a Boolean, or null if none exists or it cannot be coerced.

      • getIntegerForKey

        @Nullable() abstract Long getIntegerForKey(@NonNull() String key, @NonNull() MAMAppConfig.NumberQueryType queryType)

        Returns a Long integer value for the given key, with conflicts resolved according to the given query type. Precisely, values will be returned from this function iff Long.parseLong(stringRepresentation) does not throw an exception. Please note that Long.parseLong("1.0") does not produce a Long that is equal to 1L but rather, will throw an exception per Java specifications so, we will not include values that have floating points in the result of this function.

        Parameters:
        key - the dictionary key of the value being queried.
        queryType - determines how conflicts are resolved in case the key exists in multiple dictionaries.
        Returns:

        a Long value for the given key if it can be coerced into a Long, or null if none exists or it cannot be coerced.

      • getDoubleForKey

        @Nullable() abstract Double getDoubleForKey(@NonNull() String key, @NonNull() MAMAppConfig.NumberQueryType queryType)

        Returns a Double value for the given key, with conflicts resolved according to the given query type. Precisely, values will be returned from this function iff Double.parseDouble(stringRepresentation) does not throw an exception.

        Parameters:
        key - the dictionary key of the value being queried.
        queryType - determines how conflicts are resolved in case the key exists in multiple dictionaries.
        Returns:

        a Double value for the given key if it can be coerced into a Double, or null if none exists or it cannot be coerced.

      • getStringForKey

        @Nullable() abstract String getStringForKey(@NonNull() String key, @NonNull() MAMAppConfig.StringQueryType queryType)

        Returns a String value for the given key, with conflicts resolved according to the given query type.

        Parameters:
        key - the dictionary key of the value being queried.
        queryType - determines how conflicts are resolved in case the key exists in multiple dictionaries.
        Returns:

        a String value for the given key, or null if none exists.