@RequestMapping(value = PhoneNumber.PARSE_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<PhoneNumberData> parsePhoneNumber( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.parsePhoneNumber(pphoneNumber, pphoneNumber.getCountry()); }
@Override public void formatValue(final ValueWithPos<String> pvalue) { if (pvalue == null || StringUtils.isEmpty(pvalue.getValue())) { this.setValue(StringUtils.EMPTY); } else { final ValueWithPosAndCountry<String> unformatedEntry = new ValueWithPosAndCountry<>( pvalue.getValue(), pvalue.getPos(), Objects.toString(countryCodeField.getValue()), LocaleInfo.getCurrentLocale().getLocaleName()); try { final FutureResult<ValueWithPos<String>> result = cache.get(unformatedEntry); if (result.isDone()) { setTextWithPos(result.get()); } } catch (final ExecutionException e) { GWT.log(e.getMessage(), e); } } }
@RequestMapping(value = PhoneNumber.FORMAT_DIN5008_NATIONAL_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<String> formatDin5008NationalWithPos( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatDin5008NationalWithPos(pphoneNumber, pphoneNumber.getCountry()); }
@RequestMapping(value = PhoneNumber.FORMAT_COMMON_INTERNATIONAL_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<String> formatCommonInternationalWithPos( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatCommonInternationalWithPos(pphoneNumber, pphoneNumber.getCountry()); }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (this.getClass() != obj.getClass()) { return false; } @SuppressWarnings("unchecked") final ValueWithPosAndCountry<E> other = (ValueWithPosAndCountry<E>) obj; return getPos() == other.getPos() // && Objects.equals(getValue(), other.getValue()) // && StringUtils.equals(this.country, other.country) // && StringUtils.equals(this.language, other.language); } }
@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()); }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (this.getClass() != obj.getClass()) { return false; } @SuppressWarnings("unchecked") final ValueWithPosAndCountry<E> other = (ValueWithPosAndCountry<E>) obj; return getPos() == other.getPos() // && Objects.equals(getValue(), other.getValue()) // && StringUtils.equals(this.country, other.country) // && StringUtils.equals(this.language, other.language); } }
@RequestMapping(value = PhoneNumber.PARSE_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<PhoneNumberData> parsePhoneNumber( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.parsePhoneNumber(pphoneNumber, pphoneNumber.getCountry()); }
@RequestMapping(value = PhoneNumber.FORMAT_E123_NATIONAL_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<String> formatE123NationalWithPos( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatE123NationalWithPos(pphoneNumber, pphoneNumber.getCountry()); }
@RequestMapping(value = PhoneNumber.FORMAT_E123_NATIONAL_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<String> formatE123NationalWithPos( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatE123NationalWithPos(pphoneNumber, pphoneNumber.getCountry()); }
@RequestMapping(value = PhoneNumber.FORMAT_MS_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<String> formatMsWithPos( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatMsWithPos(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_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_INTERNATIONAL_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<String> formatDin5008InternationalWithPos( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatDin5008InternationalWithPos(pphoneNumber, pphoneNumber.getCountry()); }
@RequestMapping(value = PhoneNumber.FORMAT_MS_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<String> formatMsWithPos( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatMsWithPos(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_NATIONAL_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<String> formatDin5008NationalWithPos( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatDin5008NationalWithPos(pphoneNumber, pphoneNumber.getCountry()); }
@RequestMapping(value = PhoneNumber.FORMAT_URL_WITH_POS, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @PermitAll @ResponseBody public ValueWithPos<String> formatUrlWithPos( @RequestBody final ValueWithPosAndCountry<String> pphoneNumber) { return phoneNumberUtil.formatUrlWithPos(pphoneNumber, pphoneNumber.getCountry()); }