@PUT @Path(PhoneNumber.FORMAT_COMMON_NATIONAL_WITH_POS) public ValueWithPos<String> formatCommonNationalWithPos( final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatCommonNationalWithPos(pphoneNumber, pphoneNumber.getCountry()); }
@RequestMapping(value = PhoneNumber.FORMAT_COMMON_NATIONAL_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<String> formatCommonNationalWithPos( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatCommonNationalWithPos(pphoneNumber, pphoneNumber.getCountry()); }
@RequestMapping(value = PhoneNumber.FORMAT_COMMON_NATIONAL_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<String> formatCommonNationalWithPos( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatCommonNationalWithPos(pphoneNumber, pphoneNumber.getCountry()); }
/** * format phone number in common national format with cursor position handling. * * @param pphoneNumber phone number as String to format with cursor position * @return formated phone number as String with new cursor position */ public final ValueWithPos<String> formatCommonNational(final ValueWithPos<String> pphoneNumber) { return valueWithPosDefaults( this.formatCommonNationalWithPos(this.parsePhoneNumber(pphoneNumber)), pphoneNumber); }
/** * format phone number in common national format with cursor position handling. * * @param pphoneNumber phone number as String to format with cursor position * @return formated phone number as String with new cursor position */ public final ValueWithPos<String> formatCommonNational(final ValueWithPos<String> pphoneNumber) { return valueWithPosDefaults( this.formatCommonNationalWithPos(this.parsePhoneNumber(pphoneNumber)), pphoneNumber); }
/** * format phone number in common national format with cursor position handling. * * @param pphoneNumber phone number as String to format with cursor position * @param pcountryCode iso code of country * @return formated phone number as String with new cursor position */ public final ValueWithPos<String> formatCommonNationalWithPos( final ValueWithPos<String> pphoneNumber, final String pcountryCode) { return valueWithPosDefaults( this.formatCommonNationalWithPos(this.parsePhoneNumber(pphoneNumber, pcountryCode)), pphoneNumber); }
/** * format phone number in common national format with cursor position handling. * * @param pphoneNumber phone number as String to format with cursor position * @param pcountryCode iso code of country * @return formated phone number as String with new cursor position */ public final ValueWithPos<String> formatCommonNationalWithPos( final ValueWithPos<String> pphoneNumber, final String pcountryCode) { return valueWithPosDefaults( this.formatCommonNationalWithPos(this.parsePhoneNumber(pphoneNumber, pcountryCode)), pphoneNumber); }
/** * format phone number in common format with cursor position handling. * * @param pphoneNumberData phone number to format with cursor position * @param pcountryData country data * @return formated phone number as String with new cursor position */ public final ValueWithPos<String> formatCommonWithPos( final ValueWithPos<PhoneNumberData> pphoneNumberData, final PhoneCountryData pcountryData) { if (pphoneNumberData != null && pcountryData != null && StringUtils.equals(pcountryData.getCountryCodeData().getCountryCode(), pphoneNumberData.getValue().getCountryCode())) { return this.formatCommonNationalWithPos(pphoneNumberData); } else { return this.formatCommonInternationalWithPos(pphoneNumberData); } }
/** * format phone number in common format with cursor position handling. * * @param pphoneNumberData phone number to format with cursor position * @param pcountryData country data * @return formated phone number as String with new cursor position */ public final ValueWithPos<String> formatCommonWithPos( final ValueWithPos<PhoneNumberData> pphoneNumberData, final PhoneCountryData pcountryData) { if (pphoneNumberData != null && pcountryData != null && StringUtils.equals(pcountryData.getCountryCodeData().getCountryCode(), pphoneNumberData.getValue().getCountryCode())) { return this.formatCommonNationalWithPos(pphoneNumberData); } else { return this.formatCommonInternationalWithPos(pphoneNumberData); } }