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;
018import static org.opends.server.schema.SchemaConstants.*;
019import org.forgerock.opendj.ldap.schema.Syntax;
020import org.forgerock.opendj.server.config.server.AttributeSyntaxCfg;
021import org.opends.server.api.AttributeSyntax;
022
023/**
024 * This class implements the matching rule use description syntax, which is used
025 * to hold matching rule use definitions in the server schema.  The format of
026 * this syntax is defined in RFC 2252.
027 */
028public class MatchingRuleUseSyntax
029       extends AttributeSyntax<AttributeSyntaxCfg>
030{
031
032  /**
033   * Creates a new instance of this syntax.  Note that the only thing that
034   * should be done here is to invoke the default constructor for the
035   * superclass.  All initialization should be performed in the
036   * <CODE>initializeSyntax</CODE> method.
037   */
038  public MatchingRuleUseSyntax()
039  {
040    super();
041  }
042
043  /** {@inheritDoc} */
044  @Override
045  public Syntax getSDKSyntax(org.forgerock.opendj.ldap.schema.Schema schema)
046  {
047    return schema.getSyntax(SchemaConstants.SYNTAX_MATCHING_RULE_USE_OID);
048  }
049
050  /** {@inheritDoc} */
051  @Override
052  public String getName()
053  {
054    return SYNTAX_MATCHING_RULE_USE_NAME;
055  }
056
057  /** {@inheritDoc} */
058  @Override
059  public String getOID()
060  {
061    return SYNTAX_MATCHING_RULE_USE_OID;
062  }
063
064  /** {@inheritDoc} */
065  @Override
066  public String getDescription()
067  {
068    return SYNTAX_MATCHING_RULE_USE_DESCRIPTION;
069  }
070}
071