com.sapportals.wcm.crt

Class ComponentUri

java.lang.Object
  extended bycom.sapportals.wcm.crt.ComponentUri

public final class ComponentUri
extends Object

A component URI (RFC2396 ) is an identifier for a component in the CRT.

Scheme: "crt"
Authority: The CRT client identifier
Path: Slash separated component keys (container hierarchie)
Query: Not used

This identifier is not relativ to a container like single component keys are but is a unique identifier for all components in the CRT system. The com.sapportals.wcm.repository.runtime.CmSystem#lookupComponentByUri method can be used to lookup a component instance for a given component URI.

Copyright (c) SAP AG 2001-2002


Field Summary
static String PATH_SEPARATOR
           
static String SCHEME
           
 
Method Summary
 ComponentUri appendKey(String key)
          Appends the specified key at the end of the path.
 boolean equals(Object other)
           
 String[] getChildKeys()
          Returns all child keys of the child URIs of this URI.
 ComponentUri getChildUri(String key)
          Returns a child URI with the specified key or null if it does not exist.
 String getKey()
          Returns this URI's key
 ComponentUri getParent()
          Returns the parent URI.
static ComponentUri getRootUri(String clientID)
          Returns a new root component URI.
 int hashCode()
           
 boolean isRootUri()
          Returns true if this is a root URI.
 ComponentUri removeChildUri(String key)
          Removes a child URI with the specified key.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PATH_SEPARATOR

public static final String PATH_SEPARATOR
See Also:
Constant Field Values

SCHEME

public static final String SCHEME
See Also:
Constant Field Values
Method Detail

appendKey

public ComponentUri appendKey(String key)
                       throws IllegalArgumentException
Appends the specified key at the end of the path.

Parameters:
key - The component key to append.
Returns:
The new URI with the key added to the path.
Throws:
IllegalArgumentException - If the key is invalid (e.g. contains invalid characters).

getParent

public ComponentUri getParent()
Returns the parent URI.

Returns:
the parent URI.

isRootUri

public boolean isRootUri()
Returns true if this is a root URI.

Returns:
true if this is a root URI.

getKey

public String getKey()
Returns this URI's key

Returns:
this URI's key.

getChildUri

public ComponentUri getChildUri(String key)
Returns a child URI with the specified key or null if it does not exist.

Parameters:
key - The key of the child URI.
Returns:
a child URI with the specified key or null if it does not exist.

removeChildUri

public ComponentUri removeChildUri(String key)
Removes a child URI with the specified key.

Parameters:
key - The key of the child uri
Returns:
The removed URI or null if it does not exist.

getChildKeys

public String[] getChildKeys()
Returns all child keys of the child URIs of this URI.

Returns:
all child keys of the child URIs of this URI.

toString

public String toString()

equals

public boolean equals(Object other)

hashCode

public int hashCode()

getRootUri

public static ComponentUri getRootUri(String clientID)
Returns a new root component URI.

Parameters:
clientID - The CRT client identifier.
Returns:
a new root component URI.


Copyright 2006 SAP AG Complete Copyright Notice