| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.util.Validator.ensureNotNull; |
| | | import static org.forgerock.util.Reject.ifNull; |
| | | |
| | | import java.util.EnumSet; |
| | | import java.util.HashMap; |
| | |
| | | @Override |
| | | public E decodeValue(String value) |
| | | throws IllegalPropertyValueStringException { |
| | | ensureNotNull(value); |
| | | ifNull(value); |
| | | |
| | | String nvalue = value.trim().toLowerCase(); |
| | | E eValue = decodeMap.get(nvalue); |
| | |
| | | @Override |
| | | public String normalizeValue(E value) |
| | | throws IllegalPropertyValueException { |
| | | ensureNotNull(value); |
| | | ifNull(value); |
| | | |
| | | return value.toString().trim().toLowerCase(); |
| | | } |
| | |
| | | @Override |
| | | public void validateValue(E value) |
| | | throws IllegalPropertyValueException { |
| | | ensureNotNull(value); |
| | | ifNull(value); |
| | | |
| | | // No additional validation required. |
| | | } |