Class Util
- java.lang.Object
-
- com.adobe.granite.activitystreams.utils.Util
-
public class Util extends java.lang.Object
Util
...
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]
STANDARD_LABEL_CHAR_MAPPING
The 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 MutableActivity
copy(Activity obj)
static MutableActivityObject
copy(ActivityObject obj)
static MutableMediaLink
copy(MediaLink obj)
static java.lang.String
createValidName(java.lang.String title)
Create a valid label out of an arbitrary string.static java.lang.String
createValidName(java.lang.String title, java.lang.String[] labelCharMapping)
Create a valid label out of an arbitrary string with a custom character mapping.
-
-
-
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 java.lang.String createValidName(java.lang.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 java.lang.String createValidName(java.lang.String title, java.lang.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
-
-