Class PlatformAnalyticsStatisticsTableSettingsXMLUtil


  • public class PlatformAnalyticsStatisticsTableSettingsXMLUtil
    extends java.lang.Object
    A few static methods to read or modify Platform Analytics statistics settings.
    • Field Detail

      • DEFAULT_CLIENT_TELEMETRY_SWITCH_RAW_TEXT

        public static final java.lang.String DEFAULT_CLIENT_TELEMETRY_SWITCH_RAW_TEXT
        See Also:
        Constant Field Values
    • Method Detail

      • modifyBasicStatsAndClientTelemetryForAllProjects

        public static void modifyBasicStatsAndClientTelemetryForAllProjects​(WebIServerSession webIServerSession,
                                                                            java.lang.String basicStatsSettingValue,
                                                                            java.lang.String clientTelemtrySettingValue)
                                                                     throws WebObjectsException
        The method can only be called by administrator. It modifies the pa statistics and client telemetry setting in project setting and server setting.
        Parameters:
        webIServerSession - the current server session.
        basicStatsSettingValue - the value to be set (1 or 0).
        clientTelemtrySettingValue - a json string that contains a flag of 1 or 0.
        Throws:
        WebObjectsException - if the XML API call failed.
      • getClientTelemetrySwitchRawText

        public static java.lang.String getClientTelemetrySwitchRawText​(WebIServerSession webIServerSession)
                                                                throws WebObjectsException
        get the client telemetry switch raw string from SDK. The method shall return the correct result for users who have browse privilege(the lowest level of privilege for a project).
        Parameters:
        webIServerSession - the current server session
        Returns:
        the json string to be serialized to ClientTelemetrySwitch.
        Throws:
        WebObjectsException - when failed to make API call to IServer.
      • isStatsCollectionOnForProject

        public static boolean isStatsCollectionOnForProject​(WebIServerSession webIServerSession,
                                                            java.lang.String projectId)
                                                     throws WebObjectsException,
                                                            MSTRWebAPIException,
                                                            org.xml.sax.SAXException
        Check if the current project has BasicStats turned on or not. The method shall return the correct result for users who have browse privilege(the lowest level of privilege for a project).
        Parameters:
        webIServerSession - the current server session.
        projectId - the current project id.
        Returns:
        a boolean indicates if BasicStats is on or not.
        Throws:
        WebObjectsException - when failed to make API call to IServer.
        MSTRWebAPIException - when failed to make API call to IServer.
        org.xml.sax.SAXException - When failed to parse the IServer XML Response.
      • statisticXMLCommand

        public static java.lang.String statisticXMLCommand​(boolean checkForPA,
                                                           java.lang.String resolvedSessionId,
                                                           java.lang.String projectID)
        Generates the raw XML command string to get EM or Platform Analytics settings. XML Command Example: --> DssXmlServerProjectCollectPAStatisticsFlag -->DssXmlServerProjectStatisticsMobileClientLocation -->DssXmlStatisticMBDeviceTableID -->DssXmlStatisticMBExecTableID -->DssXmlStatisticMBManipTableID The method was originally in MobileLoginTask.
        Parameters:
        checkForPA - if the XML command is for PA or EM.
        resolvedSessionId - the resolved session id.
        projectID - the projectID.
        Returns:
        the raw XML Command string.