|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.httpgw.GatewayURL
A URL factory for resources accessed via Windchill gateway URLs.
Instances of GatewayURL
correspond to a specific gateway base URL
and are used to efficiently build URLs for resources accessed through that gateway.
There are three base gateway URLs which may be subject to different access restrictions by the web server: anonymous, authenticated, and administrator.
Instances are obtained using static factory methods by specifying the codebase URL
of the Windchill system to be accessed. A null codebase causes the default server
of the current WTContext
to be accessed. The wt.properties
file
from the server codebase contains properties defining the base gateway URLs:
wt.httpgw.url.anonymous
, wt.httpgw.url.authenticated
,
and wt.sysadm.url
. Instances may be cached for efficient reuse, but
a reload of the base URLs can be forced by calling WTProperties.reset
.
URLs are constructed by calling one of the getURL
methods. Multiple
getURL
methods exist as helpers to construct gateway URLs with path info
(additional path elements and optional query string) that will invoke specified
processing targets (E.g. class, method, and parameters).
Implementation: As of Windchill R6.0 the GatewayURL class has
been deprecated. All URLs and HREFs should be created using the URLFactory
and it's associated helpers (GatewayServletHelper, SysAdmServletHelper
etc.). The correct procedure would be to instantiate an appropriate
URLFactory object and then call the builder methods located in the Servlet
Helpers with the appropriate method signature. Please see the javadoc for
the ServletHelpers and URLFactory for details and supported API
Deprecated
Supported API:false
Extendable: false
file
,
URLFactory
,
GatewayServletHelper
,
SysAdmServletHelper
Nested Class Summary | |
(package private) static class |
GatewayURL.FactoryManager
Deprecated. This inner class is responsible for the determination or creation of an URLFactory instance within the current MethodContext and caching that instance in the MethodContext for further use. |
Field Summary | |
private static GatewayURL |
adminGateway
Deprecated. |
static int |
ADMINISTRATOR
Deprecated. |
private static GatewayURL |
anonGateway
Deprecated. |
static int |
ANONYMOUS
Deprecated. |
static int |
AUTHENTICATED
Deprecated. |
private static GatewayURL |
authGateway
Deprecated. |
private URL |
codebase
Deprecated. |
private static GatewayURL |
IntralinkGW
Deprecated. |
private static GatewayURL |
PDMGW
Deprecated. |
private String |
property
Deprecated. |
private static boolean |
SERVER
Deprecated. |
Constructor Summary | |
protected |
GatewayURL(String property,
URL codebase)
Deprecated. Constructor for use in subclasses. |
Method Summary | |
static void |
appendQueryString(StringBuffer buf,
Properties params)
Deprecated. |
static URL |
buildAdminURL(String c,
String method,
Properties params)
Deprecated. see getAdminGateway, getURL |
static URL |
buildAdminURL(String c,
String method,
String params)
Deprecated. see getAdminGateway, getURL |
static URL |
buildAdminURL(String c,
String method,
String file_name,
Properties params)
Deprecated. see getAdminGateway, getURL |
static URL |
buildAdminURL(String c,
String method,
String file_name,
String params)
Deprecated. see getAdminGateway, getURL |
static URL |
buildAnonymousURL(String c,
String method,
Properties params)
Deprecated. see getAnonymousGateway, getURL |
static URL |
buildAnonymousURL(String c,
String method,
String params)
Deprecated. see getAnonymousGateway, getURL |
static URL |
buildAnonymousURL(String c,
String method,
String file_name,
Properties params)
Deprecated. see getAnonymousGateway, getURL |
static URL |
buildAnonymousURL(String c,
String method,
String file_name,
String params)
Deprecated. see getAnonymousGateway, getURL |
static URL |
buildAuthenticatedURL(String c,
String method,
Properties params)
Deprecated. see getAuthenticatedGateway, getURL |
static URL |
buildAuthenticatedURL(String c,
String method,
String params)
Deprecated. see getAuthenticatedGateway, getURL |
static URL |
buildAuthenticatedURL(String c,
String method,
String file_name,
Properties params)
Deprecated. see getAuthenticatedGateway, getURL |
static URL |
buildAuthenticatedURL(String c,
String method,
String file_name,
String params)
Deprecated. see getAuthenticatedGateway, getURL |
static String |
buildPathInfo(String c,
String method,
String tail,
Properties params)
Deprecated. Builds the PATH_INFO portion of a gateway URL from the given information. |
static String |
buildPathInfo(String c,
String method,
String tail,
String params)
Deprecated. Builds the PATH_INFO portion of a gateway URL from the given information. |
static String |
buildQueryString(Properties params)
Deprecated. Builds a URL encoded query string of the values in a Properties object. |
static URL |
buildURL(int type,
String c,
String method,
Properties params)
Deprecated. |
static URL |
buildURL(int type,
String c,
String method,
String params)
Deprecated. |
static String |
escape(String str)
Deprecated. Escape special characters in accordance with URL path segment encoding requirements. |
static GatewayURL |
getAdminGateway(URL codebase)
Deprecated. Get the system administration gateway for a system. |
static GatewayURL |
getAnonymousGateway(URL codebase)
Deprecated. |
static GatewayURL |
getAuthenticatedGateway(URL codebase)
Deprecated. |
private URLFactory |
getFactory(URL aCodebase)
Deprecated. Method for re-direction to Server-Only inner class FactorManager. |
static GatewayURL |
getIntralinkGWURL(URL codebase)
Deprecated. Get the Intralink Gateway for a system. |
static GatewayURL |
getPDMGWURL(URL codebase)
Deprecated. Get the PDM Gateway for a system. |
URL |
getURL(String path_info)
Deprecated. |
URL |
getURL(String c,
String method,
String tail,
Properties params)
Deprecated. Build a URL relative to this gateway using the given information. |
URL |
getURL(String c,
String method,
String tail,
String params)
Deprecated. Build a URL relative to this gateway using the given information. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int AUTHENTICATED
public static final int ANONYMOUS
public static final int ADMINISTRATOR
private static final boolean SERVER
private static GatewayURL anonGateway
private static GatewayURL authGateway
private static GatewayURL adminGateway
private static GatewayURL IntralinkGW
private static GatewayURL PDMGW
private String property
private URL codebase
Constructor Detail |
protected GatewayURL(String property, URL codebase)
property
- name of property defining URL value in server's wt.properties file.codebase
- the gateway system's codebase URL (null = local system)Method Detail |
public static GatewayURL getAdminGateway(URL codebase)
codebase
- the gateway system's codebase URL (null = local system)
public static GatewayURL getIntralinkGWURL(URL codebase)
codebase
- the gateway system's codebase URL (null = local system)
public static GatewayURL getPDMGWURL(URL codebase)
codebase
- the gateway system's codebase URL (null = local system)
public static GatewayURL getAnonymousGateway(URL codebase)
codebase
- the gateway system's codebase URL (null = local system)
public static GatewayURL getAuthenticatedGateway(URL codebase)
codebase
- the gateway system's codebase URL (null = local system)
public URL getURL(String path_info) throws WTException
path_info
- String containing the class name.
WTException
public URL getURL(String c, String method, String tail, String params) throws WTException
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.tail
- Additional URI tail.params
- String containing the parameters for the method.
WTException
public URL getURL(String c, String method, String tail, Properties params) throws WTException
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.tail
- Additional URI tail.params
- Properties object containing the parameters for the method.
A query string will be built from the properties taking the
form: key=value<&><key=value>...
WTException
public static String buildPathInfo(String c, String method, String tail, String params)
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.tail
- Additional URI tail.params
- String containing the parameters for the method. The string
will be encoded using x-www-form-urlencoded MIME format.
public static String buildPathInfo(String c, String method, String tail, Properties params)
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.tail
- Additional URI tail.params
- Properties object containing the parameters for the method.
A query string will be built from the properties taking the
form: key=value<&><key=value>...
public static String escape(String str)
str
- String
to escape.
public static String buildQueryString(Properties params)
Properties
object.
params
- Properties
object.
public static void appendQueryString(StringBuffer buf, Properties params)
Properties
object
to a StringBuffer
. This does not include a leading "?" character.
params
- StringBuffer
object.public static URL buildAdminURL(String c, String method, String params) throws WTException
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.params
- String containing the parameters for the method.
WTException
- Thrown if the URL cannot be built.getAdminGateway, getURL
public static URL buildAdminURL(String c, String method, Properties params) throws WTException
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.params
- Properties object containing the parameters for the method.
A query string will be built from the properties taking the
form: key=value<&><key=value>...
WTException
- Thrown if the URL cannot be built.getAdminGateway, getURL
public static URL buildAdminURL(String c, String method, String file_name, String params) throws WTException
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.file_name
- File name to appear as tail of URI.params
- String containing the parameters for the method.
WTException
- Thrown if the URL cannot be built.getAdminGateway, getURL
public static URL buildAdminURL(String c, String method, String file_name, Properties params) throws WTException
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.file_name
- File name to appear as tail of URI.params
- Properties object containing the parameters for the method.
A query string will be built from the properties taking the
form: key=value<&><key=value>...
WTException
- Thrown if the URL cannot be built.getAdminGateway, getURL
public static URL buildAnonymousURL(String c, String method, String params) throws WTException
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.params
- String containing the parameters for the method.
WTException
- Thrown if the URL cannot be built.getAnonymousGateway, getURL
public static URL buildAnonymousURL(String c, String method, Properties params) throws WTException
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.params
- Properties object containing the parameters for the method.
A query string will be built from the properties taking the
form: key=value<&><key=value>...
WTException
- Thrown if the URL cannot be built.getAnonymousGateway, getURL
public static URL buildAnonymousURL(String c, String method, String file_name, String params) throws WTException
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.file_name
- File name to appear as tail of URI.params
- String containing the parameters for the method.
WTException
- Thrown if the URL cannot be built.getAnonymousGateway, getURL
public static URL buildAnonymousURL(String c, String method, String file_name, Properties params) throws WTException
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.file_name
- File name to appear as tail of URI.params
- Properties object containing the parameters for the method.
A query string will be built from the properties taking the
form: key=value<&><key=value>...
WTException
- Thrown if the URL cannot be built.getAnonymousGateway, getURL
public static URL buildAuthenticatedURL(String c, String method, String params) throws WTException
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.params
- String containing the parameters for the method.
WTException
- Thrown if the URL cannot be built.getAuthenticatedGateway, getURL
public static URL buildAuthenticatedURL(String c, String method, Properties params) throws WTException
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.params
- Properties object containing the parameters for the method.
A query string will be built from the properties taking the
form: key=value<&><key=value>...
WTException
- Thrown if the URL cannot be built.getAuthenticatedGateway, getURL
public static URL buildAuthenticatedURL(String c, String method, String file_name, String params) throws WTException
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.file_name
- File name to appear as tail of URI.params
- String containing the parameters for the method.
WTException
- Thrown if the URL cannot be built.getAuthenticatedGateway, getURL
public static URL buildAuthenticatedURL(String c, String method, String file_name, Properties params) throws WTException
c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.file_name
- File name to appear as tail of URI.params
- Properties object containing the parameters for the method.
A query string will be built from the properties taking the
form: key=value<&><key=value>...
WTException
- Thrown if the URL cannot be built.getAuthenticatedGateway, getURL
public static URL buildURL(int type, String c, String method, String params) throws WTException
type
- The type of URL to build. Possible values are:
AUTHENTICATED, ANONYMOUS, and ADMINISTRATOR. If
AUTHENTICATED is chosen, the URL will be built using the value of the
wt.httpgw.url.authenticated property. If ANONYMOUS is
chosen, the URL will be build with the value of the
wt.httpgw.url.anonymous property. Finally, if
ADMINISTATOR is chosen, the URL is built using the value of
the wt.sysadm.url property.c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.params
- String containing the parameters for the method.
WTException
- Thrown if the URL cannot be built.getURL
public static URL buildURL(int type, String c, String method, Properties params) throws WTException
type
- The type of URL to build. Possible values are:
AUTHENTICATED, ANONYMOUS, and ADMINISTRATOR. If
AUTHENTICATED is chosen, the URL will be built using the value of the
wt.httpgw.url.authenticated property. If ANONYMOUS is
chosen, the URL will be build with the value of the
wt.httpgw.url.anonymous property. Finally, if
ADMINISTATOR is chosen, the URL is built using the value of
the wt.sysadm.url property.c
- String containing the class name.method
- String containing the method of the supplied class that
will be invoked when the URL is loaded.params
- Properties object containing the parameters for the method.
A query string will be build from the properties taking the
form: key=value<&><key=value>...
WTException
- Thrown if the URL cannot be built.getURL
private URLFactory getFactory(URL aCodebase)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |