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-2010 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 object class description syntax, which is used to 028 * hold objectclass definitions in the server schema. The format of this 029 * syntax is defined in RFC 2252. 030 */ 031public class ObjectClassSyntax 032 extends AttributeSyntax<AttributeSyntaxCfg> 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 superclass. 037 */ 038 public ObjectClassSyntax() 039 { 040 super(); 041 } 042 043 @Override 044 public Syntax getSDKSyntax(Schema schema) 045 { 046 return schema.getSyntax(SchemaConstants.SYNTAX_OBJECTCLASS_OID); 047 } 048 049 @Override 050 public String getName() 051 { 052 return SYNTAX_OBJECTCLASS_NAME; 053 } 054 055 @Override 056 public String getOID() 057 { 058 return SYNTAX_OBJECTCLASS_OID; 059 } 060 061 @Override 062 public String getDescription() 063 { 064 return SYNTAX_OBJECTCLASS_DESCRIPTION; 065 } 066}