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