Class: GDSpecificPolicies

GDSpecificPolicies()

The GDSpecificPolicies is used to read application-specific policy from Good Control (GC) console and return it in JSON format. To use this feature you should create policy file in XML format and upload it to the enterprise management console for specific application (for mere details see following guide) The settings can be retrieved by calling updatePolicy method below.

Methods

updatePolicy(successCallback, errorCallback)

Call this function to retrieve application-specific policy from Good Control (GC) console in JSON format. This method observes the application-policy state and once it is updated on enterprise management console we will receive the letest version directly in success callback.
Parameters:
Name Type Description
successCallback function Callback function to invoke when updatePolicy method returns successfully. The policy object is passed to this function as parameter.
errorCallback function Callback function to invoke for error conditions.
Source:
Example
window.plugins.GDSpecificPolicies.updatePolicy(
    function(policy) {
        alert("Retrieved application-specific policy is: " + policy);
    },
    function(error) {
        alert("Error occure: " + error);
    }
);