All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ldaptive.schema.transcode.SyntaxValueTranscoder Maven / Gradle / Ivy

There is a newer version: 2.4.1
Show newest version
/* See LICENSE for licensing and NOTICE for copyright. */
package org.ldaptive.schema.transcode;

import org.ldaptive.schema.SchemaParseException;
import org.ldaptive.schema.Syntax;

/**
 * Decodes and encodes an attribute syntax for use in an ldap attribute value.
 *
 * @author  Middleware Services
 */
public class SyntaxValueTranscoder extends AbstractSchemaElementValueTranscoder
{


  @Override
  public Syntax decodeStringValue(final String value)
  {
    try {
      return Syntax.parse(value);
    } catch (SchemaParseException e) {
      throw new IllegalArgumentException("Could not transcode attribute syntax", e);
    }
  }


  @Override
  public Class getType()
  {
    return Syntax.class;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy