|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter 11g Release 1 (11.1.1.4.0) E15995-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.webcenter.framework.resource.external.ResourceUri
public class ResourceUri
Provides a static API to get absolute URLs to resources within WebCenter applications (Spaces and Portal applications). This class by default produces absolute urls where the scheme (protocol), host and port are the same for both Faces and non-Faces requests and that the webcenter Faces requests are made on /faces
, RSS requests are made on /rss
and REST requests are made on /rest
URLs. If the host and port are not the same, or if the mount points of Faces, RSS or REST are not /faces, /rss
and /rest
, 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 as follows:
<resource-uri rss-mount="/rss" faces-mount="/faces" wc-ctxroot="/webcenter" rest-ctxroot="/rest" rss-host="https://my.host.com:1234/myapp/my-rss-context-root" faces-host="http://a.different.host.com:5678/mywebcenterapp/jsf" />
where rss-mount is the mount point of the RSS Servlet for RSS requests (starting with a slash and not including the context root). This defaults to /rss 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
rss-host overrides the existing context and configuration settings by specifying the entire absolute URL to the RSS servlet. This is used to build up URLs to the RSS servlet from within the Faces servlet. In most cases rss-host should be null (see bug 6176139) which means that the current context is used to build up the URL. 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 RSS servlet). In most cases this should be null (see bug 6176139) which means 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)
Field Summary | |
---|---|
static java.lang.String |
DISABLE_INTERCEPT Java boolean property used to disable the phase listener which intercepts requests to resourceExternal.jspx and owResource.jspx in order to invoke the Resource Action Handler. |
static java.lang.String |
FACES_HOST_OVERRIDE Key in the adf-config configuration map to store the Faces scheme, hostname port number, context root and faces servlet mount point. |
static java.lang.String |
FACES_MOUNT_POINT Key in the adf-config configuration map to store the Faces mount point. |
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). |
static java.lang.String |
RESOURCE_EXTERNAL_JSPX The Faces page used to invoke the Resource Action Handler when the Resource External Phase Listener is disabled. |
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 |
REST_CTX_ROOT Key in the adf-config configuration map to store the REST Servlet context root. |
static java.lang.String |
RSS_HOST_OVERRIDE Key in the adf-config configuration map to store the RSS scheme, hostname port, context root and rss servlet mount point. |
static java.lang.String |
RSS_MOUNT_POINT Key in the adf-config configuration map to store the RSS mount point. |
static java.lang.String |
URL_PARAM_RESOURCEID |
static java.lang.String |
URL_PARAM_SCOPE |
static java.lang.String |
URL_PARAM_SERVICEID |
static java.lang.String |
URL_PARAM_TITLE |
static java.lang.String |
URL_PARAM_TYPE |
static java.lang.String |
URL_PARAM_Z The URL parameter used by /owResource.jspx to identify the resource to display. |
static java.lang.String |
WC_CTX_ROOT Key in the adf-config configuration map to store the WebCenter context root. |
Constructor Summary | |
---|---|
ResourceUri() |
Method Summary | |
---|---|
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, 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RSS_MOUNT_POINT
/rss
. The default is /rss
public static final java.lang.String FACES_MOUNT_POINT
/faces
. The default is /faces
public static final java.lang.String RSS_HOST_OVERRIDE
public static final java.lang.String FACES_HOST_OVERRIDE
public static final java.lang.String WC_CTX_ROOT
/webcenter
. The default is /webcenter
public static final java.lang.String REST_CTX_ROOT
/rest
. The default is /rest
public static final java.lang.String DISABLE_INTERCEPT
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.
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
Constructor Detail |
---|
public ResourceUri()
Method Detail |
---|
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 nullscope
- the scope GUID used for the resourceparams
- a Map of the name-value pairs, for example to set wc.chromelevel=nochrome
public 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 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=nochrome
|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter 11g Release 1 (11.1.1.4.0) E15995-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |