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(IAbsoluteUri other) |
boolean |
equals(IHierarchicalUri 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)
TBD: Description of the Method.
|
IUriReference |
mapToAbsolutePath(Rid wcmPath,
UriCodec codec)
TBD: Description of the Method.
|
IHierarchicalUri |
mapToAbsoluteUri(Rid wcmPath)
TBD: Description of the Method.
|
IHierarchicalUri |
mapToAbsoluteUri(Rid wcmPath,
UriCodec codec)
TBD: Description of the Method.
|
IRid |
mapToResourceID(IUriReference ref)
TBD: Description of the Method.
|
IRid |
mapToResourceID(IUriReference ref,
UriCodec codec)
TBD: Description of the Method.
|
protected static StringBuffer |
normalizePath(StringBuffer sb) |
IAbsoluteUri |
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
IllegalArgumentException
public HttpUrl(String scheme, String authority, String path, String query) throws IllegalArgumentException
IllegalArgumentException
public boolean equals(IAbsoluteUri other)
public boolean equals(IHierarchicalUri other)
public boolean equals(HttpUrl other)
public IHierarchicalUri appendPath(String path)
appendPath
in interface IHierarchicalUri
path
- TBD: Description of the incoming method parameterpublic String getScheme()
getScheme
in interface IAbsoluteUri
public String getRemainder()
getRemainder
in interface IAbsoluteUri
public String getAuthority()
getAuthority
in interface IHierarchicalUri
public String getHost()
public int getPort()
public String getPath()
getPath
in interface IHierarchicalUri
public String[] getPathSegments()
getPathSegments
in interface IHierarchicalUri
public String getQuery()
getQuery
in interface IHierarchicalUri
public IHierarchicalUri getRoot()
getRoot
in interface IHierarchicalUri
public boolean isAncestorOf(IHierarchicalUri other)
isAncestorOf
in interface IHierarchicalUri
other
- TBD: Description of the incoming method parameterpublic IAbsoluteUri resolve(IUriReference reference)
resolve
in interface IAbsoluteUri
reference
- TBD: Description of the incoming method parameterpublic IUriReference unresolve(IHierarchicalUri other, String fragment)
unresolve
in interface IHierarchicalUri
other
- uri to unresolvefragment
- to add to result referencepublic IRid mapToResourceID(IUriReference ref)
IHierarchicalUri
mapToResourceID
in interface IHierarchicalUri
ref
- TBD: Description of the incoming method parameterpublic IRid mapToResourceID(IUriReference ref, UriCodec codec)
IHierarchicalUri
mapToResourceID
in interface IHierarchicalUri
ref
- TBD: Description of the incoming method parametercodec
- TBD: Description of the incoming method parameterpublic 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 IHierarchicalUri
ref
- TBD: Description of the incoming method parameterpublic IUriReference mapToAbsolutePath(Rid wcmPath)
IHierarchicalUri
mapToAbsolutePath
in interface IHierarchicalUri
wcmPath
- TBD: Description of the incoming method parameterpublic IUriReference mapToAbsolutePath(Rid wcmPath, UriCodec codec)
IHierarchicalUri
mapToAbsolutePath
in interface IHierarchicalUri
wcmPath
- TBD: Description of the incoming method parametercodec
- TBD: Description of the incoming method parameterpublic IHierarchicalUri mapToAbsoluteUri(Rid wcmPath)
IHierarchicalUri
mapToAbsoluteUri
in interface IHierarchicalUri
wcmPath
- TBD: Description of the incoming method parameterpublic IHierarchicalUri mapToAbsoluteUri(Rid wcmPath, UriCodec codec)
IHierarchicalUri
mapToAbsoluteUri
in interface IHierarchicalUri
wcmPath
- TBD: Description of the incoming method parametercodec
- TBD: Description of the incoming method parameterpublic IHierarchicalUri setQuery(String query)
IHierarchicalUri
null
, 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 IHierarchicalUri
query
- 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 IHierarchicalUri
path
- encoded path string for returned objectpublic String toExternalForm()
IAbsoluteUri
toExternalForm
in interface IAbsoluteUri
protected 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 2018 SAP AG Complete Copyright Notice