001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the
004 * License.
005 *
006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
007 * specific language governing permission and limitations under the License.
008 *
009 * When distributing Covered Software, include this CDDL Header Notice in each file and include
010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
011 * Header, with the fields enclosed by brackets [] replaced by your own identifying
012 * information: "Portions Copyright [year] [name of copyright owner]".
013 *
014 * Copyright 2006-2009 Sun Microsystems, Inc.
015 * Portions Copyright 2011-2016 ForgeRock AS.
016 */
017package org.opends.server.schema;
018
019import static org.opends.server.schema.SchemaConstants.*;
020
021import org.forgerock.opendj.ldap.schema.Syntax;
022import org.forgerock.opendj.server.config.server.AttributeSyntaxCfg;
023import org.opends.server.api.AttributeSyntax;
024
025/**
026 * This class implements the name form description syntax, which is used to
027 * hold name form definitions in the server schema.  The format of this syntax
028 * is defined in RFC 2252.
029 */
030public class NameFormSyntax
031       extends AttributeSyntax<AttributeSyntaxCfg>
032{
033
034  /**
035   * Creates a new instance of this syntax.  Note that the only thing that
036   * should be done here is to invoke the default constructor for the
037   * superclass.  All initialization should be performed in the
038   * <CODE>initializeSyntax</CODE> method.
039   */
040  public NameFormSyntax()
041  {
042    super();
043  }
044
045  /** {@inheritDoc} */
046  @Override
047  public Syntax getSDKSyntax(org.forgerock.opendj.ldap.schema.Schema schema)
048  {
049    return schema.getSyntax(SchemaConstants.SYNTAX_NAME_FORM_OID);
050  }
051
052  /** {@inheritDoc} */
053  @Override
054  public String getName()
055  {
056    return SYNTAX_NAME_FORM_NAME;
057  }
058
059  /** {@inheritDoc} */
060  @Override
061  public String getOID()
062  {
063    return SYNTAX_NAME_FORM_OID;
064  }
065
066  /** {@inheritDoc} */
067  @Override
068  public String getDescription()
069  {
070    return SYNTAX_NAME_FORM_DESCRIPTION;
071  }
072}
073