public void addDependency(String name, String scope, String version, String markup) { if (name == null || name.length() == 0) { throw new IllegalArgumentException("Dependency name field may not be null or empty."); } if (markup == null || markup.length() == 0) { throw new IllegalArgumentException("Markup may not be null or empty when adding dependency."); } PageResourceId pres = new PageResourceId(name, scope, version); String resource = getTagsFromText(markup, true); resources.put(pres, resource); }
public String getHeadSectionMarkup() { // First add the markup that was generated by adding elements, then add markup written to the // output stream. StringBuilder txt = new StringBuilder(128); txt.append(getTags(doc)); String src = null; if (sWriter != null) { src = sWriter.toString(); } else if (baoStream != null) { src = baoStream.toString(); } txt.append("\n<!-- markup from portlet output stream -->"); txt.append(getTagsFromText(src, false)); return txt.toString(); }