com.revusky.niggle.templates
Class PresentationWrapper
java.lang.Object
|
+--com.revusky.niggle.templates.PresentationWrapper
- Direct Known Subclasses:
- FreemarkerPresentationWrapper
- public abstract class PresentationWrapper
- extends java.lang.Object
An abstract base class for objects that wrap another object
for presentation purposes. It is also a holder for some
static utility routines.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
recordWrapperClass
protected static java.lang.Class recordWrapperClass
interaction
protected ServletInteraction interaction
contentType
protected java.lang.String contentType
locale
protected java.util.Locale locale
- locale to use to select encoding for generated HTML
PresentationWrapper
public PresentationWrapper()
setRecordWrapperClass
public static void setRecordWrapperClass(java.lang.Class cl)
setSessionContext
public void setSessionContext(ServletInteraction interaction)
setContentType
public void setContentType(java.lang.String contentType)
inheritFrom
protected void inheritFrom(PresentationWrapper pw)
createRecordWrapper
protected static PresentationWrapper createRecordWrapper(Record rec,
ServletInteraction interaction,
java.lang.String contentType)
- create a wrapper of the appropriate class
to wrap the given record, reusing the context info.
setRecord
public void setRecord(Record rec)
getLocale
public java.util.Locale getLocale()
getFilenames
public static java.lang.String[] getFilenames(java.lang.String filename,
java.util.Locale locale)
getCharset
public static java.lang.String getCharset(java.util.Locale loc)
- Gets the preferred charset for the given locale, or null if the locale
is not recognized.
- Parameters:
loc
- the locale- Returns:
- the preferred charset