|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.htmlutil.ProcessTemplate
ProcessTemplate contains those methods used to read an HTML input stream, search for any embedded Windchill scripts and invoke the methods specified in any Windchill scripts. 7/23/99: Alternately, ProcessTemplate will return a CachedHTMLTemplate, a cached representation of the parsed template.
Field Summary | |
private static int |
BUFFER_SIZE
Deprecated. |
private static String |
COMMENT_STR
Deprecated. |
private static boolean |
DEBUG
Deprecated. |
private static String |
END_COMMENT_STR
Deprecated. |
private static String |
END_SCRIPT_STR
Deprecated. |
private PushbackInputStream |
in
Deprecated. |
private static String |
LOCALIZED_METHODS
Deprecated. |
private static String |
RECURSE_KEY
Deprecated. |
private static String |
RESOURCE
Deprecated. |
private static String |
SCRIPT_STR
Deprecated. |
private static boolean |
VERBOSE
Deprecated. |
private static String |
versionID
Deprecated. |
private static String |
WINDCHILL_STR
Deprecated. |
Constructor Summary | |
ProcessTemplate()
Deprecated. |
Method Summary | |
private byte[] |
expandBuffer(byte[] buffer,
int size)
Deprecated. Expands the specified buffer by size |
static void |
main(String[] args)
Deprecated. |
private String |
newLocalizedString(String encoding,
byte[] buffer,
int start,
int length)
Deprecated. Creates a string from a byte buffer and encoding. |
private void |
parseTemplate(PushbackInputStream in,
OutputStream out,
Object context)
Deprecated. ParseTemplate reads through the input looking for Windchill scripts. |
private void |
parseTemplate(PushbackInputStream in,
OutputStream out,
Object context,
Locale locale,
boolean includeLocale)
Deprecated. ParseTemplate reads through the input looking for Windchill scripts. |
private CachedHTMLTemplate |
parseTemplate(PushbackInputStream in,
OutputStream out,
Object context,
Locale locale,
boolean includeLocale,
boolean isCached)
Deprecated. |
private CachedHTMLTemplate |
processMethod(String method_line,
OutputStream out,
Object context,
Locale locale,
boolean includeLocale,
boolean isCached,
CachedHTMLTemplate inputTemplate,
boolean retTemplate)
Deprecated. Process a script method line. |
void |
processTemplate(InputStream in,
OutputStream out)
Deprecated. Called initially to process an HTML 'template'. |
void |
processTemplate(InputStream in,
OutputStream out,
Locale locale)
Deprecated. Called initially to process an HTML 'template'. |
void |
processTemplate(InputStream in,
OutputStream out,
Object context)
Deprecated. Called initially to process an HTML 'template'. |
void |
processTemplate(InputStream in,
OutputStream out,
Object context,
Locale locale)
Deprecated. Called initially to process an HTML 'template'. |
CachedHTMLTemplate |
processTemplateCached(InputStream in,
Object context,
Locale locale)
Deprecated. Called initially to process an HTML 'template' and cache the results of the parsing. |
String |
scriptOutput(String script,
Object context,
Locale locale,
boolean includeLocale)
Deprecated. |
private Object |
scriptOutput(String script,
Object context,
Locale locale,
boolean includeLocale,
boolean isCached,
CachedHTMLTemplate cachedTemplate,
boolean retTemplate)
Deprecated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String versionID
private PushbackInputStream in
private static final String END_SCRIPT_STR
private static final String SCRIPT_STR
private static final String WINDCHILL_STR
private static final String COMMENT_STR
private static final String END_COMMENT_STR
private static final String RESOURCE
private static final boolean VERBOSE
private static final boolean DEBUG
private static final int BUFFER_SIZE
private static final String LOCALIZED_METHODS
private static final String RECURSE_KEY
Constructor Detail |
public ProcessTemplate()
Method Detail |
private String newLocalizedString(String encoding, byte[] buffer, int start, int length)
buffer
- The byte arraystart
- The position in the array to startlength
- The number of bytes to useprivate byte[] expandBuffer(byte[] buffer, int size)
size bytes and returns the new buffer
- Parameters:
buffer
- The byte array to expandsize
- the amount to expand it
public CachedHTMLTemplate processTemplateCached(InputStream in, Object context, Locale locale) throws WTException
in
- The input streamcontext
- The context associated with any methods foundlocale
- The Locale to send to the invoked method.
WTException
- Thrown when an error is detected when processing the templateprivate void parseTemplate(PushbackInputStream in, OutputStream out, Object context, Locale locale, boolean includeLocale) throws WTException
in
- The input streamout
- The output streamcontext
- The context associated with any methods found, null if the methods are static.locale
- The Locale to send to the invoked methods for localization.includeLocale
- Indicates if the Locale is to be sent as a parameter to the invoked method. If true,
the locale is sent as the second to last parameter, with OutputStream being the last.
WTException
- Thrown if there is an error detected when parsing the templateprivate CachedHTMLTemplate parseTemplate(PushbackInputStream in, OutputStream out, Object context, Locale locale, boolean includeLocale, boolean isCached) throws WTException
WTException
private CachedHTMLTemplate processMethod(String method_line, OutputStream out, Object context, Locale locale, boolean includeLocale, boolean isCached, CachedHTMLTemplate inputTemplate, boolean retTemplate) throws WTException, IOException
WTException
IOException
public String scriptOutput(String script, Object context, Locale locale, boolean includeLocale) throws WTException, IOException
WTException
IOException
private Object scriptOutput(String script, Object context, Locale locale, boolean includeLocale, boolean isCached, CachedHTMLTemplate cachedTemplate, boolean retTemplate) throws WTException, IOException
WTException
IOException
private void parseTemplate(PushbackInputStream in, OutputStream out, Object context) throws WTException
in
- The input streamout
- The output streamcontext
- The context associated with any methods found, null if the methods are static.
WTException
- Thrown if there is an error detected when parsing the templatepublic void processTemplate(InputStream in, OutputStream out) throws WTException
in
- The input streamout
- The output stream
WTException
- Thrown when an error is detected when processing the templatepublic void processTemplate(InputStream in, OutputStream out, Object context) throws WTException
in
- The input streamout
- The output streamcontext
- The context associated with any methods found
WTException
- Thrown when an error is detected when processing the templatepublic void processTemplate(InputStream in, OutputStream out, Locale locale) throws WTException
in
- The input streamout
- The output streamlocale
- The Locale to send to the invoked method.
WTException
- Thrown when an error is detected when processing the templatepublic void processTemplate(InputStream in, OutputStream out, Object context, Locale locale) throws WTException
in
- The input streamout
- The output streamcontext
- The context associated with any methods foundlocale
- The Locale to send to the invoked method.
WTException
- Thrown when an error is detected when processing the templatepublic static void main(String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |