public class HttpUrl extends Object implements IHierarchicalUri
IHierarchicalUri implementation for HTTP/HTTPS URLs. Copyright (c) SAP AG 2001-2003
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT |
| Constructor and Description |
|---|
HttpUrl(String scheme,
String host,
int port,
String path,
String query) |
HttpUrl(String scheme,
String authority,
String path,
String query) |
| Modifier and Type | Method and Description |
|---|---|
IHierarchicalUri |
appendPath(String path)
Append the given path segment to the current path of this uri.
|
boolean |
equals(HttpUrl other) |
boolean |
equals(IHierarchicalUri other) |
boolean |
equals(IUri other) |
boolean |
equals(Object other) |
String |
getAuthority()
Return authority part of this hierarchical Uri.
|
String |
getHost()
Return the host name of this uri
|
String |
getPath()
Return path of this Uri or, if not there, the emtpy string
|
String[] |
getPathSegments()
Return the segments of the uri path
|
int |
getPort()
Return the port number of this uri
|
String |
getQuery()
Return query of this Uri or, if not there, null
|
String |
getRemainder()
Get the remainder of this Uri (part after scheme without ':').
|
IHierarchicalUri |
getRoot()
Returns the uri of the root collection (path = "/").
|
String |
getScheme()
Get the scheme of this Uri (without ':').
|
int |
hashCode() |
boolean |
isAncestorOf(IHierarchicalUri other)
Determine if this Uri is ancestor of other uri
|
IUriReference |
mapToAbsolutePath(IUriReference ref)
Given this Uri as the base, map the uri reference to a uri reference with
absolute path component.
|
IUriReference |
mapToAbsolutePath(RID wcmPath) |
IUriReference |
mapToAbsolutePath(RID wcmPath,
URICodec codec) |
IUriReference |
mapToAbsolutePath(URI wcmPath)
Deprecated.
As of EP5 SP6, replaced by
mapToAbsolutePath(RID) |
IUriReference |
mapToAbsolutePath(URI wcmPath,
URICodec codec)
Deprecated.
As of EP5 SP6, replaced by
mapToAbsolutePath(RID, URICodec) |
IHierarchicalUri |
mapToAbsoluteUri(RID wcmPath)
Given this RID as the base of the WCM repository, map the WCM Path to a
absolute RID.
|
IHierarchicalUri |
mapToAbsoluteUri(RID wcmPath,
URICodec codec)
Given this RID as the base of the WCM repository, map the WCM Path to a
absolute uri
|
IHierarchicalUri |
mapToAbsoluteUri(URI wcmPath)
Deprecated.
As of EP5 SP6, replaced by
mapToAbsoluteUri(RID)
Given this RID as the base of the WCM repository, map the WCM Path to a absolute RID. |
IHierarchicalUri |
mapToAbsoluteUri(URI wcmPath,
URICodec codec)
Deprecated.
As of EP5 SP6, replaced by
mapToAbsoluteUri(RID, URICodec)
Given this RID as the base of the WCM repository, map the WCM Path to a absolute uri |
RID |
mapToResourceID(IUriReference ref)
Given this Uri as the base of the WCM repository, map the Uri Reference to
the corresponding RID in the framework.
|
RID |
mapToResourceID(IUriReference ref,
URICodec codec)
Given this Uri as the base of the WCM repository, map the Uri Reference to
the corresponding RID in the framework.
|
URI |
mapToWcmPath(IUriReference ref)
Deprecated.
As of EP5 SP6, replaced by
mapToResourceID(IUriReference) |
URI |
mapToWcmPath(IUriReference ref,
URICodec codec)
Deprecated.
As of EP5 SP6, replaced by
mapToResourceID(IUriReference, URICodec) |
protected static StringBuffer |
normalizePath(StringBuffer sb) |
IUri |
resolve(IUriReference reference)
Resolve the uri reference in the context of this Uri.
|
IHierarchicalUri |
setPath(String path)
Construct a new object of same type with the given path.
|
IHierarchicalUri |
setQuery(String query)
Construct a new object of same type with the given query.
|
String |
toExternalForm()
Returns a string representation according to RFC 2396 of this URI.
|
String |
toString() |
IUriReference |
unresolve(IHierarchicalUri other,
String fragment)
Convert the given uri to a relative uri reference with this uri as base.
|
public HttpUrl(String scheme, String host, int port, String path, String query) throws IllegalArgumentException
IllegalArgumentExceptionpublic HttpUrl(String scheme, String authority, String path, String query) throws IllegalArgumentException
IllegalArgumentExceptionpublic boolean equals(IUri other)
public boolean equals(IHierarchicalUri other)
public boolean equals(HttpUrl other)
public IHierarchicalUri appendPath(String path)
appendPath in interface IHierarchicalUripath - to be appendedpublic String getScheme()
public String getRemainder()
getRemainder in interface IUripublic String getAuthority()
getAuthority in interface IHierarchicalUripublic String getHost()
public int getPort()
public String getPath()
getPath in interface IHierarchicalUripublic String[] getPathSegments()
getPathSegments in interface IHierarchicalUripublic String getQuery()
getQuery in interface IHierarchicalUripublic IHierarchicalUri getRoot()
getRoot in interface IHierarchicalUripublic boolean isAncestorOf(IHierarchicalUri other)
isAncestorOf in interface IHierarchicalUriother - uri to check onpublic IUri resolve(IUriReference reference) throws IllegalArgumentException
resolve in interface IUrireference - to be resolvedIllegalArgumentExceptionpublic IUriReference unresolve(IHierarchicalUri other, String fragment)
unresolve in interface IHierarchicalUriother - uri to unresolvefragment - to add to result referencepublic URI mapToWcmPath(IUriReference ref)
mapToResourceID(IUriReference)mapToWcmPath in interface IHierarchicalUriref - the uri reference to mapnull if not possiblepublic RID mapToResourceID(IUriReference ref)
IHierarchicalUrimapToResourceID in interface IHierarchicalUriref - the uri reference to mapnull if not possiblepublic URI mapToWcmPath(IUriReference ref, URICodec codec)
mapToResourceID(IUriReference, URICodec)mapToWcmPath in interface IHierarchicalUriref - the uri reference to mapcodec - to use for uri decodingnull if not possiblepublic RID mapToResourceID(IUriReference ref, URICodec codec)
IHierarchicalUrimapToResourceID in interface IHierarchicalUriref - the uri reference to mapcodec - to use for uri decodingnull if not possiblepublic IUriReference mapToAbsolutePath(URI wcmPath)
mapToAbsolutePath(RID)mapToAbsolutePath in interface IHierarchicalUriwcmPath - to mappublic IUriReference mapToAbsolutePath(URI wcmPath, URICodec codec)
mapToAbsolutePath(RID, URICodec)mapToAbsolutePath in interface IHierarchicalUriwcmPath - to mapcodec - to use for uri encodingpublic IHierarchicalUri mapToAbsoluteUri(URI wcmPath)
mapToAbsoluteUri(RID)
Given this RID as the base of the WCM repository, map the WCM Path to a absolute RID.mapToAbsoluteUri in interface IHierarchicalUriwcmPath - to mappublic IHierarchicalUri mapToAbsoluteUri(URI wcmPath, URICodec codec)
mapToAbsoluteUri(RID, URICodec)
Given this RID as the base of the WCM repository, map the WCM Path to a absolute urimapToAbsoluteUri in interface IHierarchicalUriwcmPath - to mapcodec - to use for uri encodingpublic IUriReference mapToAbsolutePath(IUriReference ref)
Example: "http://host/docs" + "test%203", gives "/test%203" Example: "http://host/docs/" + "test%203", gives "/docs/test%203" Example: "http://host/docs" + "http://another/docs/test", gives "http://another/docs/test"
mapToAbsolutePath in interface IHierarchicalUriref - uri reference to be mappedpublic IUriReference mapToAbsolutePath(RID wcmPath)
mapToAbsolutePath in interface IHierarchicalUripublic IUriReference mapToAbsolutePath(RID wcmPath, URICodec codec)
mapToAbsolutePath in interface IHierarchicalUripublic IHierarchicalUri mapToAbsoluteUri(RID wcmPath)
IHierarchicalUrimapToAbsoluteUri in interface IHierarchicalUriwcmPath - to mappublic IHierarchicalUri mapToAbsoluteUri(RID wcmPath, URICodec codec)
IHierarchicalUrimapToAbsoluteUri in interface IHierarchicalUriwcmPath - to mapcodec - to use for uri encodingpublic IHierarchicalUri setQuery(String query)
IHierarchicalUrinull , the new uri will be without query. The query string
must be in RFC 2396 encoded form. See UriQuery for manipulation of
query strings.setQuery in interface IHierarchicalUriquery - encoded query string for returned objectpublic IHierarchicalUri setPath(String path)
IHierarchicalUri
null , the new uri will have the root path /. The path string must
be in RFC 2396 encoded form. See URICodec. The query of the
resulting uri will always be empty.setPath in interface IHierarchicalUripath - encoded path string for returned objectpublic String toExternalForm()
IUritoExternalForm in interface IUriprotected static StringBuffer normalizePath(StringBuffer sb)
| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2021 SAP SE Complete Copyright Notice