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 implements the facsimile telephone number attribute syntax, which
028 * contains a printable string (the number) followed by zero or more parameters.
029 * Those parameters should start with a dollar sign may be any of the following
030 * strings:
031 * <UL>
032 *   <LI>twoDimensional</LI>
033 *   <LI>fineResolution</LI>
034 *   <LI>unlimitedLength</LI>
035 *   <LI>b4Length</LI>
036 *   <LI>a3Width</LI>
037 *   <LI>b4Width</LI>
038 *   <LI>uncompressed</LI>
039 * </UL>
040 */
041public class FaxNumberSyntax
042       extends AttributeSyntax<AttributeSyntaxCfg>
043{
044
045  /**
046   * Creates a new instance of this syntax.  Note that the only thing that
047   * should be done here is to invoke the default constructor for the
048   * superclass.  All initialization should be performed in the
049   * <CODE>initializeSyntax</CODE> method.
050   */
051  public FaxNumberSyntax()
052  {
053    super();
054  }
055
056  /** {@inheritDoc} */
057  @Override
058  public Syntax getSDKSyntax(Schema schema)
059  {
060    return schema.getSyntax(SchemaConstants.SYNTAX_FAXNUMBER_OID);
061  }
062
063  /**
064   * Retrieves the common name for this attribute syntax.
065   *
066   * @return  The common name for this attribute syntax.
067   */
068  @Override
069  public String getName()
070  {
071    return SYNTAX_FAXNUMBER_NAME;
072  }
073
074  /**
075   * Retrieves the OID for this attribute syntax.
076   *
077   * @return  The OID for this attribute syntax.
078   */
079  @Override
080  public String getOID()
081  {
082    return SYNTAX_FAXNUMBER_OID;
083  }
084
085  /**
086   * Retrieves a description for this attribute syntax.
087   *
088   * @return  A description for this attribute syntax.
089   */
090  @Override
091  public String getDescription()
092  {
093    return SYNTAX_FAXNUMBER_DESCRIPTION;
094  }
095}
096