Class URLProcessor
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidgenerateForm(HTTPRequest request, HTTPResponse response) Deprecated.static LocalegetLocale(HTTPRequest request) Deprecated.static voidhandleException(HTTPRequest req, HTTPResponse resp, Exception e) Deprecated.static voidhandleIncludeRequest(Properties params, Locale locale, OutputStream os, Object contextObject) Deprecated.static voidhanldleHTMLError(PrintWriter out, String title, String text, Exception e) Deprecated.static voidinvokeAction(HTTPRequest request, HTTPResponse response) Deprecated.static StringparameterValue(Properties params, String paramName) Deprecated.static voidpresentFormProcessorException(HTTPRequest request, HTTPResponse response, Exception e) Deprecated.static voidprocessForm(HTTPRequest request, HTTPResponse response) Deprecated.static voidprocessForm(HTTPRequest request, HTTPResponse response, InputStream is) Deprecated.static voidreadContextStatic(HTTPState httpState) Deprecated.static voidURLTemplateAction(HTTPRequest req, HTTPResponse resp) Deprecated.static voidvalidatePostStringStatic(Properties parameters) Deprecated.
-
Method Details
-
URLTemplateAction
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
Deprecated.
Supported API: true- Parameters:
request-- Returns:
- Locale
-
parameterValue
Deprecated.
Supported API: true- Parameters:
params-paramName-- Returns:
- String
- Throws:
WTException
-
hanldleHTMLError
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- Find an ActionDelegate and see if the current user has permission to submit the current form. If no ActionDelegate is located for the current action, then it is assumed to be permission/state independent
- Locate a subclass of wt.templateutil.processor.FormTaskDelegate using the FormTaskDelegateFactory and use that subclass of FormTaskDelegate to process this request.
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
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
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- Find an ActionDelegate and see if the current user has permission to submit the Form that is to be generated. If no ActionDelegate is located for the current action, then it is assumed to be permission/state independent
- Locate a subclass of wt.enterprise.TemplateProcessor using the TemplateProcessorFactory and use that subclass of TemplateProcessor to process generate the HTML page with the HTML Form in it.
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
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- Find an ActionDelegate and see if the current user has permission to submit the current form. If no ActionDelegate is located for the current action, then it is assumed to be permission/state independent
- Locate a subclass of wt.templateutil.processor.FormTaskDelegate using the FormTaskDelegateFactory and use that subclass of FormTaskDelegate to process this request.
- Using the updated state of the HTTPState object, locate a subclass of TemplateProcessor using the TemplateProcessorFactory. This instance of a subclass of TemplateProcessor will be used to generate 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-- Throws:
WTException
-
readContextStatic
Deprecated.
Supported API: true- Parameters:
httpState-- Throws:
WTException
-
validatePostStringStatic
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- Find an ActionDelegate and see if the current user has permission to submit the current form. If no ActionDelegate is located for the current action, then it is assumed to be permission/state independent
- Locate a subclass of wt.templateutil.processor.FormTaskDelegate using the FormTaskDelegateFactory and use that subclass of FormTaskDelegate to process this request.
- Using the updated state of the HTTPState object, locate a subclass of TemplateProcessor using the TemplateProcessorFactory. This instance of a subclass of TemplateProcessor will be used to generate 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:
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
-