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-2008 Sun Microsystems, Inc.
015 * Portions Copyright 2012-2016 ForgeRock AS.
016 */
017package org.opends.server.schema;
018
019import static org.opends.server.schema.SchemaConstants.*;
020
021import org.forgerock.opendj.ldap.schema.Schema;
022import org.forgerock.opendj.ldap.schema.Syntax;
023import org.forgerock.opendj.server.config.server.AttributeSyntaxCfg;
024import org.opends.server.api.AttributeSyntax;
025
026/**
027 * This class defines the delivery method attribute syntax.  This contains one
028 * or more of a fixed set of values.  If there are multiple values, then they
029 * are separated by spaces with a dollar sign between them.  The allowed values
030 * include:
031 *
032 * <UL>
033 *   <LI>any</LI>
034 *   <LI>mhs</LI>
035 *   <LI>physical</LI>
036 *   <LI>telex</LI>
037 *   <LI>teletex</LI>
038 *   <LI>g3fax</LI>
039 *   <LI>g4fax</LI>
040 *   <LI>ia5</LI>
041 *   <LI>videotex</LI>
042 *   <LI>telephone</LI>
043 * </UL>
044 */
045public class DeliveryMethodSyntax
046       extends AttributeSyntax<AttributeSyntaxCfg>
047{
048
049  /**
050   * Creates a new instance of this syntax.  Note that the only thing that
051   * should be done here is to invoke the default constructor for the
052   * superclass.  All initialization should be performed in the
053   * <CODE>initializeSyntax</CODE> method.
054   */
055  public DeliveryMethodSyntax()
056  {
057    super();
058  }
059
060  /** {@inheritDoc} */
061  @Override
062  public Syntax getSDKSyntax(Schema schema)
063  {
064    return schema.getSyntax(SchemaConstants.SYNTAX_DELIVERY_METHOD_OID);
065  }
066
067  /**
068   * Retrieves the common name for this attribute syntax.
069   *
070   * @return  The common name for this attribute syntax.
071   */
072  @Override
073  public String getName()
074  {
075    return SYNTAX_DELIVERY_METHOD_NAME;
076  }
077
078  /**
079   * Retrieves the OID for this attribute syntax.
080   *
081   * @return  The OID for this attribute syntax.
082   */
083  @Override
084  public String getOID()
085  {
086    return SYNTAX_DELIVERY_METHOD_OID;
087  }
088
089  /**
090   * Retrieves a description for this attribute syntax.
091   *
092   * @return  A description for this attribute syntax.
093   */
094  @Override
095  public String getDescription()
096  {
097    return SYNTAX_DELIVERY_METHOD_DESCRIPTION;
098  }
099}
100