|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.templateutil.processor.AbstractHTMLTemplateFactory
wt.templateutil.processor.DefaultHTMLTemplateFactory
wt.templateutil.processor.HelpHTMLTemplateFactory
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. This class provides a context based, HTML Help Page service. This service functions very much like the DefaultHTMLTemplateFactory that is subclasses. The main difference is that the DefaultHTMLTemplateFactory localizes the name of the HTML template file while the HelpHTMLTemplateFactory localizes the directory path to the HTML Template file.
This service will first try and generate the Help File URL to the localized help based the Release 5.0 Help file localization scheme. If this fails, then the Release 4.0 localization scheme is tried to generate the URL to a localized help file. If both fail, an exception is thrown.
In Release 4.0, the directory path to a Help File was localized on the the last directory in the path. For example, the path to
/wt/helpfiles/search/help/htmlsearch.html
would be localized as
/wt/helpfiles/search/help_en_US/htmlsearch.html
In Release 5.0 the directory path to the Help File is localized on the directory named help assuming that the relative path from codebase begins with
/wt/helpfiles/help/...
In this case, an example of the localization would be
/wt/helpfiles/help/search/htmlsearch.html
would be localized as
/wt/helpfiles/help_en_US/search/htmlsearch.html
The service name for the HelpHTMLTemplateFactory is "wt.templateutil.processor.HelpHTMLTemplate". As is the case with the DefaultHTMLTemplateFactory, you can set the service name with the method setServiceName.
An example of code using the HelpHTMLTemplateFactory is
wt.templateutil.processor.HelpHTMLTemplateFactory templateFactory = new
wt.templateutil.processor.HelpHTMLTemplateFactory();
templateFactory.setLocale( locale );
templateFactory.setContextAction( helpContext );
if ( getContextObj() != null )
{
templateFactory.setContextObj( getContextObj() );
}
else if ( getContextClassName() != null)
{
templateFactory.setContextClassName( getContextClassName() );
}
String templateName = templateFactory.getHTMLHelpPagePath();
Supported API: true
Extendable: false
Field Summary | |
private static String |
CLASSNAME
Deprecated. |
private static Hashtable |
directoryCache
Deprecated. |
private String |
fileKey
Deprecated. |
private String |
fileName
Deprecated. |
private static String |
HELP_HOME
Deprecated. |
static String |
PDM_HELP_HOME
Deprecated. |
private String |
relativeFilePath
Deprecated. |
private String |
relativeURL
Deprecated. |
private static String |
RESOURCE
Deprecated. |
private String |
trueFilePath
Deprecated. |
private static boolean |
VERBOSE
Deprecated. |
private static String |
wt_home
Deprecated. |
Fields inherited from class wt.templateutil.processor.DefaultHTMLTemplateFactory |
CODEBASE, newFileSeparator, oldFileSeparator |
Fields inherited from class wt.templateutil.processor.AbstractHTMLTemplateFactory |
|
Fields inherited from interface wt.services.applicationcontext.ApplicationContextChild |
APPLICATION_CONTEXT |
Fields inherited from interface wt.templateutil.processor.ContextHolder |
CONTEXT_ACTION, CONTEXT_CLASS_NAME, CONTEXT_OBJ, CONTEXT_PROPERTIES, FORM_DATA, QUERY_DATA, RESPONSE_EXCEPTIONS, RESPONSE_FOOTERS, RESPONSE_HEADERS, RESPONSE_MESSAGES, RESPONSE_STRING, STATUS |
Constructor Summary | |
HelpHTMLTemplateFactory()
Deprecated. |
Method Summary | |
protected static Hashtable |
getDirectoryCache()
Deprecated. |
protected String |
getFileKey()
Deprecated. |
protected String |
getFileName()
Deprecated. |
static String |
getHELP_HOME()
Deprecated. |
boolean |
getHelpDirectory(String localeString,
HelpDirectoryGenerator directoryGenerator)
Deprecated. |
String |
getHelpLink()
Deprecated. |
String |
getHTMLHelpPagePath()
Deprecated. |
protected String |
getRelativeFilePath()
Deprecated. |
protected String |
getRelativeURL()
Deprecated. |
protected String |
getTrueFilePath()
Deprecated. |
static String |
getWt_home()
Deprecated. |
void |
initFileInfo()
Deprecated. |
void |
initLocale()
Deprecated. |
protected static boolean |
isVERBOSE()
Deprecated. |
static void |
main(String[] args)
Deprecated. The main method can be used to find out is a particular HTML Help file is being found. |
protected LocalizedResource |
newLocalizedResource(String resourceName,
String[] alternateExtensions)
Deprecated. |
protected static void |
setDirectoryCache(Hashtable a_DirectoryCache)
Deprecated. |
protected void |
setFileKey(String a_FileKey)
Deprecated. |
protected void |
setFileName(String a_FileName)
Deprecated. |
static void |
setHELP_HOME(String a_HELP_HOME)
Deprecated. |
protected void |
setRelativeFilePath(String a_RelativeFilePath)
Deprecated. |
protected void |
setRelativeURL(String a_RelativeURL)
Deprecated. |
protected void |
setTrueFilePath(String a_TrueFilePath)
Deprecated. |
protected static void |
setVERBOSE(boolean a_VERBOSE)
Deprecated. |
static void |
setWt_home(String a_Wt_home)
Deprecated. |
Methods inherited from class wt.templateutil.processor.DefaultHTMLTemplateFactory |
getHTMLTemplate, getNameProcessor, processTemplateName, setNameProcessor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private static String HELP_HOME
private static Hashtable directoryCache
private static boolean VERBOSE
private String fileName
private String relativeFilePath
private String relativeURL
private String fileKey
private String trueFilePath
private static String wt_home
public static final String PDM_HELP_HOME
Constructor Detail |
public HelpHTMLTemplateFactory() throws UnableToLoadServiceProperties
UnableToLoadServiceProperties
Method Detail |
public static String getHELP_HOME()
public static void setHELP_HOME(String a_HELP_HOME)
a_HELP_HOME
- protected static Hashtable getDirectoryCache()
protected static void setDirectoryCache(Hashtable a_DirectoryCache)
a_DirectoryCache
- protected static boolean isVERBOSE()
protected static void setVERBOSE(boolean a_VERBOSE)
a_VERBOSE
- protected String getFileName()
protected void setFileName(String a_FileName)
a_FileName
- protected String getRelativeFilePath()
protected void setRelativeFilePath(String a_RelativeFilePath)
a_RelativeFilePath
- protected String getRelativeURL()
The entry in the property file should be relative path from codebase
and end with a file name and, optionally, an anchor in the web page.
Supported API: true
protected void setRelativeURL(String a_RelativeURL)
The entry in the property file should be relative path from codebase
and end with a file name and, optionally, an anchor in the web page.
Supported API: true
a_RelativeURL
- protected String getFileKey()
The key is generated from the <Relative Directory, Locale>
pair.
Supported API: true
protected void setFileKey(String a_FileKey)
The key is generated from the <Relative Directory, Locale>
pair.
Supported API: true
a_FileKey
- protected String getTrueFilePath()
protected void setTrueFilePath(String a_TrueFilePath)
a_TrueFilePath
- public static String getWt_home()
public static void setWt_home(String a_Wt_home)
a_Wt_home
- public String getHTMLHelpPagePath() throws WTException
You can set the context object and the context action directly via the setters for the context object and the context action. You can also simply pass in an HTTPState object with the setState method and the the context object and context action will be retrieved directly from the HTTPState object.
Supported API: true
WTException
public void initLocale() throws WTException
WTException
public void initFileInfo() throws WTException
If a match is found, the following values are set :
WTException
public boolean getHelpDirectory(String localeString, HelpDirectoryGenerator directoryGenerator)
If there is not a directory corresponding the locale passed in, the locale is reduced until a directory is found. If after reducing the locale no directory is found, the default localized directory is a directory localized to _en_US.
Supported API: true
localeString
- directoryGenerator
-
public String getHelpLink() throws WTException
If there is not an HTML file matching that relative file path and file name, a WTException is thrown.
Supported API: true
WTException
protected LocalizedResource newLocalizedResource(String resourceName, String[] alternateExtensions) throws WTException
resourceName
- alternateExtensions
-
WTException
public static void main(String[] args)
The correct usage of this method is :
java wt.templateutil.processor.HelpHTMLTemplateFactory
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |