Package pl.net.bluesoft.rnd.processtool.dao

Examples of pl.net.bluesoft.rnd.processtool.dao.ProcessDictionaryDAO


               }
           }
       }

       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());
       }
View Full Code Here


        ProcessToolContext.Util.setThreadProcessToolContext(ctx);
       
        ProcessDefinitionDAO processDefinitionDao = registry.getProcessDefinitionDAO(ctx.getHibernateSession());
        ProcessDefinitionConfig processDefinition = processDefinitionDao.getActiveConfigurationByKey(changeRequest.getProcessDeifinitionName());
       
        ProcessDictionaryDAO dictionaryDao = registry.getProcessDictionaryDAO(ctx.getHibernateSession());
       
        ProcessDBDictionary dictionary = dictionaryDao.fetchProcessDictionary(processDefinition, changeRequest.getDictionaryId(), changeRequest.getLanguageCode());
        if(dictionary == null)
        {
          dictionary = createDictionary(processDefinition, changeRequest.getDictionaryId(), changeRequest.getLanguageCode());
          dictionaryDao.saveOrUpdate(dictionary);
        }
       
        dictionaryDao.createOrUpdateDictionaryItem(dictionary, changeRequest.getDictionaryItemKey(), changeRequest.getDictionaryItemValue());
      }
     
    });
  }
View Full Code Here

TOP

Related Classes of pl.net.bluesoft.rnd.processtool.dao.ProcessDictionaryDAO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.