See: Description
Interface | Description |
---|---|
IHierarchicalUri |
A RFC2396 URI interface.
|
IRidIterator |
This interface defines an iterator for a
IRidList
Copyright (c) SAP AG 2001-2002 |
IRidList |
This interface defines a list of
RID instances. |
IRidSet |
This interface defines a set of
RID instances. |
IUri |
A RFC2396 URI interface.
|
IUriIterator | Deprecated
As of EP5 SP6, replaced by
java.util.List . |
IUriList | Deprecated
As of EP5 SP6, replaced by
java.util.List . |
IUriReference |
A RFC2396 URI reference
interface.
|
Class | Description |
---|---|
DataUri |
A RFC2397 IUri
implementation.
|
GenericUri |
A RFC2396 IUri
implementation.
|
HttpUrl |
An
IHierarchicalUri implementation for HTTP/HTTPS URLs. |
OpaqueLockTokenUri |
A
RFC2518 IUri implementation.
|
ReadonlyRidList |
A read-only RID list implementation.
|
ResourceUrl |
An
IHierarchicalUri implementation for Resource (Repository Framework
internal) URLs. |
RID |
A RID is an identifier for a CM resource.
|
RidIterator |
An RID iterator implementation.
|
RidList |
An RID list implementation.
|
RidReference | |
RidSet |
A set of RID instances.
|
URI | Deprecated
as of EP 5.0 SP3, replaced by
RID |
URICodec |
Utility class for decoding/encoding URIs in HTTP requests.
|
UriFactory |
A factory producing
IUri s from various inputs. |
UriIterator | Deprecated
As of EP5 SP6, replaced by
java.util.Iterator . |
UriList | Deprecated
As of EP5 SP6, replaced by
java.util.List . |
UriQuery |
Manages query parameters for RFC 2396 URIs.
|
UriQuery.Parameter |
Keeps one query parameter.
|
UriReference |
A RFC2396 reference
implementation.
|
URL |
DO NOT USE this class except to create instances of URL objects to be used
for link creation.
|
UserRidCodec |
Utility class for decoding/encoding item names to fit for the cm store.
|
Some words on encoded chars in URIs: the historical understanding was that the character encoding to use is ISO-8859-1. So a German umlaut '�' would be encoded as '%c4'. But this is not enough to put the Euro sign '�' or chinese character sets into URIs. The general consensus nowadays to use UTF-8 character encoding, which means that '�' is encoded as '%c3%84'. The URICodec in this package is prepared to handle UTF-8 encoding and fallback to ISO-8859-1 when the octets are no valid UTF-8.
URI
for details.
HttpUrl m_servletUrl = new HttpUrl( m_request.getScheme(), m_request.getServerName(), m_request.getServerPort(), m_request.getContextPath() + m_request.getServletPath(), null); IUriReference ref = new UriReference(m_request.getRequestURI(), m_request.getQueryString(), null); URI uri = m_servletUrl.mapToWcmPath(ref); if (uri == null { // request uri outside servlet uri? Should not happen }First, the http url of the servlet itself is determined. Note that your servlet can be accessible unter many different host names and ports, with or without https. So it is wise to calculate the servlet url on every request. Next the request uri and possible query string are placed in a IUriReference object. As the last step, the uri reference is resolved, using the servlet's uri as base, to the WCM URI (resource id).
The reverse mapping would also use the servlet url. Given a WCM URI, the servlet would either generate a http url or a absolute uri reference to hand out to the client (for example as href in a HTML document):
URI wcmpath = resource.getURI(); IUri url = m_servletUrl.mapToAbsoluteUri(wcmpath); // or IUriReference ref = m_servletUrl.toAbsolutePath(wcmpath);This code would convert the resource id '/info/index.html', given the servlet url 'http://sapportals.com/apps/service' to:
See IHierarchicalUri
for further information.
Copyright 2018 SAP AG Complete Copyright Notice