com.sapportals.wcm.util.uri

Class UserRidCodec

java.lang.Object
  extended by com.sapportals.wcm.util.uri.UserRidCodec

public class UserRidCodec
extends Object

Utility class for decoding/encoding item names to fit for the cm store.

The following character ~ / ? \ will be encoded with "~u1" "~u2" "~u3" "~u4" In case of the string doesn't have to be encoded it will be returned untouched. A encoded string will be signed with '~~' at the beginning of the string. Copyright (c) SAP AG 2001-2006


Constructor Summary
UserRidCodec()
           
 
Method Summary
static String Decode(String quotedURI)
          Decode the given URI.
static String Encode(String unquotedURI)
          Encode the given URI.
static boolean encodingNecessary(String uri)
          Checks if the given uri contains character that hav to be encoded
static boolean isEncoded(String uri)
          Checks if the given uri is encoded or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserRidCodec

public UserRidCodec()
Method Detail

encodingNecessary

public static boolean encodingNecessary(String uri)
Checks if the given uri contains character that hav to be encoded

Parameters:
uri - Uri to check
Returns:
True in case of an encoding is necessary

isEncoded

public static boolean isEncoded(String uri)
Checks if the given uri is encoded or not

Parameters:
uri - Uri to check
Returns:
True in case of the uri is already encoded

Encode

public static String Encode(String unquotedURI)
Encode the given URI. Escapes reserved URI characters or returns the original uri in case of no character has to be encoded

Parameters:
unquotedURI - URI to encode
Returns:
encoded URI

Decode

public static String Decode(String quotedURI)
Decode the given URI. De-escapes reserved URI characters.

Parameters:
quotedURI - encoded URI
Returns:
decoded URI
Access Rights

This class can be accessed from:


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 2014 SAP AG Complete Copyright Notice