public class ResourceUri
extends java.lang.Object
/faces, RSS requests
 are made on /rss and REST requests are made on
 /rest URLs.  If the context roots are non-standard,
 for example if RSS is using https on a different
 port to Faces requests, a section needs to be added to the adf-config.xml
 file. wlst commands exist to set these values in adf-config.xml and these
 should be used when making changes to deployed applications.  Otherwise,
 adf-config.xml may be edited from within JDeveloper and the <resource-uri
 element added within the adf-service-config element between the data-source
 and resource-handler elements (if any).
 
 <adf-service-config xmlns="http://xmlns.oracle.com/webcenter/framework/service">
         <data-source jndi-name="jdbc/WebCenterDS" />
  <resource-uri
    rss-mount="/rss"
    faces-mount="/faces"
    wc-ctxroot="/webcenter"
    rest-ctxroot="/rest"
    faces-host="http://a.different.host.com:5678/mywebcenterapp/jsf" />
  <resource-handler class= ...
 
 where rss-mount is the context root of the RSS Servlet for RSS
 requests (starting with a slash). This
 defaults to /rss/rssservlet and does not normally need to be set.
 faces-mount is the mount point of the Faces requests, and this
 defaults to /faces
 wc-ctxroot is the context root for the webcenter faces servlet. This defaults
 to /webcenter
 rest-ctxroot is the context root for the REST servlet. This defaults to
 /rest
 faces-mount overrides the existing context and configuration settings
 by specifying the entire absolute URL to the Faces servlet. This is used to
 build up URLs to the Faces servlet from outside of the FacesContext (for
 example, from the REST or RSS servlet). In most cases this should be null
 null indicates that the current context is used to build up the url.
 This implementation works both inside and outside of a Faces context, but
 it is designed to be used outside of the Faces Context (inside of a Faces
 request, the resourceHandler tag should be used)
 The webcenter faces context root to use for RAH requests can also be set in
 the web.xml of the faces application by adding a context parameter:
 
   <context-param>
     <param-name>oracle.webcenter.framework.resource.external</param-name>
     <param-value>true</param-value>
  </context-param>
 
 a Servlet Start up listener will then obtain the context root for this
 web application as the application starts up and RAH will then use this as
 the context root for all calls to get the faces context root. This is preferred
 to adding a fixed value into adf-config.xml using the wc-ctxroot.| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
CONTEXT_PARAM_MAIN_FACES_APP_MARKER
The Context Parameter to be used in the web.xml of the Faces servlet that
 should be used to service RAH urls. 
 | 
static java.lang.String | 
OWRESOURCE_JSPX
The URL path used invoke the Resource Action Handler via the Resource
 External Phase Listener (since 11.1.1.4.0) when the user is only required
 to log in if the resource is not accessible to unauthenticated users. 
 | 
static java.lang.String | 
RESOURCE_EXTERNAL_JSPX
The Faces page used to invoke the Resource Action Handler when the
 user must be logged on before accessing the page (even for resources
 accessible to unauthenticated users). 
 | 
static java.lang.String | 
RESOURCE_EXTERNAL_REFERER
The resource referer attribute value used by the Resource Action Handler
 when it is invoked by owResource.jspx so that View Handlers can handle
 incoming requests to the application differently to those which 
 navigate within the application. 
 | 
static java.lang.String | 
URL_PARAM_RESOURCEID
URL parameter used to identify the service specific resource. 
 | 
static java.lang.String | 
URL_PARAM_SCOPE
URL parameter used to identify the scope of the resource. 
 | 
static java.lang.String | 
URL_PARAM_SERVICEID
URL parameter used to identify the service where the resource view is
 located (as defined in service-definition.xml). 
 | 
static java.lang.String | 
URL_PARAM_TITLE
URL parameter used to specify the title to use for displaying the resource. 
 | 
static java.lang.String | 
URL_PARAM_TYPE
URL parameter used to identify the type of resource being displayed. 
 | 
static java.lang.String | 
URL_PARAM_Z
The URL parameter used by  
/owResource.jspx to identify the
 resource to display comprising of the service, resource id and scope. | 
