| | |
| | | |
| | | package org.opends.server.admin; |
| | | |
| | | import static com.forgerock.opendj.util.Validator.*; |
| | | import org.forgerock.util.Reject; |
| | | |
| | | import java.util.EnumSet; |
| | | import java.util.Locale; |
| | |
| | | */ |
| | | @Override |
| | | public void validateValue(Integer value) throws IllegalPropertyValueException { |
| | | ensureNotNull(value); |
| | | Reject.ifNull(value); |
| | | |
| | | if (!allowUnlimited && value < lowerLimit) { |
| | | throw new IllegalPropertyValueException(this, value); |
| | |
| | | */ |
| | | @Override |
| | | public String encodeValue(Integer value) throws IllegalPropertyValueException { |
| | | ensureNotNull(value); |
| | | Reject.ifNull(value); |
| | | |
| | | // Make sure that we correctly encode negative values as "unlimited". |
| | | if (allowUnlimited) { |
| | |
| | | */ |
| | | @Override |
| | | public Integer decodeValue(String value) throws IllegalPropertyValueStringException { |
| | | ensureNotNull(value); |
| | | Reject.ifNull(value); |
| | | |
| | | if (allowUnlimited) { |
| | | if (value.trim().equalsIgnoreCase(UNLIMITED)) { |