wt.enterprise
Class URLProcessor

java.lang.Object
  extended bywt.enterprise.URLProcessor
Direct Known Subclasses:
ReportProcessor, WorkItemURLProcessor

public class URLProcessor
extends Object

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 is a "Gateway" for the HTML client; by "Gateway", it is meant that there are methods in this class that can be referenced directly by URLs pointing to the Windchill method server, independent of whether CGI or Servlets are being used. Any method that would like to be available directly via a URL needs to implement the following signature :

public static void Method Name( wt.httpgw.HTTPRequest req, wt.httpgw.HTTPResponse resp )
throws List of exceptions {

The method will be available via URL using a URL that looks like:
http://Windchill Method Server Address/Class Name/Method Name

In the case that the Windchill home page is at http://smith.ptc.com/WindchillGW, the URL that would reference the method processForm of this class would look like:
http://smith.ptc.com/WindchillGW/URLProcessor/processForm

This class defines several methods that receive the HTTP request, process the request if necessary, and generate a response page. These "Gateway" methods below each perform this general functionality, but each has a specific purpose that is described in the method JavaDoc.

Supported API: true

Extendable: false


Field Summary
static String ACTION
          Deprecated.  
static String CLASS
          Deprecated.  
private static String CLASSNAME
          Deprecated.  
private static Locale locale
          Deprecated.  
static String NAME_HDR
          Deprecated.  
static String NULL_ACTION
          Deprecated.  
static String OID
          Deprecated.  
private static ResourceBundle rb
          Deprecated.  
private static String RESOURCE
          Deprecated.  
private static String SEP
          Deprecated.  
static String UPDATE_COUNT
          Deprecated.  
private static boolean VERBOSE
          Deprecated.  
 
Constructor Summary
URLProcessor()
          Deprecated.  
 
Method Summary
static Hashtable copyToUpperCase(Hashtable props)
          Deprecated.  
static Properties copyToUpperCase(Properties props)
          Deprecated.  
static void generateForm(HTTPRequest request, HTTPResponse response)
          Deprecated.  
protected static DefaultHTMLTemplateFactory getHtmlTemplateFactoryStatic()
          Deprecated.  
static Locale getLocale(HTTPRequest request)
          Deprecated.  
protected static TemplateProcessor getTemplateProcessorStatic(HTTPState httpState, HTTPRequest request)
          Deprecated.  
static void handleException(HTTPRequest req, HTTPResponse resp, Exception e)
          Deprecated.  
static void handleIncludeRequest(Properties params, Locale locale, OutputStream os, Object contextObject)
          Deprecated.  
static void hanldleHTMLError(PrintWriter out, String title, String text, Exception e)
          Deprecated.  
static void invokeAction(HTTPRequest request, HTTPResponse response)
          Deprecated.  
private static boolean isProjectLinkOid(String nmOidStr)
          Deprecated.  
static Properties mergeProperties(Properties receiver, Properties sender)
          Deprecated.  
static String parameterValue(Properties params, String paramName)
          Deprecated.  
static void presentFormProcessorException(HTTPRequest request, HTTPResponse response, Exception e)
          Deprecated.  
protected static void processAction(HTTPState httpState, HTTPRequest request, ContentHTTPStream contentStream)
          Deprecated.  
static void processForm(HTTPRequest request, HTTPResponse response)
          Deprecated.  
static void processForm(HTTPRequest request, HTTPResponse response, InputStream is)
          Deprecated.  
private static void put(Hashtable props, String key, String value)
          Deprecated. Put the specified value in the Hashtable with the specified key, unless the key is already in use, in which case, add the value to a Vector stored under the same key
static void readContextStatic(HTTPState httpState)
          Deprecated.  
static void URLTemplateAction(HTTPRequest req, HTTPResponse resp)
          Deprecated.  
static void validatePostStringStatic(Properties parameters)
          Deprecated.  
static void validatePostStringStatic(Properties parameters, String jspAction)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
Deprecated. 
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Deprecated. 

VERBOSE

private static boolean VERBOSE
Deprecated. 

rb

private static final ResourceBundle rb
Deprecated. 

locale

private static Locale locale
Deprecated. 

NAME_HDR

public static final String NAME_HDR
Deprecated. 
See Also:
Constant Field Values

ACTION

public static final String ACTION
Deprecated. 
See Also:
Constant Field Values

CLASS

public static final String CLASS
Deprecated. 
See Also:
Constant Field Values

OID

public static final String OID
Deprecated. 
See Also:
Constant Field Values

NULL_ACTION

public static final String NULL_ACTION
Deprecated. 
See Also:
Constant Field Values

UPDATE_COUNT

public static final String UPDATE_COUNT
Deprecated. 
See Also:
Constant Field Values

SEP

private static final String SEP
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

URLProcessor

public URLProcessor()
Deprecated. 
Method Detail

URLTemplateAction

public static void URLTemplateAction(HTTPRequest req,
                                     HTTPResponse resp)
                              throws WTException
Deprecated.  

This gateway method should be used to generate HTML pages that present views of data. This gateway method should not be used to process HTML Forms or generate HTML Forms. There are a few existing exceptions, but they should remain exceptions.

This method will accept a the standard HTTP Get that has a query String attached to the URL. This method will also accept an HTTP Post request. This method WILL NOT accept an HTTP Post with enc-type set for a multipart post. An exception will be thrown in this case.

This gateway method, as with all gateway methods in this class, require that a parameter with the name action be passed in either the query string or the Form data of the HTTP Post. If no value for an action parameter is sent, an exception is thrown.

The template processor that is used to process this request is retrieved using the wt.enterprise.TemplateProcessorFactory. This factory will locate the TemplateProcessor subclass to use based on value of the action parameter and either the class of the oid passed in or the class of the class parameter passed in.

Supported API: true

Parameters:
req -
resp -
Throws:
WTException

handleIncludeRequest

public static void handleIncludeRequest(Properties params,
                                        Locale locale,
                                        OutputStream os,
                                        Object contextObject)
                                 throws WTException
Deprecated.  



Supported API: true

Parameters:
params -
locale -
os -
contextObject -
Throws:
WTException

handleException

public static void handleException(HTTPRequest req,
                                   HTTPResponse resp,
                                   Exception e)
                            throws WTException
Deprecated.  



Supported API: true

Parameters:
req -
resp -
e -
Throws:
WTException

getLocale

public static Locale getLocale(HTTPRequest request)
Deprecated.  



Supported API: true

Parameters:
request -
Returns:
Locale

parameterValue

public static String parameterValue(Properties params,
                                    String paramName)
                             throws WTException
Deprecated.  



Supported API: true

Parameters:
params -
paramName -
Returns:
String
Throws:
WTException

hanldleHTMLError

public static void hanldleHTMLError(PrintWriter out,
                                    String title,
                                    String text,
                                    Exception e)
Deprecated.  



Supported API: true

Parameters:
out -
title -
text -
e -

processForm

public static void processForm(HTTPRequest request,
                               HTTPResponse response,
                               InputStream is)
                        throws WTException
Deprecated.  

This "Gateway" method is the first method in a two stage process that is used to process an HTML form from an HTTP GET/POST request. Multi-part POSTs are accepted and there is support for uploading content from the HTML form using the service methods in the wt.content package.

The first stage of the processing the HTML Form, as performed in this method, consists of the following actions In the FormTaskDelegate, the HTTPState object should be updated based on the result of processing the HTML Form. The updated HTTPState object will be used in the second stage of the Form processing to select and process the response page.

This gateway method, as with all gateway methods in this class, require that a parameter with the name action be passed in either the query string or the Form data of the HTTP Post. If no value for an action parameter is sent, an exception is thrown.

Supported API: true

Parameters:
request -
response -
is -
Throws:
WTException

processForm

public static void processForm(HTTPRequest request,
                               HTTPResponse response)
                        throws WTException
Deprecated.  

This "Gateway" method is the second method in a two stage process that is used to process an HTML form from an HTTP GET/POST request. Multi-part POSTs are accepted.

The second stage of the processing the HTML Form, as performed in this method, consists of the checking the settings in the HTTPState object, that should have been updated in FormTaskDelegate, and using these settings to select an appropriate TemplateProcessor subclass to generate the Response page. The TemplateProcessorFactory is used to select the desired subclass of TemplateProcessor.

This gateway method, as with all gateway methods in this class, require that a parameter with the name action be passed in either the query string or the Form data of the HTTP Post. If no value for an action parameter is sent, an exception is thrown.

Supported API: true

Parameters:
request -
response -
Throws:
WTException

generateForm

public static void generateForm(HTTPRequest request,
                                HTTPResponse response)
                         throws WTException
Deprecated.  

This "Gateway" method is used to generate HTML pages with HTML Forms in them. This "Gateway" method can be called using either an HTTP GET or an HTTP POST. Calling this "Gateway" method with a multi-part POST will result in an exception being thrown and the page not being generated.

The generation of the HTML page with the HTML Form in it consists of the following actions

This gateway method, as with all gateway methods in this class, require that a parameter with the name action be passed in either the query string or the Form data of the HTTP Post. If no value for an action parameter is sent, an exception is thrown.

The template processor that is used to process this request is retrieved using the wt.enterprise.TemplateProcessorFactory. This factory will locate the TemplateProcessor subclass to use based on value of the action parameter and either the class of the oid passed in or the class of the class parameter passed in.

Supported API: true

Parameters:
request -
response -
Throws:
WTException

invokeAction

public static void invokeAction(HTTPRequest request,
                                HTTPResponse response)
                         throws WTException
Deprecated.  

This "Gateway" method is used to process an HTML form from an HTTP GET/POST request. Multi-part POSTs are NOT accepted and there is NOT support for uploading content from the HTML form.
This method is generally used to process actions that are invoked by clicking on a URL that has a Query String (i.e. an HTTP GET request). HTTP POST requests that result from submitting an HTML Form are processed by this "Gateway" method. However, you should really the processForm "Gateway" method for such a purpose.

The processing the Action/HTML Form, as performed in this method, consists of the following actions

This gateway method, as with all gateway methods in this class, require that a parameter with the name action be passed in either the query string or the Form data of the HTTP Post. If no value for an action parameter is sent, an exception is thrown.

Supported API: true

Parameters:
request -
response -
Throws:
WTException

readContextStatic

public static void readContextStatic(HTTPState httpState)
                              throws WTException
Deprecated.  



Supported API: true

Parameters:
httpState -
Throws:
WTException

validatePostStringStatic

public static void validatePostStringStatic(Properties parameters)
                                     throws WTException
Deprecated.  

This "Gateway" method is used to process an HTML form from an HTTP GET/POST request. Multi-part POSTs are NOT accepted and there is NOT support for uploading content from the HTML form.
This method is generally used to process actions that are invoked by clicking on a URL that has a Query String (i.e. an HTTP GET request). HTTP POST requests that result from submitting an HTML Form are processed by this "Gateway" method. However, you should really the processForm "Gateway" method for such a purpose.

The processing the Action/HTML Form, as performed in this method, consists of the following actions

This gateway method, as with all gateway methods in this class, require that a parameter with the name action be passed in either the query string or the Form data of the HTTP Post. If no value for an action parameter is sent, an exception is thrown.

Supported API: true

Parameters:
parameters -
Throws:
WTException

presentFormProcessorException

public static void presentFormProcessorException(HTTPRequest request,
                                                 HTTPResponse response,
                                                 Exception e)
                                          throws WTException
Deprecated.  



Supported API: true

Parameters:
request -
response -
e -
Throws:
WTException

getTemplateProcessorStatic

protected static TemplateProcessor getTemplateProcessorStatic(HTTPState httpState,
                                                              HTTPRequest request)
                                                       throws WTException
Deprecated. 
Throws:
WTException

getHtmlTemplateFactoryStatic

protected static DefaultHTMLTemplateFactory getHtmlTemplateFactoryStatic()
Deprecated. 

processAction

protected static void processAction(HTTPState httpState,
                                    HTTPRequest request,
                                    ContentHTTPStream contentStream)
                             throws WTException
Deprecated. 
Throws:
WTException

copyToUpperCase

public static Properties copyToUpperCase(Properties props)
Deprecated. 

copyToUpperCase

public static Hashtable copyToUpperCase(Hashtable props)
Deprecated. 

mergeProperties

public static Properties mergeProperties(Properties receiver,
                                         Properties sender)
Deprecated. 

put

private static void put(Hashtable props,
                        String key,
                        String value)
Deprecated. 
Put the specified value in the Hashtable with the specified key, unless the key is already in use, in which case, add the value to a Vector stored under the same key


validatePostStringStatic

public static void validatePostStringStatic(Properties parameters,
                                            String jspAction)
                                     throws WTException
Deprecated. 
Throws:
WTException

isProjectLinkOid

private static boolean isProjectLinkOid(String nmOidStr)
Deprecated.