com.filenet.bso.api.collaboration
Class EmailGuidCoder
java.lang.Object
|
+--com.filenet.bso.api.collaboration.EmailGuidCoder
- public class EmailGuidCoder
- extends java.lang.Object
The EmailGuidCoder
converts Content Engine IDs (GUIDs) to and
from special 26 character, base32 forms. Base32 is used rather than the normal
{hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh}
hexadecimal form since two of
these longer forms, at 38 characters apiece, are too long for the 64-character
limit on local email addresses.
Method Summary |
static java.lang.String |
decode(java.lang.String code,
boolean prettyUp)
Decode the base32 form back into the hexadecimal string. |
static java.lang.String |
encode(java.lang.String guid)
Encode a normal "{hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh}" formatted GUID in base32 form. |
static java.lang.String |
encodeRaw(java.lang.String guid)
Encode a hex string in base32 form. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
encodeRaw
public static java.lang.String encodeRaw(java.lang.String guid)
- Encode a hex string in base32 form. This will ignore any non-hex characters in the string.
- Parameters:
guid
- the hexadecimal string to encode- Returns:
- the base32 encoded form
encode
public static java.lang.String encode(java.lang.String guid)
- Encode a normal "{hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh}" formatted GUID in base32 form.
This will return the encoding if it appears to be a valid GUID or a
null
if
not. This differs from the encodeRaw
method in that encodeRaw
will
work on any string, but encode
will only return an encoding if the string
appears to be a GUID.
- Parameters:
guid
- the GUID to encode- Returns:
- the encoded value of the GUID (or
null
if this does not appear to be a GUID
decode
public static java.lang.String decode(java.lang.String code,
boolean prettyUp)
- Decode the base32 form back into the hexadecimal string. Optionally adds hyphenation and containing braces
to produce a standard GUID.
- Parameters:
code
- the base32 form of the hex stringprettyUp
- if true
, adds hyphenation and containing braces ({}) to produce a standard GUID- Returns:
- the decoded hexadecimal form
Copyright © 2002 - 2004 FileNet Corporation. All rights reserved.