/** * parse phone number. * * @param pphoneNumber phone number as string * @param pphoneNumberData phone number data to fill * @return PhoneNumberData, the same as in second parameter */ public PhoneNumberInterface parsePhoneNumber(final String pphoneNumber, final PhoneNumberInterface pphoneNumberData) { return this.parsePhoneNumber(pphoneNumber, pphoneNumberData, defaultCountryData); }
/** * parse phone number. * * @param pphoneNumber phone number as string * @param pphoneNumberData phone number data to fill * @return PhoneNumberData, the same as in second parameter */ public PhoneNumberInterface parsePhoneNumber(final String pphoneNumber, final PhoneNumberInterface pphoneNumberData) { return this.parsePhoneNumber(pphoneNumber, pphoneNumberData, defaultCountryData); }
/** * format phone number in DIN 5008 international format. * * @param pphoneNumber phone number as String to format * @return formated phone number as String */ public final String formatDin5008International(final String pphoneNumber) { return this.formatDin5008International(this.parsePhoneNumber(pphoneNumber)); }
/** * format phone number in RFC 3966 format. * * @param pphoneNumber phone number as String to format * @return formated phone number as String */ public final String formatRfc3966(final String pphoneNumber) { return this.formatRfc3966(this.parsePhoneNumber(pphoneNumber)); }
@GET @Path(PhoneNumber.PARSE_PHONE_NUMBER) public PhoneNumberData parsePhoneNumber(@QueryParam(Parameters.LANGUAGE) final String planguage, @QueryParam(Parameters.COUNTRY) final String pcountry, @QueryParam(Parameters.PHONE_NUMBER) final String pphoneNumber) { return phoneNumberUtil.parsePhoneNumber(pphoneNumber, pcountry, LocaleUtil.convertLanguageToLocale(planguage)); }
/** * format phone number in E123 national format. * * @param pphoneNumber phone number to format * @param pcountryCode iso code of country * @return formated phone number as String */ public final String formatE123National(final String pphoneNumber, final String pcountryCode) { return this.formatE123National(this.parsePhoneNumber(pphoneNumber, pcountryCode)); }
/** * format phone number in DIN 5008 format. * * @param pphoneNumber phone number as String to format * @return formated phone number as String */ public final String formatDin5008(final String pphoneNumber) { return this.formatDin5008(this.parsePhoneNumber(pphoneNumber), defaultCountryData); }
/** * format phone number in DIN 5008 national format. * * @param pphoneNumber phone number to format * @param pcountryCode iso code of country * @return formated phone number as String */ public final String formatDin5008National(final String pphoneNumber, final String pcountryCode) { return this.formatDin5008National(this.parsePhoneNumber(pphoneNumber, pcountryCode)); }
/** * format phone number in RFC 3966 format. * * @param pphoneNumber phone number to format * @param pcountryCode iso code of country * @return formated phone number as String */ public final String formatRfc3966(final String pphoneNumber, final String pcountryCode) { return this.formatRfc3966(this.parsePhoneNumber(pphoneNumber, pcountryCode)); }
/** * format phone number in DIN 5008 national format. * * @param pphoneNumber phone number as String to format * @return formated phone number as String */ public final String formatDin5008National(final String pphoneNumber) { return this.formatDin5008National(this.parsePhoneNumber(pphoneNumber)); }
/** * format phone number in Common format. * * @param pphoneNumber phone number as String to format * @return formated phone number as String */ public final String formatCommon(final String pphoneNumber) { return this.formatCommon(this.parsePhoneNumber(pphoneNumber)); }
/** * format phone number in E123 format. * * @param pphoneNumber phone number as String to format * @param pcountryCode iso code of country * @return formated phone number as String */ public final String formatE123(final String pphoneNumber, final String pcountryCode) { return this.formatE123(this.parsePhoneNumber(pphoneNumber), CreatePhoneCountryConstantsClass .create().countryMap().get(StringUtils.defaultString(pcountryCode))); }
/** * 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. * * @param pphoneNumber phone number to format * @param pcountryCode iso code of country * @return formated phone number as String */ public final String formatCommon(final String pphoneNumber, final String pcountryCode) { return this.formatCommon(this.parsePhoneNumber(pphoneNumber, pcountryCode), CreatePhoneCountryConstantsClass.create().countryMap() .get(StringUtils.defaultString(pcountryCode))); }
/** * format phone number in DIN 5008 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> formatDin5008International( final ValueWithPos<String> pphoneNumber) { return valueWithPosDefaults( this.formatDin5008InternationalWithPos(this.parsePhoneNumber(pphoneNumber)), pphoneNumber); }
/** * format phone number in RFC 3966 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> formatRfc3966WithPos(final ValueWithPos<String> pphoneNumber, final String pcountryCode) { return valueWithPosDefaults( this.formatRfc3966WithPos(this.parsePhoneNumber(pphoneNumber, pcountryCode)), pphoneNumber); }
/** * format phone number in Microsoft canonical address 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> formatMs(final ValueWithPos<String> pphoneNumber) { return valueWithPosDefaults(this.formatMsWithPos(this.parsePhoneNumber(pphoneNumber)), pphoneNumber); }
/** * format phone number in URL 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> formatUrlWithPos(final ValueWithPos<String> pphoneNumber, final String pcountryCode) { return valueWithPosDefaults( this.formatUrlWithPos(this.parsePhoneNumber(pphoneNumber, pcountryCode)), pphoneNumber); }
/** * format phone number in DIN 5008 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> formatDin5008National(final ValueWithPos<String> pphoneNumber) { return valueWithPosDefaults( this.formatDin5008NationalWithPos(this.parsePhoneNumber(pphoneNumber)), pphoneNumber); }
/** * format phone number in URL 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> formatUrlWithPos(final ValueWithPos<String> pphoneNumber, final String pcountryCode) { return valueWithPosDefaults( this.formatUrlWithPos(this.parsePhoneNumber(pphoneNumber, pcountryCode)), pphoneNumber); }