Package org.cyclos.services.users
Interface PhoneService
-
- All Superinterfaces:
CRUDService<PhoneDTO,PhoneData,PhoneDataParams>,CRUDWithConfirmationPasswordService<PhoneDTO,PhoneData,PhoneDataParams>,Service
- All Known Subinterfaces:
PhoneServiceLocal
public interface PhoneService extends CRUDWithConfirmationPasswordService<PhoneDTO,PhoneData,PhoneDataParams>
Service interface used to handle user phones
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddisableForSms(@NotNull PhoneVO phone, String confirmationPassword)Disables the given mobile phone to operate via SMSvoidenableForSms(@NotNull PhoneVO phone)Enables the given mobile phone to operate via SMSCredentialInputDTOgetConfirmationPasswordInputForDisableSms(@NotNull PhoneVO vo)Returns data for the confirmation password needed to disable a phone by smsPhoneListDatagetPhoneListData(@NotNull UserLocatorVO locator)Returns data containing all phones belonging to the given userPhoneVOloadByNumber(String number)Returns a mobile phone by numberStringsendVerificationCode(@NotNull PhoneVO phone)Sends a verification code to a mobile phone via SMS.CodeVerificationStatusverify(@NotNull PhoneVO phone, @NotNull String verificationCode)Verifies a mobile phone with a code received via SMS.-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
Methods inherited from interface org.cyclos.services.CRUDWithConfirmationPasswordService
getConfirmationPasswordInputForRemove, removeAllWithConfirmationPassword, removeWithConfirmationPassword, saveWithConfirmationPassword
-
-
-
-
Method Detail
-
disableForSms
void disableForSms(@NotNull @NotNull PhoneVO phone, String confirmationPassword) throws FrameworkExceptionDisables the given mobile phone to operate via SMS- Throws:
FrameworkException
-
enableForSms
void enableForSms(@NotNull @NotNull PhoneVO phone) throws FrameworkExceptionEnables the given mobile phone to operate via SMS- Throws:
FrameworkException
-
getConfirmationPasswordInputForDisableSms
CredentialInputDTO getConfirmationPasswordInputForDisableSms(@NotNull @NotNull PhoneVO vo) throws FrameworkException
Returns data for the confirmation password needed to disable a phone by sms- Throws:
FrameworkException
-
getPhoneListData
PhoneListData getPhoneListData(@NotNull @NotNull UserLocatorVO locator) throws FrameworkException
Returns data containing all phones belonging to the given user- Throws:
FrameworkException
-
loadByNumber
PhoneVO loadByNumber(String number) throws FrameworkException
Returns a mobile phone by number- Throws:
FrameworkException
-
sendVerificationCode
String sendVerificationCode(@NotNull @NotNull PhoneVO phone) throws FrameworkException, SmsSendingException
Sends a verification code to a mobile phone via SMS. The phone number is returned.- Throws:
SmsSendingException- If the SMS message couldn't be sendIllegalActionException- If the mobile phone is already verifiedFrameworkException
-
verify
CodeVerificationStatus verify(@NotNull @NotNull PhoneVO phone, @NotNull @NotNull String verificationCode) throws FrameworkException
Verifies a mobile phone with a code received via SMS.- Throws:
FrameworkException
-
-