public void saveI18NMessageFilesToCache() { if (!CdeEnvironment.getPluginSystemReader(BASE_CACHE_DIR).fileExists(msgsRelativeDir)) { CdeEnvironment.getPluginSystemWriter() .createFolder(Utils.joinPath(BASE_CACHE_DIR, msgsRelativeDir)); } try { copyStdGlobalMessageFileToCache(); appendMessageFiles( sourceDashboardBaseMsgFile, getGlobalBaseMessageFile(), getTargetDashboardBaseMessageFile()); } catch (IOException e) { logger.error(e); } }
protected void copyStdGlobalMessageFileToCache() throws IOException { IBasicFile globalMsgCacheFile = getGlobalMsgCacheFile(); if (globalMsgCacheFile != null && globalMsgCacheFile.getContents() != null) { return; } else { String globalMsgFileName = BASE_GLOBAL_MESSAGE_SET_FILENAME + ".properties"; IBasicFile globalMsgFile = CdeEnvironment.getPluginSystemReader(SYSTEM_PLUGIN_GLOBAL_LANGUAGES_DIR) .fetchFile(globalMsgFileName); CdeEnvironment.getPluginSystemWriter() .saveFile( Utils.joinPath(BASE_CACHE_DIR, msgsRelativeDir, globalMsgFileName), globalMsgFile.getContents()); } }