IoT CAS Frameworks/IOT_Server/Report_Generator_Framework/IT/source/DashBoard-JSONgenerator/src/com/merit/dashboard/service/DashBoardService.java
public void generateDefaultServiceAndResourceTypeJson(String resourceType, String startDate, String endDate, String timestampselection, String customer) {
        try {
            queryExecuter = new QueryExecuter();
            resourceType = "";
            String szServiceJson = queryExecuter.generateDefaultServiceJson(resourceType, startDate, endDate, timestampselection, customer);
            new SendFileToJson(customer, "", timestampselection, resourceType, "Defaultservice", szServiceJson);
            String szResourceTypeJson = queryExecuter.generateDefaultResourceTypeJson(resourceType, startDate, endDate, timestampselection, customer);
            new SendFileToJson(customer, "", timestampselection, resourceType, "DefaultResourcetype", szResourceTypeJson);
            String watchDogAlertJson = queryExecuter.getWatchDogAlertJson(customer);
            new SendFileToJson(customer, "", "Hour" + File.separator + "..", resourceType, "WatchDogAlert", watchDogAlertJson);
            if (metricflag) {
                String metricResourceJson = queryExecuter.getMetricResourceTypeMapping(customer);
                new SendFileToJson(customer, "", "Hour", "", "MetricResourceMappingJson", metricResourceJson);
                metricflag = false;
            }
            
             log.debug("Done generating default service resourcetype jsons");

            //added by Rekha for generating service performance json======================================================================
            /*String[] szPerformanceJsons = DBUtilHelper.getMetrics_mapping_properties().getProperty("PerformanceJsons").split(",");
            log.debug("Performance jsons configured==>>" + szPerformanceJsons);
            String szResourceType, metricType, configuredMetricType, jsonGenr;
            for (String perfJSON : szPerformanceJsons) {
                PerformanceJsonsConfig szJsonConf = Controller.getJsonConfig(perfJSON);
                szResourceType = szJsonConf.getResourceType();
                metricType = szJsonConf.getMetricType();
                configuredMetricType = szJsonConf.getConfiguredMetricType();
                jsonGenr = szJsonConf.getJsonGenerator();
                String szServicePerformance = queryExecuter.generateServicePerformanceJson(szResourceType, metricType, configuredMetricType, jsonGenr,
                        startDate, endDate, timestampselection, customer);
                new SendFileToJson(customer, "", timestampselection, resourceType, perfJSON, szServicePerformance);
            }*/

            //============================================================================================================================
            queryExecuter = null;
        } catch (Exception e) {
            e.printStackTrace();

        }
        //new SendFileToJson(customer, timestampselection, resourceType, szJsonName, szMetricTypeValueJson);
    }
/**
     * ************************************************************************************************
     * This method is calling queryExecuter.generateDefaultServiceJson() for
     * generating default service and
     * queryExecuter.generateDefaultResourceTypeJson() for generating default
     * ResourceType JSON for Chart and then returning JSON String for creating
     * JSON Files
     *
     * @param customer Selected customerID
     * @param resourceType Different category as
     * Desktop,Server,DataBase,Network,JVM
     * @param startDate from date as subtract(endDate-timestampselection) in
     * Date Format
     * @param endDate Current date in Date Format
     * @return timestampselection Selected Time Period means (hour, days, week,
     * month, year)
     *
     * *************************************************************************************************
     */
This method is calling queryExecuter.generateDefaultServiceJson() for
generating default service and
queryExecuter.generateDefaultResourceTypeJson() for generating default
ResourceType JSON for Chart and then returning JSON String for creating
JSON Files


