|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.util.LocalizedResource
wt.htmlutil.HTMLTemplate
Deprecation Notice: This class is still valid for this release, however this serves as advance notice that it will be removed in the future. All user interfaces built using the Windchill HTML Template Processing client architecture will be rewritten using a different framework in an upcoming release. HTMLTemplate contains those methods needed to get and process a template for a given locale. It now supports a caching mechanism to lower the overhead of parsing a given template by saving the parse information between uses. Subsequent calls to the same page will use the cached parse information rather than re-parsing the old template.
wt.template.cache.enabled
to
true
or false
, respectively.wt.template.cache.size
.Other useful properties are
wt.template.cache.verbose=(true|false)
for verbose logging and
wt.template.cache.timed=(true|false)
to enable timing of the processing of
templates, cached or otherwise.
Nested Class Summary |
Nested classes inherited from class wt.util.LocalizedResource |
|
Field Summary | |
private static boolean |
CACHE_ENABLED
Deprecated. |
private static String |
FILE_SEPARATOR
Deprecated. |
private static int |
MAX_CACHE_SIZE
Deprecated. |
private static boolean |
PROCESS_TIMED
Deprecated. |
private static boolean |
TEMPLATE_VERBOSE
Deprecated. |
private static Cache |
templateCache
Deprecated. |
private static String |
WT_HOME
Deprecated. |
Fields inherited from class wt.util.LocalizedResource |
|
Constructor Summary | |
HTMLTemplate(String resourceName)
Deprecated. Construct an HTMLTemplate object with the given resourceName. |
Method Summary | |
void |
closeInput()
Deprecated. Supported API: true |
String |
getEncoding()
Deprecated. Get character encoding that should be used when writing text to this templates output stream. |
void |
init()
Deprecated. Search for the template best matching the server's Locale. |
void |
init(Locale locale)
Deprecated. Search for the template best matching the given Locale. |
void |
init(Locale locale,
boolean override)
Deprecated. Search for the template best matching the given Locale. |
void |
init(Vector preferences)
Deprecated. Search for the template best matching the given Locale preferences. |
static String[] |
listBaseTemplates(String resourcePath)
Deprecated. Get a list of 'base' .html and .htm files in the directory specified by the given resourcePath. |
static void |
main(String[] args)
Deprecated. Supported API: false |
void |
process(OutputStream out,
Object context)
Deprecated. Call processTemplate with the given OutputStream and context. |
Methods inherited from class wt.util.LocalizedResource |
closeInputStream, getInputStream, getLocale, getLocalizedResourceName, getLocalizedResourceName, getResourceName, openResource, openResource, openResource, setDebug, setLocale |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String WT_HOME
private static final String FILE_SEPARATOR
private static final int MAX_CACHE_SIZE
private static final boolean TEMPLATE_VERBOSE
private static final boolean CACHE_ENABLED
private static final boolean PROCESS_TIMED
private static Cache templateCache
Constructor Detail |
public HTMLTemplate(String resourceName)
resourceName
- The template resource name (without an extension).Method Detail |
public void init() throws WTException
init
in class LocalizedResource
WTException
- Thrown if an IO exception occurs.public void init(Locale locale) throws WTException
init
in class LocalizedResource
locale
- The given Locale.
WTException
- Thrown if there is no file to open.public void init(Locale locale, boolean override) throws WTException
locale
- The given Locale.override
- Boolean flag indicating if the given locale is to override the default locale.
WTException
- Thrown if there is no file to open.public void init(Vector preferences) throws WTException
init
in class LocalizedResource
preferences
- Vector containing the locales to search on.
WTException
- Thrown if there is no file to open.public String getEncoding()
public void process(OutputStream out, Object context) throws WTException
out
- The OutputStream to pass to processTemplate.context
- The Object context to pass to processTemplate.
WTException
- Thrown if an IOException occurs.public static String[] listBaseTemplates(String resourcePath) throws WTException
resourcePath
- String containing the resource path that that is relative
to root directories.
WTException
- Thrown if an IO Exception occurs.public void closeInput()
public static void main(String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |