/** * @param object * @param templateRepository */ private void processObject( Template.Scope scope, Object object, ITemplateRepository templateRepository) { if (object instanceof Repository) { Repository repository = (Repository) object; templateRepository.setRepository(scope, repository); } else if (object instanceof Template) { Template template = (Template) object; template.setScope(scope); if (template.getResources() != null) { for (TemplateResource resource : template.getResources()) { resource.setParentTemplateReference(template); } } String gId = Temp.StringUtils_emptyIfBlank(template.getGroupId()); String tId = Temp.StringUtils_emptyIfBlank(template.getTemplateId()); String ver = Temp.StringUtils_emptyIfBlank(template.getVersion()); templateRepository.put(gId, tId, ver, template); String key = template.getKey(); if (!Temp.StringUtils_isBlank(key)) { templateRepository.put(key, template); } } else if (object instanceof Map) { @SuppressWarnings("unchecked") Map<String, String> scopeProperties = (Map<String, String>) object; for (String key : scopeProperties.keySet()) { String value = scopeProperties.get(key); value = expressionEvaluator.evaluate(value, globalProperties); // CHECK: scopeProperties.put(key, value); // aktualizacja wartości po rozwinięciu globalProperties.put(key, value); } globalProperties.put(scope.name(), Collections.unmodifiableMap(scopeProperties)); } }