|
SAP NetWeaver 7.40 SP 06 KMC | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sapportals.wcm.util.uri.RID
public final class RID
A RID is an identifier for a CM resource. It holds all information to identify a CM resource and retrieve it via the CM Framework. Each CM resource has its unique RID. The first pathsegment must be a valid name of a repository (prefix).
A RID has a path-like structure, like a path in a file system and follows the following production:
RID ::= '/' pathsegment | '/' pathsegment '?' query pathsegment ::= name | name '/' pathsegment | empty name ::= any char except '/' query ::= parameter | parameter '&' query | empty parameter ::= varname | varname '=' value varname ::= any char except '=', '&' value ::= any character except '&'Equality is defined as ignoring trailing '/' characters. Thus, the RIDs "/docs/" and /docs" are considered equal. There is special handling for the root collection "/", which is not equal to the empty RID "".
Copyright (c) SAP AG 2001-2005
| Field Summary | |
|---|---|
static char |
PATH_SEPARATOR
|
| Constructor Summary | |
|---|---|
RID(String uri)
Deprecated. as of NW04. Use RID.getRID(uri) |
|
RID(String path,
String query)
Deprecated. as of NW04. Use RID.getRID(path, query) |
|
| Method Summary | |
|---|---|
RID |
add(RID uri)
Concatenate this RID with the given RID. |
RID |
add(String uri)
Concatenate this RID with the given RID. |
RID |
addPathSegment(String segment)
Adds a path segment. |
RID |
addQueryParameter(Properties parameter)
Deprecated. as of NW04. Use setQueryParameter |
int |
compareTo(Object o)
|
RID |
decode()
Deprecated. as of NW04. RID objects are never decoded |
RID |
encode()
Deprecated. as of NW04. RID objects are never encoded |
boolean |
endsWithSlash()
Return if this RID ends with a slash. |
boolean |
equals(Object other)
Determine if this RID equals other. |
boolean |
equals(RID other)
Determine if this RID equals other. |
boolean |
equals(String other)
Determine if this RID equals other. |
String |
extension()
Get the extension part of the resource name. |
String |
getFirstSegment()
Gets the first (top level) segment of the path. |
String |
getHashId()
Returns the hash ID of this RID. |
String |
getPath()
Return the path component of this RID. |
String |
getQuery()
Return the query component of this RID (null if it does not exist). |
Properties |
getQueryParameter()
Get the query parameters of the RID. |
static RID |
getRID(String uri)
|
static RID |
getRID(String path,
String query)
|
int |
hashCode()
|
boolean |
isAbsolute()
Return if RID is absolute, e.g. start with a slash. |
boolean |
isAncestorOf(RID child)
Determine if this RID is an ancestor (parent or parent's parent, etc.) of the given child RID. |
boolean |
isAncestorOfOrSelf(RID child)
Determine if this RID is an ancestor (parent or parent's parent, etc.) of the given child RID or the same. |
boolean |
isRoot()
Return if RID is root collection. |
int |
length()
Return length of RID in string representation |
RID |
name()
Get the name of the resource, designated by this RID. |
RID |
parent()
Get the RID of the parent collection of this RID |
RID |
removeExtension()
Remove the (optional) extension of the resource name. |
RID |
removeName()
Remove the name of the resource, same as parent() |
RID |
removeRoot()
Get a new RID with the toplevel collection removed |
RID |
removeTrailingSlash()
Remove a possible trailing slash from the RID. |
RID |
resolveRelativeRID(String uri)
Resolve relative RIDs |
RID |
root()
Get RID of toplevel collection (below root) of this RID. |
RID |
setQueryParameter(Properties parameter)
Create a new RID by setting the given parameters as query part of this RID. |
List |
split()
Splits the RID into its path components |
String |
toExternalForm()
|
String |
toString()
Returns string representation of this RID |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final char PATH_SEPARATOR
| Constructor Detail |
|---|
public RID(String path,
String query)
path - of RIDquery - part or RID (can be null)public RID(String uri)
| Method Detail |
|---|
public static RID getRID(String path,
String query)
public static RID getRID(String uri)
public String getHashId()
String representing the hash IDpublic RID encode()
public RID decode()
public String toExternalForm()
public String getPath()
public String getQuery()
public Properties getQueryParameter()
Properties object has no
effect on the RID itself.
Propertiespublic RID root()
The root RID of a toplevel collection is the root collection RID. The root RID of the root RID is the root RID itself.
public RID name()
public RID parent()
public String extension()
public RID removeRoot()
public RID removeName()
public RID removeExtension()
public RID removeTrailingSlash()
public boolean isAbsolute()
public boolean isRoot()
public boolean isAncestorOf(RID child)
child - to test against
public boolean isAncestorOfOrSelf(RID child)
child - to test against
public boolean endsWithSlash()
public RID add(String uri)
Note: do not use this method to add path segments, as the parameter is
parsed as legal RID, not as a legal RID segment; use addPathSegment(String) instead.
uri - to append to this
public RID add(RID uri)
uri - to append to this
public List split()
Stringspublic String toString()
toString in class Objectpublic boolean equals(RID other)
other - RID
public boolean equals(String other)
other - RID (string representation)
public boolean equals(Object other)
equals in class Objectother -
public int hashCode()
hashCode in class Objectpublic int length()
public RID resolveRelativeRID(String uri)
uri - An RID, which may be relative or absolute
public RID addPathSegment(String segment)
throws WcmException
segment - String containing the new path segment
WcmException - if segment contains characters that aren't allowed in
path segmentspublic RID addQueryParameter(Properties parameter)
parameter - to set to query
public RID setQueryParameter(Properties parameter)
parameter - to set to query
public String getFirstSegment()
public int compareTo(Object o)
compareTo in interface Comparable| 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
|
|
SAP NetWeaver 7.40 SP 06 KMC | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||