| Constructor and Description | 
|---|
ResourceUri()  | 
| Modifier and Type | Method and Description | 
|---|---|
static java.lang.String | 
defaultGetURI(java.lang.String resourceId,
             java.lang.String serviceId,
             java.lang.String scope,
             java.lang.String title,
             java.lang.String resourceType,
             boolean forceLogin,
             java.util.Map<java.lang.String,java.lang.String> params,
             java.lang.String absoluteWCContextRoot)
Returns an absolute URL to the given resource identified by its service specific
 resource id and service identifier, using the given title, scope, resourceType,
 action and a Map of the name-value parameters to add to the URL. 
 | 
static java.lang.String | 
getAbsoluteContextRoot()
Returns the absolute URL up to and including the current servlet
 context root (even if the FacesContext is not available). 
 | 
static java.lang.String | 
getAbsoluteWCContextRoot()
Returns the absolute URL up to and including the servlet
 context root (even if the FacesContext is not available) 
 of the WebCenter servlet. 
 | 
static java.lang.StringBuilder | 
getBaseUri(java.lang.String page)
Returns the absolute URL to the specified containing page (even if
 the FacesContext is not available). 
 | 
static java.lang.StringBuilder | 
getRssBaseUri(java.lang.String path)
Returns the absolute URL to the specified RSS path (even if not
 executed from within the RSS servlet). 
 | 
static java.lang.String | 
getURI(java.lang.String resourceId,
      java.lang.String serviceId,
      java.lang.String title)
Returns an absolute URL to the given resource identified by its service specific
 resource id and service identifier, using the given title. 
 | 
static java.lang.String | 
getURI(java.lang.String resourceId,
      java.lang.String serviceId,
      java.lang.String title,
      java.lang.String scope)
Returns an absolute URL to the given resource identified by its service specific
 resource id and service identifier, using the given title and scope. 
 | 
static java.lang.String | 
getURI(java.lang.String resourceId,
      java.lang.String serviceId,
      java.lang.String title,
      java.lang.String scope,
      boolean forceLogin)
Returns an absolute URL to the given resource identified by its service specific
 resource id and service identifier, using the given title and scope. 
 | 
static java.lang.String | 
getURI(java.lang.String resourceId,
      java.lang.String serviceId,
      java.lang.String scope,
      java.lang.String title,
      java.lang.String resourceType,
      boolean forceLogin,
      java.util.Map<java.lang.String,java.lang.String> params)
Returns an absolute URL to the given resource identified by its service specific
 resource id and service identifier, using the given title, scope, resourceType,
 action and a Map of the name-value parameters to add to the URL. 
 | 
static java.lang.String | 
getURI(java.lang.String resourceId,
      java.lang.String serviceId,
      java.lang.String scope,
      java.lang.String title,
      java.lang.String resourceType,
      boolean forceLogin,
      java.util.Map<java.lang.String,java.lang.String> params,
      java.lang.String absoluteWCContextRoot)
This is the basically the same as defaultGetURI() except it allows
 calling of the same getURI() method of any registered custom ResourceURI. 
 | 
static java.lang.String | 
getURI(java.lang.String resourceId,
      java.lang.String serviceId,
      java.lang.String scope,
      java.lang.String title,
      java.lang.String resourceType,
      java.util.Map<java.lang.String,java.lang.String> params)
Returns an absolute URL to the given resource identified by its service specific
 resource id and service identifier, using the given title, scope, resourceType,
 action and a Map of the name-value parameters to add to the URL. 
 | 
public static final java.lang.String URL_PARAM_RESOURCEID
public static final java.lang.String URL_PARAM_SERVICEID
public static final java.lang.String URL_PARAM_TYPE
public static final java.lang.String URL_PARAM_SCOPE
public static final java.lang.String URL_PARAM_TITLE
public static final java.lang.String URL_PARAM_Z
/owResource.jspx to identify the
 resource to display comprising of the service, resource id and scope.public static final java.lang.String RESOURCE_EXTERNAL_JSPX
