public void setAttribute(String attribute, Object obj1) { Set<Entry<String, StringTemplate>> set = m_templates.entrySet(); Iterator<Entry<String, StringTemplate>> it = set.iterator(); while (it.hasNext()) { Map.Entry<String, StringTemplate> m = (Map.Entry<String, StringTemplate>) it.next(); // Call setAttribute Log.printDebug( "setting attribute (obj1) to template group " + m.getKey() + " to " + m.getValue().getName()); StringTemplate template = m.getValue(); template.setAttribute(attribute, obj1); // Update extensions List<StringTemplate> extensions = m_extensionstemplates.get(m.getKey() + "_" + template.getName()); if (extensions != null) { for (StringTemplate extension : extensions) { extension.setAttribute(attribute, obj1); } } } }
public void setAttribute(String attribute, Object obj1, Object obj2, Object obj3, Object obj4) { Set<Entry<String, StringTemplate>> set = m_templates.entrySet(); Iterator<Entry<String, StringTemplate>> it = set.iterator(); while (it.hasNext()) { Map.Entry<String, StringTemplate> m = (Map.Entry<String, StringTemplate>) it.next(); // Call setAttribute Log.printDebug( "setting attribute (obj1,obj2,obj3,obj4) to template group " + m.getKey() + " to " + m.getValue().getName()); m.getValue().setAttribute(attribute, obj1, obj2, obj3, obj4); } }
public void setAttribute(String attribute, TemplateGroup tg) { if (tg != null) { Set<Entry<String, StringTemplate>> set = m_templates.entrySet(); Iterator<Entry<String, StringTemplate>> it = set.iterator(); while (it.hasNext()) { Map.Entry<String, StringTemplate> m = (Map.Entry<String, StringTemplate>) it.next(); // Call setAttribute StringTemplate template = tg.getTemplate(m.getKey()); if (template != null) { Log.printDebug( "setting attribute (TemplateGroup) to template group " + m.getKey() + " from " + template.getName() + " to " + m.getValue().getName()); m.getValue().setAttribute(attribute, template.toString()); } } } }