Package org.ametys.plugins.sms
Class SMSHelper
- java.lang.Object
 - 
- org.ametys.plugins.sms.SMSHelper
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static PatternPHONE_NUMBER_INTERNATIONAL_VALIDATORThe pattern for an international phone number 
- 
Constructor Summary
Constructors Modifier Constructor Description privateSMSHelper() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheckPhoneNumber(String phoneNumber)Check if the phoneNumber is in the international format defined by the adminstatic StringtransformPhoneNumber(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:
 trueif the phone number matches the format,falseotherwise
 
 - 
 
 -