Package org.cyclos.impl.users
Interface PhoneServiceLocal
-
- All Superinterfaces:
CRUDService<PhoneDTO,PhoneData,PhoneDataParams>,CRUDServiceLocal<Phone,PhoneDTO,PhoneData,PhoneDataParams>,CRUDWithConfirmationPasswordService<PhoneDTO,PhoneData,PhoneDataParams>,PhoneService,Service
public interface PhoneServiceLocal extends PhoneService, CRUDServiceLocal<Phone,PhoneDTO,PhoneData,PhoneDataParams>
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_EXTENSION_LENGTHMaximum land-line phone extension length
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcount(BasicUser user, PhoneNature nature)Count the phones of the given user (hidden or not) filtered by nature if not null.Map<PhoneNature,Integer>counters(BasicUser user)Same ascount(BasicUser, PhoneNature)but returning a map with the counters per nature.MobilePhonefindByNumber(String number)Finds a mobile phone by numberPhonegetDefaultPhone(BasicUser user)Returns the default phone for this userPhonegetDefaultPhone(PhoneNature type, User user)Returns the default phone (landline or mobile) for the given user, or null if none foundPhoneListDatagetPhoneListData(BasicUser user)Returns data containing all phones belonging to the given userValidatorgetValidator(PhoneDTO dto, BasicUser user)Returns the validator for the given phone and owner userList<Phone>listByUser(@NotNull BasicUser user, PhoneNature nature)Returns the phones of the given user filtered by nature if not null.List<MobilePhone>listEnabledPhonesForSmsNotification(BasicUser user, boolean includeOperators)Returns all phones that should be used for SMS notifications.PhoneloadByRawNumber(User user, String rawNumber)Loads a given user's number by its raw numbervoidmarkVerified(MobilePhone phone)Marks a phone as verified WARN: This method doesn't keep trace of failed actionsvoidremoveAll(BasicUser basicUser)Removes all phones of the given uservoidverifyAndEnableForSms(MobilePhone phone)Marks the given phone as verified and enabled for SMS-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
Methods inherited from interface org.cyclos.impl.CRUDServiceLocal
find, findAll, getEntityClass, newEntity, remove, removeAll, saveEntity, saveSkippingEntityLog, toDTO, toEntity, validate
-
Methods inherited from interface org.cyclos.services.CRUDWithConfirmationPasswordService
getConfirmationPasswordInputForRemove, removeAllWithConfirmationPassword, removeWithConfirmationPassword, saveWithConfirmationPassword
-
Methods inherited from interface org.cyclos.services.users.PhoneService
disableForSms, enableForSms, getConfirmationPasswordInputForDisableSms, getPhoneListData, loadByNumber, sendVerificationCode, verify
-
-
-
-
Field Detail
-
MAX_EXTENSION_LENGTH
static final int MAX_EXTENSION_LENGTH
Maximum land-line phone extension length- See Also:
- Constant Field Values
-
-
Method Detail
-
count
int count(BasicUser user, PhoneNature nature)
Count the phones of the given user (hidden or not) filtered by nature if not null.
-
counters
Map<PhoneNature,Integer> counters(BasicUser user)
Same ascount(BasicUser, PhoneNature)but returning a map with the counters per nature. The returned map will have a key for each phone nature, in case the user doesn't have phones for a nature then, the map will contain an entry for it with 0 as the associated value.
-
findByNumber
MobilePhone findByNumber(String number)
Finds a mobile phone by number
-
getDefaultPhone
Phone getDefaultPhone(PhoneNature type, User user)
Returns the default phone (landline or mobile) for the given user, or null if none found
-
getPhoneListData
PhoneListData getPhoneListData(BasicUser user)
Returns data containing all phones belonging to the given user
-
getValidator
Validator getValidator(PhoneDTO dto, BasicUser user)
Returns the validator for the given phone and owner user
-
listByUser
List<Phone> listByUser(@NotNull @NotNull BasicUser user, PhoneNature nature)
Returns the phones of the given user filtered by nature if not null. If the logged user can not view hidden profile fields then only visible phone are returned.
-
listEnabledPhonesForSmsNotification
List<MobilePhone> listEnabledPhonesForSmsNotification(BasicUser user, boolean includeOperators)
Returns all phones that should be used for SMS notifications. If the includeOperators flag is true, also includes any alias-operator phones which are enabled for SMS.
-
loadByRawNumber
Phone loadByRawNumber(User user, String rawNumber)
Loads a given user's number by its raw number
-
markVerified
void markVerified(MobilePhone phone)
Marks a phone as verified WARN: This method doesn't keep trace of failed actions
-
removeAll
void removeAll(BasicUser basicUser)
Removes all phones of the given user
-
verifyAndEnableForSms
void verifyAndEnableForSms(MobilePhone phone)
Marks the given phone as verified and enabled for SMS
-
-