Java Sample – ImportTemplate.java for Oracle Profitability and Cost Management Cloud

Prerequisites: json.jar

Prerequisites: See Oracle Profitability and Cost Management Cloud Common Helper Functions for Java

    public void importTemplate() throws Exception {
        
        JSONObject json = new JSONObject();
        json.put("description", "Import Template");
        json.put("instanceName", "PROFITABILITY_WEB_APP");
        json.put("essApplicationServer", "EssbaseCluster-1");
        json.put("sharedServicesProject", "EssbaseCluster-1");
        json.put("applicationType", "Management Ledger");
        json.put("fileName", "HPCM_BksML12_20160128_200053.zip");
        json.put("isApplicationOverwrite", true);
        
        String urlString = "%s/epm/rest/%s/applications/%s/jobs/templateImportJob";
        executeJob(urlString, "POST", json.toString());
        
    }