Class GatewayServletHelper
This class's scope should not be extended beyond the construction of requests for Anonymous and Authenticated gateways. If other gateways are required, they should be created based on the implementation provided here.
The GatewayServletHelper utilizes the URLFactory to create and return HREFs according to the current context. If the URLFactory's requestURI is set, a relative HREF will be returned if possible. If no requestURI is present the HREF will be relative to the Windchill codebase.
For example,
if an anonymous gateway was set to http://hostname/Windchill/servlet/WindchillAuthGW
and the requestURI for the URLFactory is set to the codebase
(in this example http://hostname/Windchill)
a call to
buildAuthenticatedHREF( aURLFactory, "wt.httpgw.HTTPServer", "echo", null )servlet/WindchillAuthGW/wt.httpgw.HTTPServer/echo"-
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildAnonymousHREF(URLFactory aFactory) Will return an HREF String to the Anonymous Gateway.static StringbuildAnonymousHREF(URLFactory aFactory, String aClass) Will return an HREF String to the Anonymous Gateway.static StringbuildAnonymousHREF(URLFactory aFactory, String c, String m, String params) Will return a HREF String for a class and method invoked through the Anonymous Gateway.static StringbuildAnonymousHREF(URLFactory aFactory, String c, String m, String f, String params) Will return a HREF String for a class and method invoked through the Anonymous Gateway.static StringbuildAnonymousHREF(URLFactory aFactory, String c, String m, String f, HashMap params) Will return a HREF String for a class and method invoked through the Anonymous Gateway.static StringbuildAnonymousHREF(URLFactory aFactory, String c, String m, HashMap params) Will return a HREF String for a class and method invoked through the Anonymous Gateway.static URLbuildAnonymousURL(URLFactory aFactory) Will return a URL for a class and method invoked through the Anonymous Gateway.static URLbuildAnonymousURL(URLFactory aFactory, String aClass) Will return a URL for a class and method invoked through the Anonymous Gateway.static URLbuildAnonymousURL(URLFactory aFactory, String aClass, String params) Will return a URL for a class and method invoked through the Anonymous Gateway.static URLbuildAnonymousURL(URLFactory aFactory, String c, String m, String params) Will return a URL for a class and method invoked through the Anonymous Gateway.static URLbuildAnonymousURL(URLFactory aFactory, String c, String m, String f, String params) Will return a URL for a class and method invoked through the Anonymous Gateway.static URLbuildAnonymousURL(URLFactory aFactory, String c, String m, String f, HashMap params) Will return a URL for a class and method invoked through the Anonymous Gateway.static URLbuildAnonymousURL(URLFactory aFactory, String c, String m, HashMap params) Will return a URL for a class and method invoked through the Anonymous Gateway.static URLbuildAnonymousURL(URLFactory aFactory, String aClass, HashMap params) Will return a URL for a class and method invoked through the Anonymous Gateway.static StringbuildAuthenticatedHREF(URLFactory aFactory) Will return an HREF String to the Authenticated Gateway.static StringbuildAuthenticatedHREF(URLFactory aFactory, String aClass) Will return an HREF String to the Authenticated Gateway.static StringbuildAuthenticatedHREF(URLFactory aFactory, String c, String m, String params) Will return a HREF String for a class and method invoked through the Authenticated Gateway.static StringbuildAuthenticatedHREF(URLFactory aFactory, String c, String m, String f, String params) Will return a HREF String for a class and method invoked through the Authenticated Gateway.static StringbuildAuthenticatedHREF(URLFactory aFactory, String c, String m, String f, HashMap params) Will return a HREF String for a class and method invoked through the Authenticated Gateway.static StringbuildAuthenticatedHREF(URLFactory aFactory, String c, String m, HashMap params) Will return a HREF String for a class and method invoked through the Authenticated Gateway.static StringbuildAuthenticatedHREF(URLFactory aFactory, String c, String m, HashMap params, boolean fullyQualified) Will return a HREF String for a class and method invoked through the Authenticated Gateway.static URLbuildAuthenticatedURL(URLFactory aFactory) Will return a URL for a class and method invoked through the Authenticated Gateway.static URLbuildAuthenticatedURL(URLFactory aFactory, String aClass) Will return a URL for a class and method invoked through the Authenticated Gateway.static URLbuildAuthenticatedURL(URLFactory aFactory, String aClass, String params) Will return a URL for a class and method invoked through the Authenticated Gateway.static URLbuildAuthenticatedURL(URLFactory aFactory, String c, String m, String params) Will return a URL for a class and method invoked through the Authenticated Gateway.static URLbuildAuthenticatedURL(URLFactory aFactory, String c, String m, String f, String params) Will return a URL for a class and method invoked through the Authenticated Gateway.static URLbuildAuthenticatedURL(URLFactory aFactory, String c, String m, String f, HashMap params) Will return a URL for a class and method invoked through the Authenticated Gateway.static URLbuildAuthenticatedURL(URLFactory aFactory, String c, String m, HashMap params) Will return a URL for a class and method invoked through the Authenticated Gateway.static URLbuildAuthenticatedURL(URLFactory aFactory, String aClass, HashMap params) Will return a URL for a class and method invoked through the Authenticated Gateway.
-
Method Details
-
buildAuthenticatedHREF
Will return an HREF String to the Authenticated Gateway.
Supported API: true- Parameters:
aFactory- The current URLFactory- Returns:
- The Authenticated HREF for the gateway
- Throws:
WTException
-
buildAuthenticatedHREF
Will return an HREF String to the Authenticated Gateway.
Supported API: true- Parameters:
aFactory- The current URLFactoryaClass- The class or resource- Returns:
- The Authenticated HREF for the gateway
- Throws:
WTException
-
buildAuthenticatedHREF
public static String buildAuthenticatedHREF(URLFactory aFactory, String c, String m, String params) throws WTException Will return a HREF String for a class and method invoked through the Authenticated Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whereever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classparams- The parameter string encoded already- Throws:
WTException- If the server-codebase could not be reached.
-
buildAuthenticatedHREF
public static String buildAuthenticatedHREF(URLFactory aFactory, String c, String m, HashMap params) throws WTException Will return a HREF String for a class and method invoked through the Authenticated Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whereever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classparams- The parameter hashmap not encoded.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAuthenticatedHREF
public static String buildAuthenticatedHREF(URLFactory aFactory, String c, String m, HashMap params, boolean fullyQualified) throws WTException Will return a HREF String for a class and method invoked through the Authenticated Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whereever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classparams- The parameter hashmap not encoded.fullyQualified- Is resulting HREF fully qualified- Throws:
WTException- If the server-codebase could not be reached.
-
buildAuthenticatedHREF
public static String buildAuthenticatedHREF(URLFactory aFactory, String c, String m, String f, String params) throws WTException Will return a HREF String for a class and method invoked through the Authenticated Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whereever possble. The parameter String is pre-encoded.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classf- The filename appended to the URIparams- The parameter string is pre-encoded encoded.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAuthenticatedHREF
public static String buildAuthenticatedHREF(URLFactory aFactory, String c, String m, String f, HashMap params) throws WTException Will return a HREF String for a class and method invoked through the Authenticated Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whereever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classf- The filename appended to the URIparams- The parameter hashmap not encoded.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAnonymousHREF
Will return an HREF String to the Anonymous Gateway.
Supported API: true- Parameters:
aFactory- The current URLFactory- Returns:
- The Anonymous HREF for the gateway
- Throws:
WTException
-
buildAnonymousHREF
Will return an HREF String to the Anonymous Gateway.
Supported API: true- Parameters:
aFactory- The current URLFactoryaClass- The class or resource- Returns:
- The Anonymous HREF for the gateway
- Throws:
WTException
-
buildAnonymousHREF
public static String buildAnonymousHREF(URLFactory aFactory, String c, String m, String params) throws WTException Will return a HREF String for a class and method invoked through the Anonymous Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whereever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classparams- The parameter string pre-encoded.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAnonymousHREF
public static String buildAnonymousHREF(URLFactory aFactory, String c, String m, String f, String params) throws WTException Will return a HREF String for a class and method invoked through the Anonymous Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whereever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classf- The filename appended to the URIparams- The parameter string pre-encoded.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAnonymousHREF
public static String buildAnonymousHREF(URLFactory aFactory, String c, String m, String f, HashMap params) throws WTException Will return a HREF String for a class and method invoked through the Anonymous Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whereever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classf- The filename appended to the URIparams- The parameter HashMap encoded.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAnonymousHREF
public static String buildAnonymousHREF(URLFactory aFactory, String c, String m, HashMap params) throws WTException Will return a HREF String for a class and method invoked through the Anonymous Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whereever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classparams- The parameter hashmap not encoded.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAuthenticatedURL
Will return a URL for a class and method invoked through the Authenticated Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactory- Throws:
WTException- If the server-codebase could not be reached.
-
buildAuthenticatedURL
Will return a URL for a class and method invoked through the Authenticated Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryaClass- The class to append to the URL.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAuthenticatedURL
public static URL buildAuthenticatedURL(URLFactory aFactory, String aClass, String params) throws WTException Will return a URL for a class and method invoked through the Authenticated Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryaClass- The class to append to the URL.params- The encoded parameter string- Throws:
WTException- If the server-codebase could not be reached.
-
buildAuthenticatedURL
public static URL buildAuthenticatedURL(URLFactory aFactory, String aClass, HashMap params) throws WTException Will return a URL for a class and method invoked through the Authenticated Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryaClass- The class to append to the URL.params- The hashmap of parameters- Throws:
WTException- If the server-codebase could not be reached.
-
buildAuthenticatedURL
public static URL buildAuthenticatedURL(URLFactory aFactory, String c, String m, String params) throws WTException Will return a URL for a class and method invoked through the Authenticated Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classparams- The parameter string encoded.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAuthenticatedURL
public static URL buildAuthenticatedURL(URLFactory aFactory, String c, String m, HashMap params) throws WTException Will return a URL for a class and method invoked through the Authenticated Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classparams- The parameter hashmap not encoded.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAuthenticatedURL
public static URL buildAuthenticatedURL(URLFactory aFactory, String c, String m, String f, String params) throws WTException Will return a URL for a class and method invoked through the Authenticated Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classf- The filename to be added to the end of URIparams- The parameter string encoded.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAuthenticatedURL
public static URL buildAuthenticatedURL(URLFactory aFactory, String c, String m, String f, HashMap params) throws WTException Will return a URL for a class and method invoked through the Authenticated Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classf- The filename to be added to the end of URIparams- The parameter hashmap not encoded.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAnonymousURL
public static URL buildAnonymousURL(URLFactory aFactory, String c, String m, String params) throws WTException Will return a URL for a class and method invoked through the Anonymous Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classparams- The parameter string encoded.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAnonymousURL
public static URL buildAnonymousURL(URLFactory aFactory, String c, String m, HashMap params) throws WTException Will return a URL for a class and method invoked through the Anonymous Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classf- The filename to be added to the end of URIparams- The parameter hashmap not encoded.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAnonymousURL
public static URL buildAnonymousURL(URLFactory aFactory, String c, String m, String f, String params) throws WTException Will return a URL for a class and method invoked through the Anonymous Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classf- The filename to be added to the end of URIparams- The parameter string encoded.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAnonymousURL
public static URL buildAnonymousURL(URLFactory aFactory, String c, String m, String f, HashMap params) throws WTException Will return a URL for a class and method invoked through the Anonymous Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryc- The class to add to the hrefm- The method to be invoked by the classf- The filename to be added to the end of URIparams- The parameter hashmap not encoded.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAnonymousURL
Will return a URL for a class and method invoked through the Anonymous Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactory- Throws:
WTException- If the server-codebase could not be reached.
-
buildAnonymousURL
Will return a URL for a class and method invoked through the Anonymous Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryaClass- The class to append to the URL.- Throws:
WTException- If the server-codebase could not be reached.
-
buildAnonymousURL
public static URL buildAnonymousURL(URLFactory aFactory, String aClass, String params) throws WTException Will return a URL for a class and method invoked through the Anonymous Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryaClass- The class to append to the URL.params- The encoded parameter string- Throws:
WTException- If the server-codebase could not be reached.
-
buildAnonymousURL
public static URL buildAnonymousURL(URLFactory aFactory, String aClass, HashMap params) throws WTException Will return a URL for a class and method invoked through the Anonymous Gateway. If URLFactory is null, a new URLFactory will be instantiated to handle the request, however an instance should be passed in whenever possble.
Supported API: true- Parameters:
aFactory- The current URLFactoryaClass- The class to append to the URL.params- The hashmap of parameters- Throws:
WTException- If the server-codebase could not be reached.
-