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 2009 Sun Microsystems, Inc. 015 */ 016 017package org.forgerock.opendj.ldap.schema; 018 019/** 020 * This enumeration defines the set of possible objectclass types that may be 021 * used, as defined in RFC 2252. 022 * 023 * @see <a href="http://tools.ietf.org/html/rfc2252">RFC 2252 - Lightweight 024 * Directory Access Protocol (v3): Attribute Syntax Definitions</a> 025 */ 026public enum ObjectClassType { 027 /** 028 * The objectclass type that to use for classes declared "abstract". 029 */ 030 ABSTRACT("ABSTRACT"), 031 032 /** 033 * The objectclass type that to use for classes declared "structural". 034 */ 035 STRUCTURAL("STRUCTURAL"), 036 037 /** 038 * The objectclass type that to use for classes declared "auxiliary". 039 */ 040 AUXILIARY("AUXILIARY"); 041 042 /** The string representation of this objectclass type. */ 043 private final String typeString; 044 045 /** 046 * Creates a new objectclass type with the provided string representation. 047 * 048 * @param typeString 049 * The string representation for this objectclass type. 050 */ 051 private ObjectClassType(final String typeString) { 052 this.typeString = typeString; 053 } 054 055 /** 056 * Retrieves a string representation of this objectclass type. 057 * 058 * @return A string representation of this objectclass type. 059 */ 060 @Override 061 public String toString() { 062 return typeString; 063 } 064}