@PUT @Path(PhoneNumber.FORMAT_DIN5008_WITH_POS) public ValueWithPos<String> formatDin5008WithPos( final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatDin5008WithPos(pphoneNumber, pphoneNumber.getCountry()); }
@RequestMapping(value = PhoneNumber.FORMAT_DIN5008_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<String> formatDin5008WithPos( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatDin5008WithPos(pphoneNumber, pphoneNumber.getCountry()); }
@RequestMapping(value = PhoneNumber.FORMAT_DIN5008_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<String> formatDin5008WithPos( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatDin5008WithPos(pphoneNumber, pphoneNumber.getCountry()); }
/** * format phone number in DIN 5008 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> formatDin5008(final ValueWithPos<String> pphoneNumber) { return valueWithPosDefaults( this.formatDin5008WithPos(this.parsePhoneNumber(pphoneNumber), defaultCountryData), pphoneNumber); }
/** * format phone number in DIN 5008 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> formatDin5008(final ValueWithPos<String> pphoneNumber) { return valueWithPosDefaults( this.formatDin5008WithPos(this.parsePhoneNumber(pphoneNumber), defaultCountryData), pphoneNumber); }
@Override public void formatValue(final ValueWithPos<String> pvalue) { setTextWithPos(phoneNumberUtil.formatDin5008WithPos(pvalue, StringUtils.upperCase(Objects.toString(countryCodeField.getValue())))); }
@Override public void formatValue(final ValueWithPos<String> pvalue, final boolean fireEvents) { setTextWithPos(phoneNumberUtil.formatDin5008WithPos(pvalue, StringUtils.upperCase(Objects.toString(countryCodeField.getValue()))), fireEvents); }
/** * format phone number in DIN 5008 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> formatDin5008WithPos(final ValueWithPos<String> pphoneNumber, final String pcountryCode) { return valueWithPosDefaults(this.formatDin5008WithPos( this.parsePhoneNumber(pphoneNumber, pcountryCode), CreatePhoneCountryConstantsClass.create() .countryMap().get(StringUtils.defaultString(pcountryCode))), pphoneNumber); }
/** * format phone number in DIN 5008 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> formatDin5008WithPos(final ValueWithPos<String> pphoneNumber, final String pcountryCode) { return valueWithPosDefaults(this.formatDin5008WithPos( this.parsePhoneNumber(pphoneNumber, pcountryCode), CreatePhoneCountryConstantsClass.create() .countryMap().get(StringUtils.defaultString(pcountryCode))), pphoneNumber); }