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