@PUT @Path(PhoneNumber.FORMAT_E123_INTERNATIONAL_WITH_POS) public ValueWithPos<String> formatE123InternationalWithPos( final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatE123InternationalWithPos(pphoneNumber, pphoneNumber.getCountry()); }
@RequestMapping(value = PhoneNumber.FORMAT_E123_INTERNATIONAL_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<String> formatE123InternationalWithPos( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatE123InternationalWithPos(pphoneNumber, pphoneNumber.getCountry()); }
@RequestMapping(value = PhoneNumber.FORMAT_E123_INTERNATIONAL_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<String> formatE123InternationalWithPos( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatE123InternationalWithPos(pphoneNumber, pphoneNumber.getCountry()); }
/** * format phone number in E123 international 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> formatE123International( final ValueWithPos<String> pphoneNumber) { return valueWithPosDefaults( this.formatE123InternationalWithPos(this.parsePhoneNumber(pphoneNumber)), pphoneNumber); }
/** * format phone number in E123 international 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> formatE123International( final ValueWithPos<String> pphoneNumber) { return valueWithPosDefaults( this.formatE123InternationalWithPos(this.parsePhoneNumber(pphoneNumber)), pphoneNumber); }
/** * format phone number in E123 international 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> formatE123InternationalWithPos( final ValueWithPos<String> pphoneNumber, final String pcountryCode) { return valueWithPosDefaults( this.formatE123InternationalWithPos(this.parsePhoneNumber(pphoneNumber, pcountryCode)), pphoneNumber); }
/** * format phone number in E123 international 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> formatE123InternationalWithPos( final ValueWithPos<String> pphoneNumber, final String pcountryCode) { return valueWithPosDefaults( this.formatE123InternationalWithPos(this.parsePhoneNumber(pphoneNumber, pcountryCode)), pphoneNumber); }
@Override public void formatValue(final ValueWithPos<String> pvalue, final boolean fireEvents) { setTextWithPos(phoneNumberUtil.formatE123InternationalWithPos(pvalue, StringUtils.upperCase(Objects.toString(countryCodeField.getValue()))), fireEvents); }
@Override public void formatValue(final ValueWithPos<String> pvalue) { setTextWithPos(phoneNumberUtil.formatE123InternationalWithPos(pvalue, StringUtils.upperCase(Objects.toString(countryCodeField.getValue())))); }
/** * format phone number in E123 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> formatE123WithPos( final ValueWithPos<PhoneNumberData> pphoneNumberData, final PhoneCountryData pcountryData) { if (pphoneNumberData != null && pcountryData != null && StringUtils.equals(pcountryData.getCountryCodeData().getCountryCode(), pphoneNumberData.getValue().getCountryCode())) { return this.formatE123NationalWithPos(pphoneNumberData); } else { return this.formatE123InternationalWithPos(pphoneNumberData); } }
/** * format phone number in E123 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> formatE123WithPos( final ValueWithPos<PhoneNumberData> pphoneNumberData, final PhoneCountryData pcountryData) { if (pphoneNumberData != null && pcountryData != null && StringUtils.equals(pcountryData.getCountryCodeData().getCountryCode(), pphoneNumberData.getValue().getCountryCode())) { return this.formatE123NationalWithPos(pphoneNumberData); } else { return this.formatE123InternationalWithPos(pphoneNumberData); } }
return this.formatE123InternationalWithPos(pphoneNumberData);
return this.formatE123InternationalWithPos(pphoneNumberData);