org.ldaptive.schema.transcode.NameFormValueTranscoder Maven / Gradle / Ivy
The newest version!
/* See LICENSE for licensing and NOTICE for copyright. */
package org.ldaptive.schema.transcode;
import org.ldaptive.schema.NameForm;
import org.ldaptive.schema.SchemaParseException;
/**
* Decodes and encodes a name form for use in an ldap attribute value.
*
* @author Middleware Services
*/
public class NameFormValueTranscoder extends AbstractSchemaElementValueTranscoder
{
@Override
public NameForm decodeStringValue(final String value)
{
try {
return NameForm.parse(value);
} catch (SchemaParseException e) {
throw new IllegalArgumentException("Could not transcode name form", e);
}
}
@Override
public Class getType()
{
return NameForm.class;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy