public class ResourceUrl extends Object implements IHierarchicalUri
IHierarchicalUri
implementation for Resource (Repository Framework
internal) URLs. Copyright (c) SAP AG 2001-2005
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PORT |
Constructor and Description |
---|
ResourceUrl(String scheme,
String path,
String query) |
ResourceUrl(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(IHierarchicalUri other) |
boolean |
equals(IUri other) |
boolean |
equals(Object other) |
boolean |
equals(ResourceUrl other) |
String |
getAuthority()
Return authority part of this hierarchical Uri.
|
String |
getPath()
Return path of this Uri or, if not there, the emtpy string
|
String[] |
getPathSegments()
Return the segments of the uri path
|
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 Uri as the base of the WCM repository, map the WCM Path to a
absolute uri. Example: "http://host/docs" + "test 3", gives "http://host/docs/test%203" Example: "http://host/docs" + "/fs/test", gives "http://host/docs/fs/test" |
IHierarchicalUri |
mapToAbsoluteUri(URI wcmPath,
URICodec codec)
Deprecated.
As of EP5 SP6, replaced by
mapToAbsoluteUri(RID, URICodec)
Given this Uri as the base of the WCM repository, map the WCM Path to a
absolute uri. Example: "http://host/docs" + "test 3", gives "http://host/docs/test%203" Example: "http://host/docs" + "/fs/test", gives "http://host/docs/fs/test" |
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) |
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 ResourceUrl(String scheme, String path, String query) throws IllegalArgumentException
IllegalArgumentException
public ResourceUrl(String scheme, String authority, String path, String query) throws IllegalArgumentException
IllegalArgumentException
public boolean equals(IUri other)
public boolean equals(IHierarchicalUri other)
public boolean equals(ResourceUrl other)
public IHierarchicalUri appendPath(String path)
appendPath
in interface IHierarchicalUri
public String getScheme()
public String getRemainder()
getRemainder
in interface IUri
public String getAuthority()
getAuthority
in interface IHierarchicalUri
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
public IUri resolve(IUriReference reference)
public IUriReference unresolve(IHierarchicalUri other, String fragment)
unresolve
in interface IHierarchicalUri
other
- uri to unresolvefragment
- to add to result referencepublic URI mapToWcmPath(IUriReference ref)
mapToResourceID(IUriReference)
mapToWcmPath
in interface IHierarchicalUri
ref
- the uri reference to mapnull
if not possiblepublic RID mapToResourceID(IUriReference ref)
IHierarchicalUri
mapToResourceID
in interface IHierarchicalUri
ref
- the uri reference to mapnull
if not possiblepublic URI mapToWcmPath(IUriReference ref, URICodec codec)
mapToResourceID(IUriReference, URICodec)
mapToWcmPath
in interface IHierarchicalUri
ref
- the uri reference to mapcodec
- to use for uri decodingnull
if not possiblepublic RID mapToResourceID(IUriReference ref, URICodec codec)
IHierarchicalUri
mapToResourceID
in interface IHierarchicalUri
ref
- the uri reference to mapcodec
- to use for uri decodingnull
if not possiblepublic IUriReference mapToAbsolutePath(URI wcmPath)
mapToAbsolutePath(RID)
mapToAbsolutePath
in interface IHierarchicalUri
wcmPath
- to mappublic IUriReference mapToAbsolutePath(URI wcmPath, URICodec codec)
mapToAbsolutePath(RID, URICodec)
mapToAbsolutePath
in interface IHierarchicalUri
wcmPath
- to mapcodec
- to use for uri encodingpublic IHierarchicalUri mapToAbsoluteUri(URI wcmPath)
mapToAbsoluteUri(RID)
Given this Uri as the base of the WCM repository, map the WCM Path to a
absolute uri. 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 IHierarchicalUri
wcmPath
- to mappublic IHierarchicalUri mapToAbsoluteUri(URI wcmPath, URICodec codec)
mapToAbsoluteUri(RID, URICodec)
Given this Uri as the base of the WCM repository, map the WCM Path to a
absolute uri. 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 IHierarchicalUri
wcmPath
- 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 IHierarchicalUri
public IUriReference mapToAbsolutePath(RID wcmPath)
mapToAbsolutePath
in interface IHierarchicalUri
public IUriReference mapToAbsolutePath(RID wcmPath, URICodec codec)
mapToAbsolutePath
in interface IHierarchicalUri
public IHierarchicalUri mapToAbsoluteUri(RID wcmPath)
IHierarchicalUri
mapToAbsoluteUri
in interface IHierarchicalUri
wcmPath
- to mappublic IHierarchicalUri mapToAbsoluteUri(RID wcmPath, URICodec codec)
IHierarchicalUri
mapToAbsoluteUri
in interface IHierarchicalUri
wcmPath
- to mapcodec
- to use for uri encodingpublic 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()
IUri
toExternalForm
in interface IUri
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