public class OwObjectIDCodeUtil extends Object
Utility class for ObjectID de- and encoding.
The ID (string) of an object can be used for path definitions, because the object
name must not be unique, therefore the object ID should not contain slashes.
This utility class will replace in the given ID all occurrence of slashes '/'
([/]) with a broken bar '|' ([|]).
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Modifier and Type | Field and Description |
---|---|
static String |
ENCODE_PLACEHOLDER
Placeholder which will be add to the ID instead of
the
PATH_SEPARATOR |
static char |
ENCODE_PLACEHOLDER_CHAR
char representation of the
ENCODE_PLACEHOLDER |
static String |
PATH_SEPARATOR
Separator of the path, should not be contained in
objectID definition.
|
static char |
PATH_SEPARATOR_CHAR
char representation of the
PATH_SEPARATOR |
Constructor and Description |
---|
OwObjectIDCodeUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
decode(String objectID_p)
Decode the given ID, by replacing the
ENCODE_PLACEHOLDER_CHAR
with slashes (PATH_SEPARATOR_CHAR ). |
static String |
encode(String objectID_p)
Encode the given ID, by replacing all existing slashes
in the objectID_p String with the
ENCODE_PLACEHOLDER_CHAR . |
public static final String PATH_SEPARATOR
public static final String ENCODE_PLACEHOLDER
PATH_SEPARATOR
public static final char PATH_SEPARATOR_CHAR
PATH_SEPARATOR
public static final char ENCODE_PLACEHOLDER_CHAR
ENCODE_PLACEHOLDER
public static String encode(String objectID_p)
ENCODE_PLACEHOLDER_CHAR
.objectID_p
- String which may contain slashespublic static String decode(String objectID_p)
ENCODE_PLACEHOLDER_CHAR
with slashes (PATH_SEPARATOR_CHAR
).objectID_p
- String which should be decodedENCODE_PLACEHOLDER_CHAR
are replaced with slashesCopyright © 2014 Alfresco Business Solutions. All Rights Reserved.