Home Reference Source
public class | source

MFLiveUpdate

This class represents MFLiveUpdate.

Method Summary

Public Methods
public

async obtainConfiguration(useClientCache: boolean): Promise<Map, String>

Obtain the liveupdate configuration object from server

public

async isFeatureEnabled(featureId: string): Promise<Boolean>

Check if a feature is enabled on the configuration object returned from the server by calling obtainConfiguration API. Return true if feature is enabled or undfined for non existing feature for the given featureId

public

async getProperty(propertyId: string): Promise<String>

Get value of a property on the configuration object returned from the server by calling obtainConfiguration API. Return the value for the given propertyId or undefined in case the property doesn't exist

Public Methods

public async obtainConfiguration(useClientCache: boolean): Promise<Map, String> source

Obtain the liveupdate configuration object from server

Params:

NameTypeAttributeDescription
useClientCache boolean

useClientCache - true (default) tells the native iOS/Android code if we want to cache the result of the calls, cache expiratrion is set in the MFP admin console.

Return:

Promise<Map, String>

If success, a configuration object response containing features and properties fields returned from the server.

public async isFeatureEnabled(featureId: string): Promise<Boolean> source

Check if a feature is enabled on the configuration object returned from the server by calling obtainConfiguration API. Return true if feature is enabled or undefined for non existing feature for the given featureId

Params:

NameTypeAttributeDescription
featureId string

featureId - the feature id to be checked.

Return:

Promise<Boolean>

If success, return true if feature is enabled or undefined for non existing feature for the given featureId .

public async getProperty(propertyId: string): Promise<String> source

Get value of a property on the configuration object returned from the server by calling obtainConfiguration API. Return the value for the given propertyId or undefined in case the property doesn't exist

Params:

NameTypeAttributeDescription
propertyId string

propertyId - the property id .

Return:

Promise<String>

If success, return the value for the given propertyId or undefined in case the property doesn't exist .