|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sapportals.wcm.util.uri.HttpUrl
An IHierarchicalUri implementation for HTTP/HTTPS URLs.
Copyright (c) SAP AG 2001-2003
| Field Summary | |
static int |
DEFAULT_PORT
|
| Constructor Summary | |
HttpUrl(java.lang.String scheme,
java.lang.String host,
int port,
java.lang.String path,
java.lang.String query)
|
|
HttpUrl(java.lang.String scheme,
java.lang.String authority,
java.lang.String path,
java.lang.String query)
|
|
| Method Summary | |
IHierarchicalUri |
appendPath(java.lang.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(java.lang.Object other)
|
java.lang.String |
getAuthority()
Return authority part of this hierarchical Uri. |
java.lang.String |
getHost()
Return the host name of this uri |
java.lang.String |
getPath()
Return path of this Uri or, if not there, the emtpy string |
java.lang.String[] |
getPathSegments()
Return the segments of the uri path |
int |
getPort()
Return the port number of this uri |
java.lang.String |
getQuery()
Return query of this Uri or, if not there, null |
java.lang.String |
getRemainder()
Get the remainder of this Uri (part after scheme without ':'). |
IHierarchicalUri |
getRoot()
Returns the uri of the root collection (path = "/"). |
java.lang.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)
Given this Uri as the base of the WCM repository, map the WCM Path to a uri reference with absolute path component. |
IUriReference |
mapToAbsolutePath(URI wcmPath,
URICodec codec)
Given this Uri as the base of the WCM repository, map the WCM Path to a uri reference with absolute path component. |
IHierarchicalUri |
mapToAbsoluteUri(RID wcmPath)
|
IHierarchicalUri |
mapToAbsoluteUri(RID wcmPath,
URICodec codec)
|
IHierarchicalUri |
mapToAbsoluteUri(URI wcmPath)
Given this Uri as the base of the WCM repository, map the WCM Path to a absolute uri. |
IHierarchicalUri |
mapToAbsoluteUri(URI wcmPath,
URICodec codec)
Given this Uri as the base of the WCM repository, map the WCM Path to a absolute uri. |
RID |
mapToResourceID(IUriReference ref)
|
RID |
mapToResourceID(IUriReference ref,
URICodec codec)
|
URI |
mapToWcmPath(IUriReference ref)
Given this Uri as the base of the WCM repository, map the Uri Reference to the corresponsing WCM Path in the framework. |
URI |
mapToWcmPath(IUriReference ref,
URICodec codec)
Given this Uri as the base of the WCM repository, map the Uri Reference to the corresponsing WCM Path in the framework. |
protected static java.lang.StringBuffer |
normalizePath(java.lang.StringBuffer sb)
|
IUri |
resolve(IUriReference reference)
Resolve the uri reference in the context of this Uri. |
IHierarchicalUri |
setPath(java.lang.String path)
Construct a new object of same type with the given path. |
IHierarchicalUri |
setQuery(java.lang.String query)
Construct a new object of same type with the given query. |
java.lang.String |
toExternalForm()
Returns a string representation according to RFC 2396 of this uri. |
java.lang.String |
toString()
|
IUriReference |
unresolve(IHierarchicalUri other,
java.lang.String fragment)
Convert the given uri to a relative uri reference with this uri as base. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static int DEFAULT_PORT
| Constructor Detail |
public HttpUrl(java.lang.String scheme,
java.lang.String host,
int port,
java.lang.String path,
java.lang.String query)
throws java.lang.IllegalArgumentException
public HttpUrl(java.lang.String scheme,
java.lang.String authority,
java.lang.String path,
java.lang.String query)
throws java.lang.IllegalArgumentException
| Method Detail |
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic boolean equals(IUri other)
public boolean equals(IHierarchicalUri other)
public boolean equals(HttpUrl other)
public IHierarchicalUri appendPath(java.lang.String path)
appendPath in interface IHierarchicalUripath - to be appendedpublic java.lang.String getScheme()
getScheme in interface IUripublic java.lang.String getRemainder()
getRemainder in interface IUripublic java.lang.String getAuthority()
getAuthority in interface IHierarchicalUripublic java.lang.String getHost()
public int getPort()
public java.lang.String getPath()
getPath in interface IHierarchicalUripublic java.lang.String[] getPathSegments()
getPathSegments in interface IHierarchicalUripublic java.lang.String getQuery()
getQuery in interface IHierarchicalUripublic IHierarchicalUri getRoot()
getRoot in interface IHierarchicalUripublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isAncestorOf(IHierarchicalUri other)
isAncestorOf in interface IHierarchicalUriother - uri to check onpublic IUri resolve(IUriReference reference)
resolve in interface IUrireference - to be resolved
public IUriReference unresolve(IHierarchicalUri other,
java.lang.String fragment)
unresolve in interface IHierarchicalUriother - uri to unresolvefragment - to add to result referencepublic URI mapToWcmPath(IUriReference ref)
IHierarchicalUriExample: "http://host/docs" + "/docs/test%203", gives "/test 3" Example: "http://host/docs" + "/xxx/test%203", gives null
mapToWcmPath in interface IHierarchicalUricom.sapportals.wcm.util.uri.IHierarchicalUriref - the uri reference to mapnull if not possiblepublic RID mapToResourceID(IUriReference ref)
mapToResourceID in interface IHierarchicalUri
public URI mapToWcmPath(IUriReference ref,
URICodec codec)
IHierarchicalUriExample: "http://host/docs" + "/docs/test%203", gives "/test 3" Example: "http://host/docs" + "/xxx/test%203", gives null
mapToWcmPath in interface IHierarchicalUricom.sapportals.wcm.util.uri.IHierarchicalUriref - the uri reference to mapcodec - to use for uri decodingnull if not possible
public RID mapToResourceID(IUriReference ref,
URICodec codec)
mapToResourceID in interface IHierarchicalUripublic IUriReference mapToAbsolutePath(URI wcmPath)
IHierarchicalUriExample: "http://host/docs" + "test 3", gives "/docs/test%203" Example: "http://host/docs" + "/fs/test", gives "/docs/fs/test"
mapToAbsolutePath in interface IHierarchicalUricom.sapportals.wcm.util.uri.IHierarchicalUriwcmPath - to map
public IUriReference mapToAbsolutePath(URI wcmPath,
URICodec codec)
IHierarchicalUriExample: "http://host/docs" + "test 3", gives "/docs/test%203" Example: "http://host/docs" + "/fs/test", gives "/docs/fs/test"
mapToAbsolutePath in interface IHierarchicalUricom.sapportals.wcm.util.uri.IHierarchicalUriwcmPath - to mapcodec - to use for uri encodingpublic IHierarchicalUri mapToAbsoluteUri(URI wcmPath)
Example: "http://host/docs" + "test 3", gives "http://host/docs/test%203" Example: "http://host/docs" + "/fs/test", gives "http://host/docs/fs/test"
mapToAbsoluteUri in interface IHierarchicalUriwcmPath - to map
public IHierarchicalUri mapToAbsoluteUri(URI wcmPath,
URICodec codec)
Example: "http://host/docs" + "test 3", gives "http://host/docs/test%203" Example: "http://host/docs" + "/fs/test", gives "http://host/docs/fs/test"
mapToAbsoluteUri 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 IHierarchicalUri
public IUriReference mapToAbsolutePath(RID wcmPath,
URICodec codec)
mapToAbsolutePath in interface IHierarchicalUripublic IHierarchicalUri mapToAbsoluteUri(RID wcmPath)
mapToAbsoluteUri in interface IHierarchicalUri
public IHierarchicalUri mapToAbsoluteUri(RID wcmPath,
URICodec codec)
mapToAbsoluteUri in interface IHierarchicalUripublic IHierarchicalUri setQuery(java.lang.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 IHierarchicalUricom.sapportals.wcm.util.uri.IHierarchicalUriquery - encoded query string for returned objectpublic IHierarchicalUri setPath(java.lang.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 IHierarchicalUricom.sapportals.wcm.util.uri.IHierarchicalUripath - encoded path string for returned objectpublic java.lang.String toExternalForm()
IUritoExternalForm in interface IUricom.sapportals.wcm.util.uri.IUriprotected static java.lang.StringBuffer normalizePath(java.lang.StringBuffer sb)
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||