Package org.ametys.plugins.sms
Class SMSHelper
- java.lang.Object
-
- org.ametys.plugins.sms.SMSHelper
-
-
Field Summary
Fields Modifier and Type Field Description static Pattern
PHONE_NUMBER_INTERNATIONAL_VALIDATOR
The pattern for an international phone number
-
Constructor Summary
Constructors Modifier Constructor Description private
SMSHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
checkPhoneNumber(String phoneNumber)
Check if the phoneNumber is in the international format defined by the adminstatic String
transformPhoneNumber(String phoneNumber)
Transform the phone number to the format defined by the admin
-
-
-
Field Detail
-
PHONE_NUMBER_INTERNATIONAL_VALIDATOR
public static final Pattern PHONE_NUMBER_INTERNATIONAL_VALIDATOR
The pattern for an international phone number
-
-
Constructor Detail
-
SMSHelper
private SMSHelper()
-
-
Method Detail
-
transformPhoneNumber
public static String transformPhoneNumber(String phoneNumber)
Transform the phone number to the format defined by the admin- Parameters:
phoneNumber
- the phone number to transform- Returns:
- the transformed phone number
-
checkPhoneNumber
public static boolean checkPhoneNumber(String phoneNumber)
Check if the phoneNumber is in the international format defined by the admin- Parameters:
phoneNumber
- the phone number- Returns:
true
if the phone number matches the format,false
otherwise
-
-