@RequestMapping(value = "/savePackage", method = RequestMethod.POST) public @ResponseBody String savePackage(@RequestBody PackageRequestData requestData) throws KCEditException { String packageId = requestData.getPackageId(); ContentKCCache myContentCache = ContentKCCache.getContentKCCache(packageId); ISaveSaveAsKnowledgeCenter saver = new SaveSaveAsKnowledgeCenter(myContentCache); saver.saveKC(null, null, false, false, false); logger.info(InfoMessages.SAVE_SUCCESSFULL); return ""; }
@RequestMapping(value = "/publishPackage", method = RequestMethod.POST) public @ResponseBody String publishPackage(@RequestBody PackageRequestData requestData) throws KCEditException { String packageId = requestData.getPackageId(); GeneratePackageAction generatePackageAction = new GeneratePackageAction(packageId); generatePackageAction.generatePackage(); BulkUser bulkUser = new BulkUser("quynguyen", "quynguyen", "pubkcportalvsp80da"); PublishPackageService publishPackageService = new PublishPackageService(bulkUser); PackageInfo packageInfo = new PackageInfo(); packageInfo.setPackageId(packageId); publishPackageService.publishTrackToSkillPort(packageInfo); logger.info(InfoMessages.PUBLISH_SUCCESSFULL); return ""; }