public static final java.lang.String OWRESOURCE_JSPX
public static final java.lang.String RESOURCE_EXTERNAL_REFERER
public static final java.lang.String CONTEXT_PARAM_MAIN_FACES_APP_MARKER
public static java.lang.StringBuilder getRssBaseUri(java.lang.String path)
path - an RSS URL path accessible from a browser (may be null)public static java.lang.String getAbsoluteContextRoot()
public static java.lang.String getAbsoluteWCContextRoot()
public static java.lang.StringBuilder getBaseUri(java.lang.String page)
page - a jspx page accessible from a browserpublic static java.lang.String getURI(java.lang.String resourceId,
                                      java.lang.String serviceId,
                                      java.lang.String title)
a href target.  The
 URL will point to the specified resource through its service's resource view
 surrounded by any application-specific container page.resourceId - service-specific resource identifierserviceId - the service identifiertitle - title string used for viewing the resource, for example
             the title used on a new tab. This may be nullpublic static java.lang.String getURI(java.lang.String resourceId,
                                      java.lang.String serviceId,
                                      java.lang.String title,
                                      java.lang.String scope)
resourceId - service-specific resource identifierserviceId - the service identifiertitle - title string used for viewing the resource, for example
             the title used on a new tab. This may be nullscope - the scope GUID used for the resourcepublic static java.lang.String getURI(java.lang.String resourceId,
                                      java.lang.String serviceId,
                                      java.lang.String title,
                                      java.lang.String scope,
                                      boolean forceLogin)
resourceId - service-specific resource identifierserviceId - the service identifiertitle - title string used for viewing the resource, for example
             the title used on a new tab. This may be nullforceLogin - true to force users to login when accessing this url,
                       false to allow public accessscope - the scope GUID used for the resourcepublic static java.lang.String getURI(java.lang.String resourceId,
                                      java.lang.String serviceId,
                                      java.lang.String scope,
                                      java.lang.String title,
                                      java.lang.String resourceType,
                                      java.util.Map<java.lang.String,java.lang.String> params)
resourceId - service-specific resource identifierserviceId - the service identifiertitle - title string used for viewing the resource, for example
             the title used on a new tab. This may be nullresourceType - the type of the resource. This may be nullscope - the scope GUID used for the resourceparams - a Map of the name-value pairs, for example to set
               wc.chromelevel=nochromepublic static java.lang.String getURI(java.lang.String resourceId,
                                      java.lang.String serviceId,
                                      java.lang.String scope,
                                      java.lang.String title,
                                      java.lang.String resourceType,
                                      boolean forceLogin,
                                      java.util.Map<java.lang.String,java.lang.String> params)
resourceId - service-specific resource identifierserviceId - the service identifiertitle - title string used for viewing the resource, for example
             the title used on a new tab. This may be nullresourceType - the type of the resource. This may be nullscope - the scope GUID used for the resourceforceLogin - true to force users to login when accessing this url,
                       false to allow public accessparams - a Map of the name-value pairs, for example to set
               wc.chromelevel=nochromepublic static java.lang.String getURI(java.lang.String resourceId,
                                      java.lang.String serviceId,
                                      java.lang.String scope,
                                      java.lang.String title,
                                      java.lang.String resourceType,
                                      boolean forceLogin,
                                      java.util.Map<java.lang.String,java.lang.String> params,
                                      java.lang.String absoluteWCContextRoot)
public static java.lang.String defaultGetURI(java.lang.String resourceId,
                                             java.lang.String serviceId,
                                             java.lang.String scope,
                                             java.lang.String title,
                                             java.lang.String resourceType,
                                             boolean forceLogin,
                                             java.util.Map<java.lang.String,java.lang.String> params,
                                             java.lang.String absoluteWCContextRoot)
resourceId - service-specific resource identifierserviceId - the service identifiertitle - title string used for viewing the resource, for example
             the title used on a new tab. This may be nullscope - the scope GUID used for the resourceresourceType - the type of the resource. This may be nullforceLogin - true to force users to login when accessing this url,
                       false to allow public accessparams - a Map of the name-value pairs, for example to set 
               wc.chromelevel=nochromeabsoluteWCContextRoot - The absolute url upto and including the 
               webcenter context root, to use when building up the url to
               the requested resource rather than the current context.
               This can be used when calling this API in a non-request
               thread or outside of a faces thread to override the current
               context with a previously determined base url. In the
               original request thread ResourceUri.getAbsoleteWCContextRoot
               can be used to obtain this value