to.etc.domui.dom.header
Class HeaderContributor
java.lang.Object
to.etc.domui.dom.header.HeaderContributor
- Direct Known Subclasses:
- JavascriptContributor, JavaScriptletContributor, ThemedJavascriptContributor
public abstract class HeaderContributor
- extends java.lang.Object
A header contributor can be registered by nodes to cause something to
be generated at the time that the page HEAD is rendered. A header
contributor typically contains things like Javascript modules to load or
stylesheets to use. The actual contribution to the header is done at rendering
time, so the content can be dynamically determined.
Each header contributor must implement full equality comparison semantics in such
a way that when a header contributor for the same contribution is added it can be
dropped. This is needed for instance when adding Javascript modules; if 15 components
all need the same .js file it needs to be added only once, not 15 times...
- Author:
- Frits Jalvingh
Created on Aug 17, 2007
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
C_ENTRY
public static final java.util.Comparator<HeaderContributorEntry> C_ENTRY
HeaderContributor
public HeaderContributor()
contribute
public abstract void contribute(HtmlFullRenderer r)
throws java.lang.Exception
- Throws:
java.lang.Exception
contribute
public abstract void contribute(OptimalDeltaRenderer r)
throws java.lang.Exception
- Throws:
java.lang.Exception
hashCode
public abstract int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public abstract boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
loadJavascript
public static HeaderContributor loadJavascript(java.lang.String name)
loadJavaScriptlet
public static HeaderContributor loadJavaScriptlet(java.lang.String name)
loadStylesheet
public static HeaderContributor loadStylesheet(java.lang.String name)
loadThemedJavasciptContributor
public static HeaderContributor loadThemedJavasciptContributor(java.lang.String name)
loadGoogleAnalytics
public static HeaderContributor loadGoogleAnalytics(java.lang.String uacode)
- Add a header contributor to add the Google Analytics blurb to every page.
- Parameters:
gac
-
- Returns: