| | |
| | | */ |
| | | @Override |
| | | public String decodeValue(String value) |
| | | throws IllegalPropertyValueStringException { |
| | | throws PropertyException { |
| | | ifNull(value); |
| | | |
| | | try { |
| | | validateValue(value); |
| | | } catch (IllegalPropertyValueException e) { |
| | | throw new IllegalPropertyValueStringException(this, value); |
| | | } catch (PropertyException e) { |
| | | throw PropertyException.illegalPropertyValueException(this, value); |
| | | } |
| | | |
| | | return value; |
| | |
| | | */ |
| | | @Override |
| | | public String normalizeValue(String value) |
| | | throws IllegalPropertyValueException { |
| | | throws PropertyException { |
| | | ifNull(value); |
| | | |
| | | if (isCaseInsensitive()) { |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void validateValue(String value) throws IllegalPropertyValueException { |
| | | public void validateValue(String value) throws PropertyException { |
| | | ifNull(value); |
| | | |
| | | if (pattern != null) { |
| | | Matcher matcher = pattern.matcher(value); |
| | | if (!matcher.matches()) { |
| | | throw new IllegalPropertyValueException(this, value); |
| | | throw PropertyException.illegalPropertyValueException(this, value); |
| | | } |
| | | } |
| | | } |