-
public class ProfileDataHelper
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classProfileDataHelper.AttributeValidationExceptionException thrown when an attribute validation has failed
-
Field Summary
Fields Modifier and Type Field Description public final static PatternATTR_KEY_PATTERNpublic final static intATTR_STRING_MAX_LENGTHpublic final static intATTR_URL_MAX_LENGTH
-
Method Summary
Modifier and Type Method Description static booleanisNotValidCustomUserID(@Nullable() String identifier)Whether the identifier is NOT a valid custom user identifier static booleanisBlocklistedCustomUserID(@Nullable() String identifier)Whether the identifier is blocklisted to avoid unintentional values from plugin conversion. static booleanisNotValidEmail(String email)Whether the given email is NOT valid static booleanisNotValidPhoneNumber(String phoneNumber)Whether the given phone number is NOT valid static booleanisNotValidLanguage(@Nullable() String language)Whether the given language is NOT valid. static booleanisNotValidRegion(@Nullable() String region)Whether the given region is NOT valid. static booleanisNotValidStringValue(@Nullable() String value)Whether the given string attribute is NOT valid. static booleanisURITooLong(@Nullable() URI value)Whether the given URI attribute is too long.. static booleanisNotValidURIValue(@Nullable() URI value)Whether the given URI attribute is NOT valid. static booleanisNotValidStringArray(@NonNull() List<String> values)Whether the given List of string attribute is NOT valid. static StringnormalizeAttributeKey(String key)Ensure the key has the right format and return it lowercase static StringnormalizeTagValue(String value)Ensure tag value has the right format and return it in lowercase (install mode only) static voidassertNotNull(Object value)Assert an attribute value is not null -
-
Method Detail
-
isNotValidCustomUserID
static boolean isNotValidCustomUserID(@Nullable() String identifier)
Whether the identifier is NOT a valid custom user identifier
- Parameters:
identifier- The custom user identifier.
-
isBlocklistedCustomUserID
static boolean isBlocklistedCustomUserID(@Nullable() String identifier)
Whether the identifier is blocklisted to avoid unintentional values from plugin conversion.
- Parameters:
identifier- The custom user identifier.
-
isNotValidEmail
static boolean isNotValidEmail(String email)
Whether the given email is NOT valid
- Parameters:
email- the profile's email
-
isNotValidPhoneNumber
static boolean isNotValidPhoneNumber(String phoneNumber)
Whether the given phone number is NOT valid
- Parameters:
phoneNumber- the profile's phone number
-
isNotValidLanguage
static boolean isNotValidLanguage(@Nullable() String language)
Whether the given language is NOT valid.
- Parameters:
language- the profile's language (null value allowed)
-
isNotValidRegion
static boolean isNotValidRegion(@Nullable() String region)
Whether the given region is NOT valid.
- Parameters:
region- the profile's language (null value allowed)
-
isNotValidStringValue
static boolean isNotValidStringValue(@Nullable() String value)
Whether the given string attribute is NOT valid.
- Parameters:
value- The value to check
-
isURITooLong
static boolean isURITooLong(@Nullable() URI value)
Whether the given URI attribute is too long..
- Parameters:
value- The value to check
-
isNotValidURIValue
static boolean isNotValidURIValue(@Nullable() URI value)
Whether the given URI attribute is NOT valid.
- Parameters:
value- The value to check
-
isNotValidStringArray
static boolean isNotValidStringArray(@NonNull() List<String> values)
Whether the given List of string attribute is NOT valid.
- Parameters:
values- The value to check
-
normalizeAttributeKey
static String normalizeAttributeKey(String key)
Ensure the key has the right format and return it lowercase
- Parameters:
key- The attribute's key
-
normalizeTagValue
static String normalizeTagValue(String value)
Ensure tag value has the right format and return it in lowercase (install mode only)
- Parameters:
value- The tag
-
assertNotNull
static void assertNotNull(Object value)
Assert an attribute value is not null
- Parameters:
value- the value to check
-
-
-
-