Class Tags
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.web.templatemodels.BaseTemplateModel
-
- edu.cornell.mannlib.vitro.webapp.web.templatemodels.Tags
-
public class Tags extends BaseTemplateModel
Provides a mechanism for Freemarker templates (main or included, parent or child) to add to the lists of scripts and style sheets for the current page. Each page uses 3 instances of Tags, exposed as ${scripts}, ${headScripts} and ${stylesheets}. A template may add a complete <script/$gt; element (for scripts or headScripts) or a <link> tag (for stylesheets), and these elements will appear at the proper location in the rendered HTML for the page. VIVO-1405: This process is augmented by the TagVersionInfo inner class, which attempts to add a "version=" query string to the URL in the supplied element. The version number is derived from the last-modified date of the specified script or stylesheet on the server. The effect is that a user's browser cache is effectively invalidated each time a new version of the script or stylesheet is deployed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTags.TagsWrapperScript and stylesheet lists are wrapped with a specialized BeansWrapper that exposes certain write methods, instead of the configuration's object wrapper, which doesn't.protected static classTags.TagVersionInfoFind the value of "href" or "src".
-
Field Summary
Fields Modifier and Type Field Description protected LinkedHashSet<String>tags
-
Constructor Summary
Constructors Constructor Description Tags()Tags(LinkedHashSet<String> tags)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String tag)voidadd(String... tags)Stringlist()freemarker.template.TemplateModelwrap()-
Methods inherited from class edu.cornell.mannlib.vitro.webapp.web.templatemodels.BaseTemplateModel
cleanMapValuesForDisplay, cleanTextForDisplay, cleanURIForDisplay, getUrl, getUrl, getUrl, simpleScriptStripper
-
-
-
-
Field Detail
-
tags
protected final LinkedHashSet<String> tags
-
-
Constructor Detail
-
Tags
public Tags()
-
Tags
public Tags(LinkedHashSet<String> tags)
-
-