Package org.cyclos.services.users
Interface PhoneService
-
- All Superinterfaces:
CRUDService<PhoneDTO,PhoneData,PhoneDataParams>,CRUDWithConfirmationPasswordService<PhoneDTO,PhoneData,PhoneDataParams>,Service
- All Known Subinterfaces:
PhoneServiceLocal
- All Known Implementing Classes:
PhoneServiceImpl,PhoneServiceSecurity
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 Long id, String confirmationPassword)Disables the given mobile phone to operate via SMSvoidenableForSms(@NotNull Long id)Enables the given mobile phone to operate via SMSPasswordInputDTOgetConfirmationPasswordInputForDisableSms(@NotNull Long id)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(@NotNull String number)Returns a mobile phone by number, making sure it is visibleStringsendVerificationCode(@NotNull Long id)Sends a verification code to a mobile phone via SMS.CodeVerificationStatusverify(@NotNull Long id, @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 Long id, String confirmationPassword) throws FrameworkExceptionDisables the given mobile phone to operate via SMS- Throws:
FrameworkException
-
enableForSms
void enableForSms(@NotNull @NotNull Long id) throws FrameworkExceptionEnables the given mobile phone to operate via SMS- Throws:
FrameworkException
-
getConfirmationPasswordInputForDisableSms
PasswordInputDTO getConfirmationPasswordInputForDisableSms(@NotNull @NotNull Long id) 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(@NotNull @NotNull String number) throws FrameworkException
Returns a mobile phone by number, making sure it is visible- Throws:
FrameworkException
-
sendVerificationCode
String sendVerificationCode(@NotNull @NotNull Long id) 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 Long id, @NotNull @NotNull String verificationCode) throws FrameworkException
Verifies a mobile phone with a code received via SMS.- Throws:
FrameworkException
-
-