}
}
}
private void saveDictionaryInternal(Session session, ProcessDefinitionConfig definitionConfig, ProcessDictionaries dictionaries) {
ProcessDictionaryDAO dao = getProcessDictionaryDAO(session);
List<ProcessDBDictionary> processDBDictionaries = DictionaryLoader.getDictionariesFromXML(dictionaries);
for (ProcessDBDictionary dict : processDBDictionaries) {
for (ProcessDBDictionaryPermission perm : dict.getPermissions()) {
if (!Strings.hasText(perm.getRoleName())) {
perm.setRoleName(PATTERN_MATCH_ALL);
}
if (!Strings.hasText(perm.getPrivilegeName())) {
perm.setPrivilegeName(PRIVILEGE_EDIT);
}
}
}
DictionaryLoader.validateDictionaries(processDBDictionaries);
dao.createOrUpdateDictionaries(definitionConfig, processDBDictionaries,
dictionaries.getOverwrite() != null && dictionaries.getOverwrite());
}