001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2006-2008 Sun Microsystems, Inc.
025 *      Portions Copyright 2012-2015 ForgeRock AS
026 */
027package org.opends.server.schema;
028
029import static org.opends.server.schema.SchemaConstants.*;
030
031import org.forgerock.opendj.ldap.schema.Schema;
032import org.forgerock.opendj.ldap.schema.Syntax;
033import org.opends.server.admin.std.server.AttributeSyntaxCfg;
034import org.opends.server.api.AttributeSyntax;
035
036/**
037 * This class implements the teletex terminal identifier attribute syntax, which
038 * contains a printable string (the terminal identifier) followed by zero or
039 * more parameters, which start with a dollar sign and are followed by a
040 * parameter name, a colon, and a value.  The parameter value should consist of
041 * any string of bytes (the dollar sign and backslash must be escaped with a
042 * preceding backslash), and the parameter name must be one of the following
043 * strings:
044 * <UL>
045 *   <LI>graphic</LI>
046 *   <LI>control</LI>
047 *   <LI>misc</LI>
048 *   <LI>page</LI>
049 *   <LI>private</LI>
050 * </UL>
051 */
052public class TeletexTerminalIdentifierSyntax
053       extends AttributeSyntax<AttributeSyntaxCfg>
054{
055
056  /**
057   * Creates a new instance of this syntax.  Note that the only thing that
058   * should be done here is to invoke the default constructor for the
059   * superclass.  All initialization should be performed in the
060   * <CODE>initializeSyntax</CODE> method.
061   */
062  public TeletexTerminalIdentifierSyntax()
063  {
064    super();
065  }
066
067  /** {@inheritDoc} */
068  @Override
069  public Syntax getSDKSyntax(Schema schema)
070  {
071    return schema.getSyntax(SchemaConstants.SYNTAX_TELETEX_TERM_ID_OID);
072  }
073
074  /**
075   * Retrieves the common name for this attribute syntax.
076   *
077   * @return  The common name for this attribute syntax.
078   */
079  @Override
080  public String getName()
081  {
082    return SYNTAX_TELETEX_TERM_ID_NAME;
083  }
084
085  /**
086   * Retrieves the OID for this attribute syntax.
087   *
088   * @return  The OID for this attribute syntax.
089   */
090  @Override
091  public String getOID()
092  {
093    return SYNTAX_TELETEX_TERM_ID_OID;
094  }
095
096  /**
097   * Retrieves a description for this attribute syntax.
098   *
099   * @return  A description for this attribute syntax.
100   */
101  @Override
102  public String getDescription()
103  {
104    return SYNTAX_TELETEX_TERM_ID_DESCRIPTION;
105  }
106}
107