This method is calling queryExecuter . generateDefaultServiceJson () for generating default service and queryExecuter . generateDefaultResourceTypeJson () for generating default ResourceType JSON for Chart and then returning JSON String for creating JSON Files
public void generateDefaultServiceAndResourceTypeJson(String resourceType, String startDate, String endDate, String timestampselection, String customer) {
        try {
            queryExecuter = new QueryExecuter();
            resourceType = "";
            String szServiceJson = queryExecuter.generateDefaultServiceJson(resourceType, startDate, endDate, timestampselection, customer);
            new SendFileToJson(customer, "", timestampselection, resourceType, "Defaultservice", szServiceJson);
            String szResourceTypeJson = queryExecuter.generateDefaultResourceTypeJson(resourceType, startDate, endDate, timestampselection, customer);
            new SendFileToJson(customer, "", timestampselection, resourceType, "DefaultResourcetype", szResourceTypeJson);
            String watchDogAlertJson = queryExecuter.getWatchDogAlertJson(customer);
            new SendFileToJson(customer, "", "Hour" + File.separator + "..", resourceType, "WatchDogAlert", watchDogAlertJson);
            if (metricflag) {
                String metricResourceJson = queryExecuter.getMetricResourceTypeMapping(customer);
                new SendFileToJson(customer, "", "Hour", "", "MetricResourceMappingJson", metricResourceJson);
                metricflag = false;
            }
             log.debug("Done generating default service resourcetype jsons");
            /*String[] szPerformanceJsons = DBUtilHelper.getMetrics_mapping_properties().getProperty("PerformanceJsons").split(",");
            log.debug("Performance jsons configured==>>" + szPerformanceJsons);
            String szResourceType, metricType, configuredMetricType, jsonGenr;
            for (String perfJSON : szPerformanceJsons) {
                PerformanceJsonsConfig szJsonConf = Controller.getJsonConfig(perfJSON);
                szResourceType = szJsonConf.getResourceType();
                metricType = szJsonConf.getMetricType();
                configuredMetricType = szJsonConf.getConfiguredMetricType();
                jsonGenr = szJsonConf.getJsonGenerator();
                String szServicePerformance = queryExecuter.generateServicePerformanceJson(szResourceType, metricType, configuredMetricType, jsonGenr,
                        startDate, endDate, timestampselection, customer);
                new SendFileToJson(customer, "", timestampselection, resourceType, perfJSON, szServicePerformance);
            }*/
            queryExecuter = null;
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
public void generateDefaultServiceAndResourceTypeJson ( String resourceType , String startDate , String endDate , String timestampselection , String customer ) { try { queryExecuter = new QueryExecuter ( ) ; resourceType = "" ; String szServiceJson = queryExecuter . generateDefaultServiceJson ( resourceType , startDate , endDate , timestampselection , customer ) ; new SendFileToJson ( customer , "" , timestampselection , resourceType , "Defaultservice" , szServiceJson ) ; String szResourceTypeJson = queryExecuter . generateDefaultResourceTypeJson ( resourceType , startDate , endDate , timestampselection , customer ) ; new SendFileToJson ( customer , "" , timestampselection , resourceType , "DefaultResourcetype" , szResourceTypeJson ) ; String watchDogAlertJson = queryExecuter . getWatchDogAlertJson ( customer ) ; new SendFileToJson ( customer , "" , "Hour" + File . separator + ".." , resourceType , "WatchDogAlert" , watchDogAlertJson ) ; if ( metricflag ) { String metricResourceJson = queryExecuter . getMetricResourceTypeMapping ( customer ) ; new SendFileToJson ( customer , "" , "Hour" , "" , "MetricResourceMappingJson" , metricResourceJson ) ; metricflag = false ; } log . debug ( "Done generating default service resourcetype jsons" ) ; /*String[] szPerformanceJsons = DBUtilHelper.getMetrics_mapping_properties().getProperty("PerformanceJsons").split(",");
            log.debug("Performance jsons configured==>>" + szPerformanceJsons);
            String szResourceType, metricType, configuredMetricType, jsonGenr;
            for (String perfJSON : szPerformanceJsons) {
                PerformanceJsonsConfig szJsonConf = Controller.getJsonConfig(perfJSON);
                szResourceType = szJsonConf.getResourceType();
                metricType = szJsonConf.getMetricType();
                configuredMetricType = szJsonConf.getConfiguredMetricType();
                jsonGenr = szJsonConf.getJsonGenerator();
                String szServicePerformance = queryExecuter.generateServicePerformanceJson(szResourceType, metricType, configuredMetricType, jsonGenr,
                        startDate, endDate, timestampselection, customer);
                new SendFileToJson(customer, "", timestampselection, resourceType, perfJSON, szServicePerformance);
            }*/ queryExecuter = null ; } catch ( Exception e ) { e . printStackTrace ( ) ; } }
This method is calling queryExecuter.generateDefaultServiceJson() for
 generating default service and
 queryExecuter.generateDefaultResourceTypeJson() for generating default
 ResourceType JSON for Chart and then returning JSON String for creating
 JSON Files
This method is calling queryExecuter . generateDefaultServiceJson () for generating default service and queryExecuter . generateDefaultResourceTypeJson () for generating default ResourceType JSON for Chart and then returning JSON String for creating JSON Files
//added by Rekha for generating service performance json====================================================================== //============================================================================================================================ //new SendFileToJson(customer, timestampselection, resourceType, szJsonName, szMetricTypeValueJson);