wt.enterprise
Class PartPropertiesTemplateFactory

java.lang.Object
  extended bywt.enterprise.PartPropertiesTemplateFactory
All Implemented Interfaces:
ApplicationContextChild

public class PartPropertiesTemplateFactory
extends Object
implements ApplicationContextChild

This class is a factory that creates the desired instance of an HTMLTemplate for ChangeViewProcessor to process. This factory uses entries in service.properties file under the Class specific templates section.

To add a new HTML template to be available to the ChangeViewProcessor, do the following steps

  1. Create your HTML Template file, newTemplate.html and place it in the wt.clients.changeMgmt directory and update the makefile
  2. place the following entry in the Class specific templates section in service.properties
  3. Now the following URL will generate an HTML page using your new Template
A special note about the "key word" and "some class" entries above. Currently, the PartPropertiesTemplateFactory template selection is being driven off of the "key word" entry. Other TemplateProcessors, such as the ObjectPropertiesProcessor, have a template selection that is based upon the class of the object in the "oid" entry in the URL to generate the page.

Supported API: false

Extendable: false

See Also:
wt.enterprise.ChangeViewProcessor;, wt.htmlutil.HTMLTemplate;, wt.htmlutil.HtmlUtil;, wt.httpgw.GatewayURL;

Field Summary
private  ApplicationContext applicationContext
           
private static String CLASSNAME
           
private static String RESOURCE
           
private static boolean VERBOSE
           
 
Fields inherited from interface wt.services.applicationcontext.ApplicationContextChild
APPLICATION_CONTEXT
 
Constructor Summary
PartPropertiesTemplateFactory()
          Supported API: false
 
Method Summary
 ApplicationContext getApplicationContext()
          Gets the object for the association that plays role: APPLICATION_CONTEXT.
 ApplicationContextServices getApplicationContextServices()
          Supported API: false
protected  HTMLTemplate getHTMLTemplate(Object requestor, String templateServiceName)
          Factory method to return an instance of the TemplateProcessor for the object passed.
 void setApplicationContext(ApplicationContext a_ApplicationContext)
          Sets the object for the association that plays role: APPLICATION_CONTEXT.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERBOSE

private static boolean VERBOSE

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

applicationContext

private ApplicationContext applicationContext
Constructor Detail

PartPropertiesTemplateFactory

public PartPropertiesTemplateFactory()
                              throws UnableToLoadServiceProperties
Supported API: false

Throws:
UnableToLoadServiceProperties
Method Detail

getHTMLTemplate

protected HTMLTemplate getHTMLTemplate(Object requestor,
                                       String templateServiceName)
                                throws WTException
Factory method to return an instance of the TemplateProcessor for the object passed. If the String templateFileResource is null, then the method getApplicationContextServices will return the name of the template to use based on the entry in service.properties. Otherwise, the value passed in call will be used as the name of the template. A call to TemplateName.getChangeMgmt will use the String in templateFileResource to find the correct entry in the directory codebase/templates/changeMgmt. The templateFileResource is optional, and can be used to override the value normally returned by the factory.

Supported API: false

Returns:
TemplateProcessor
Throws:
WTException
PropertyVetoException

getApplicationContext

public ApplicationContext getApplicationContext()
Gets the object for the association that plays role: APPLICATION_CONTEXT.

Supported API: false

Specified by:
getApplicationContext in interface ApplicationContextChild
Returns:
ApplicationContext

setApplicationContext

public void setApplicationContext(ApplicationContext a_ApplicationContext)
                           throws WTPropertyVetoException
Sets the object for the association that plays role: APPLICATION_CONTEXT.

Supported API: false

Specified by:
setApplicationContext in interface ApplicationContextChild
Parameters:
a_ApplicationContext -
Throws:
WTPropertyVetoException

getApplicationContextServices

public ApplicationContextServices getApplicationContextServices()
Supported API: false

Throws:
WTPropertyVetoException