The UriRewriterFactory
can be used to select the proper UriRewriter
for
transparently rewriting a target URI. Assuming the URI of interest is recognized by a UriRewriter
implementation, then the user needs no foreknowledge of whether or not the URI has been rewritten on the
server side to proxy to a producer and they can manipulate the target URI with the same methods whether or not
the URI is a proxy URI. "Recognition" of a URI is based on the result of calling a
UriRewriter
's static groksUri()
method.
Field Summary | |
public static object
|
REWRITERS
An array containing the list of UriRewriter implementations that are
recognized by this factory.
|
Method Summary | ||
public static bea.wlp.disc.uri.UriRewriter
|
getUriRewriter(uriStr, [tmpltMap])
Gets a UriRewriter implementation that understands how to work with the given URI
string, based on the result of calling a UriRewriter 's static groksUri()
method.
|
Field Detail |
public static object REWRITERS
UriRewriter
implementations that are
recognized by this factory. The order of this array is important. It determines the search order for
a compatible URI rewriter. The GenericUriRewriter
is normally last because it is a default rewriter
that always has groksUri() == true
.Method Detail |
public static bea.wlp.disc.uri.UriRewriter getUriRewriter(uriStr, [tmpltMap]) throws Error
UriRewriter
implementation that understands how to work with the given URI
string, based on the result of calling a UriRewriter
's static groksUri()
method. The default is the GenericUriRewriter
if no match is found.string uriStr
- The string form of a URIobject [tmpltMap]
- An optional map of key:value pairs for template replacement. For example,
for the uriStr
{protocol}://www.oracle.com/products?id={productId}could have its template keys replaced by using a
tmpltMap
argument such as
{protocol:'http', productId:'1001'}This would result in
http://www.oracle.com/products?id=1001
bea.wlp.disc.uri.UriRewriter
-
A UriRewriter
instance that understands how to work with the given URI stringError
-
Thrown when the uriStr is a javascript pseudo-protocol link (a link beginning with 'javascript:')
that is not recognized. In this case, the URI cannot be parsed from the given string and the user
should parse the URI out of the javascript before passing the uriStr to this constructor.
Oracle Fusion Middleware Disc API Reference for Oracle WebLogic Portal
10g Release 3 (10.3.4)
E14257-04
Copyright © 2011, Oracle. All rights reserved.