public boolean containsHeadElement(String keyHint) { boolean containing = false; if (this.headElements != null && keyHint != null) { KeyValue<String, Element> kvPair = new DefaultKeyValue<String, Element>(keyHint, null, true); containing = this.headElements.contains(kvPair); } return containing; }
KeyValue<String, Element> kvPair = new DefaultKeyValue<String, Element>(keyHint, null, true); this.headElements.remove(kvPair); } else { KeyValue<String, Element> kvPair = new DefaultKeyValue<String, Element>(keyHint, element, true);
protected PageErrors getPageErrors(HstComponentWindow [] sortedComponentWindows, boolean clearExceptions) { List<KeyValue<HstComponentInfo, Collection<HstComponentException>>> componentExceptions = null; for (HstComponentWindow window : sortedComponentWindows) { if (window.hasComponentExceptions()) { if (componentExceptions == null) { componentExceptions = new ArrayList<KeyValue<HstComponentInfo, Collection<HstComponentException>>>(); } HstComponentInfo componentInfo = new DelegatingHstComponentInfo(window.getComponentInfo()); KeyValue<HstComponentInfo, Collection<HstComponentException>> pair = new DefaultKeyValue<HstComponentInfo, Collection<HstComponentException>>(componentInfo, new ArrayList<HstComponentException>(window.getComponentExceptions())); componentExceptions.add(pair); if (clearExceptions) { window.clearComponentExceptions(); } } } if (componentExceptions != null && !componentExceptions.isEmpty()) { return new DefaultPageErrors(componentExceptions); } else { return null; } }
protected PageErrors getPageErrors(HstComponentWindow [] sortedComponentWindows, boolean clearExceptions) { List<KeyValue<HstComponentInfo, Collection<HstComponentException>>> componentExceptions = null; for (HstComponentWindow window : sortedComponentWindows) { if (window.hasComponentExceptions()) { if (componentExceptions == null) { componentExceptions = new ArrayList<KeyValue<HstComponentInfo, Collection<HstComponentException>>>(); } HstComponentInfo componentInfo = new DelegatingHstComponentInfo(window.getComponentInfo(), window.getComponentName(), window.getParametersInfoClassName()); KeyValue<HstComponentInfo, Collection<HstComponentException>> pair = new DefaultKeyValue<HstComponentInfo, Collection<HstComponentException>>(componentInfo, new ArrayList<HstComponentException>(window.getComponentExceptions())); componentExceptions.add(pair); if (clearExceptions) { window.clearComponentExceptions(); } } } if (componentExceptions != null && !componentExceptions.isEmpty()) { return new DefaultPageErrors(componentExceptions); } else { return null; } }
patternAndServletPaths.add(new DefaultKeyValue<Pattern, String>(Pattern.compile(pair[0].trim()), pair[1].trim())); pathInfoPatternAndReplacements.add(new DefaultKeyValue<Pattern, String>(Pattern.compile(pair[0].trim()), pair[1].trim()));