Class Util
- java.lang.Object
-
- com.adobe.granite.activitystreams.utils.Util
-
public class Util extends Object
Util...
-
-
Field Summary
Fields Modifier and Type Field Description static String[]STANDARD_LABEL_CHAR_MAPPINGThe list of characters that are valid label characters
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MutableActivitycopy(Activity obj)static MutableActivityObjectcopy(ActivityObject obj)static MutableMediaLinkcopy(MediaLink obj)static StringcreateValidName(String title)Create a valid label out of an arbitrary string.static StringcreateValidName(String title, String[] labelCharMapping)Create a valid label out of an arbitrary string with a custom character mapping.
-
-
-
Field Detail
-
STANDARD_LABEL_CHAR_MAPPING
public static final String[] STANDARD_LABEL_CHAR_MAPPING
The list of characters that are valid label characters
-
-
Method Detail
-
copy
public static MutableActivityObject copy(ActivityObject obj)
-
copy
public static MutableActivity copy(Activity obj)
-
copy
public static MutableMediaLink copy(MediaLink obj)
-
createValidName
public static String createValidName(String title)
Create a valid label out of an arbitrary string. Same as callingcreateValidName(String, String[])usingSTANDARD_LABEL_CHAR_MAPPING.- Parameters:
title- title to convert into a name- Returns:
- a valid label string
-
createValidName
public static String createValidName(String title, String[] labelCharMapping)
Create a valid label out of an arbitrary string with a custom character mapping.- Parameters:
title- title to convert into a namelabelCharMapping- a mapping of chars (index of the array) to strings that should be used as replacement for the characters- Returns:
- a valid label string
-
-