public interface PhoneServiceLocal extends PhoneService, CRUDServiceLocal<Phone,PhoneDTO,PhoneData,PhoneDataParams>
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_EXTENSION_LENGTH
Maximum land-line phone extension length
|
| Modifier and Type | Method and Description |
|---|---|
Phone |
getDefaultPhone(BasicUser user)
Returns the default phone for this user
|
Phone |
getDefaultPhone(PhoneNature type,
User user)
Returns the default phone (landline or mobile) for the given user, or null if none found
|
java.lang.String |
getExampleNumber(PhoneNature nature)
Returns an example number for the given phone nature
|
PhoneListData |
getPhoneListData(User user)
Returns data containing all phones belonging to the given user
|
org.cyclos.impl.utils.validation.Validator |
getValidator(PhoneDTO dto,
Group group)
Returns the validator for the given phone and user group
|
boolean |
isVerificationCodeSentAndNotExpired(MobilePhone mobile)
Returns whether there is a valid verification code sent for the given mobile phone
|
java.util.List<Phone> |
listByUser(BasicUser user)
Returns the visible phones of the given user.
|
java.util.List<MobilePhone> |
listEnabledPhonesForSmsNotification(BasicUser user,
boolean includeOperators)
Returns all phones that should be used for SMS notifications.
|
Phone |
loadByRawNumber(User user,
java.lang.String rawNumber)
Loads a given user's number by its raw number
|
java.lang.String |
normalizeNumber(ConfigurationAccessor configuration,
java.lang.String rawNumber)
Normalizes a phone number for the given configuration, returning null when not a valid number
|
void |
verifyAndEnableForSms(MobilePhone phone)
Marks the given phone as verified and enabled for SMS
|
disableForSms, enableForSms, getConfirmationPasswordInputForDisableSms, getPhoneListData, loadByNumber, sendVerificationCode, verifygetConfirmationPasswordInputForRemove, removeAllWithConfirmationPassword, removeWithConfirmationPassword, saveWithConfirmationPasswordgetData, getDataForNew, load, remove, removeAll, savefind, findAll, getEntityClass, newEntity, remove, removeAll, toDTO, toEntity, validatestatic final int MAX_EXTENSION_LENGTH
Phone getDefaultPhone(PhoneNature type, User user)
java.lang.String getExampleNumber(PhoneNature nature)
PhoneListData getPhoneListData(User user)
org.cyclos.impl.utils.validation.Validator getValidator(PhoneDTO dto, Group group)
boolean isVerificationCodeSentAndNotExpired(MobilePhone mobile)
java.util.List<Phone> listByUser(BasicUser user)
java.util.List<MobilePhone> listEnabledPhonesForSmsNotification(BasicUser user, boolean includeOperators)
Phone loadByRawNumber(User user, java.lang.String rawNumber)
java.lang.String normalizeNumber(ConfigurationAccessor configuration, java.lang.String rawNumber)
void verifyAndEnableForSms(MobilePhone phone)