| | |
| | | * information: "Portions Copyright [year] [name of copyright owner]". |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | * Portions Copyright 2015-2016 ForgeRock AS. |
| | | */ |
| | | package org.forgerock.opendj.config; |
| | | |
| | |
| | | this.enumClass = enumClass; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | protected EnumPropertyDefinition<E> buildInstance(AbstractManagedObjectDefinition<?, ?> d, |
| | | String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction, |
| | |
| | | } |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) { |
| | | return v.visitEnum(this, p); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public <R, P> R accept(PropertyValueVisitor<R, P> v, E value, P p) { |
| | | return v.visitEnum(this, value, p); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public E decodeValue(String value) { |
| | | Reject.ifNull(value); |
| | |
| | | } |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String normalizeValue(E value) { |
| | | Reject.ifNull(value); |
| | |
| | | return value.toString().trim().toLowerCase(); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void validateValue(E value) { |
| | | Reject.ifNull(value); |