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 2008 Sun Microsystems, Inc. 015 * Portions Copyright 2014 ForgeRock AS. 016 */ 017package org.opends.server.types; 018 019 020 021 022 023/** 024 * This class implements an enumeration whose values may be used to 025 * indicate the stability level of API classes and/or methods. Code 026 * which is part of the OpenDS public API should be marked with a 027 * {@code COMMITTED}, {@code UNCOMMITTED}, {@code VOLAITLE}, or 028 * {@code OBSOLETE} stability level in order to indicate the relative 029 * likelihood that the associated interface will be changed in an 030 * incompatible way in the future. 031 * <BR><BR> 032 * Third-party developers are free to create code that introduces 033 * dependencies on OpenDS APIs that are marked {@code COMMITTED}, 034 * {@code UNCOMMITTED}, or {@code VOLATILE}, with an understanding 035 * that the less stable an OpenDS API is, the more likely that 036 * third-party code which relies upon it may need to be altered in 037 * order to work properly with future versions. 038 * <BR><BR> 039 * Changes to the stability level of a class or package should only be 040 * made between major releases and must be denoted in the release 041 * notes for all releases with that major version. If a public API 042 * element that is marked {@code COMMITTED}, {@code UNCOMMITTED}, or 043 * {@code VOLATILE} is to be made private, it is strongly recommended 044 * that it first be transitioned to {@code OBSOLETE} before ultimately 045 * being marked {@code PRIVATE}. 046 * <BR><BR> 047 * New packages and classes introduced into the OpenDS code base may 048 * be assigned any stability level. New methods introduced into 049 * existing classes that are part of the public API may be created 050 * with any stability level as long as the introduction of that method 051 * is compliant with the stability level of the class. If a method 052 * that is part of the OpenDS public API is not marked with an 053 * explicit stability level, then it should be assumed that it has the 054 * same stability level as the class that contains it. 055 */ 056@org.opends.server.types.PublicAPI( 057 stability=org.opends.server.types.StabilityLevel.UNCOMMITTED, 058 mayInstantiate=false, 059 mayExtend=false, 060 mayInvoke=true) 061public enum StabilityLevel 062{ 063 /** 064 * The associated package, class, or method may be made available 065 * for third-party use, and the APIs that it exposes should be 066 * considered stable. Incompatible changes may only be introduced 067 * between major versions, and even then such changes should be 068 * considered very rare and will require strong justification and 069 * be explicitly denoted in the release notes for all releases with 070 * that major version. 071 * <BR><BR> 072 * Note that interface changes may be allowed between non-major 073 * releases if they do not impact backward compatibility. 074 */ 075 COMMITTED, 076 077 078 079 /** 080 * The associated package, class, or method may be made available 081 * for third-party use, and the APIs that it exposes may be 082 * considered moderately stable. Incompatible changes may be 083 * introduced between major and/or minor versions, but only with 084 * strong justification and explicit denotation in the release notes 085 * for all subsequent releases with that major version. 086 * <BR><BR> 087 * Note that interface changes may be allowed between non-major and 088 * non-minor releases if they do not impact backward compatibility. 089 */ 090 UNCOMMITTED, 091 092 093 094 /** 095 * The associated package, class, or method may be made available 096 * for third-party use, but the APIs that it exposes should not be 097 * considered stable. Incompatible changes may be introduced 098 * between major, minor, and point versions, and may also be 099 * introduced in patches or hotfixes. Any incompatible interface 100 * changes should be denoted in the release notes for all subsequent 101 * releases with that major version. 102 * <BR><BR> 103 * Note that if it is believed that a given class or interface will 104 * likely have incompatible changes in the future, then it should be 105 * declared with a stability level of {@code VOLATILE}, even if that 106 * those incompatible changes are expected to occur between major 107 * releases. 108 */ 109 VOLATILE, 110 111 112 113 /** 114 * The associated package, class, or method should be considered 115 * obsolete, and no new code should be created that depends on it. 116 * The associated code may be removed in future versions without any 117 * additional prior notice. 118 */ 119 OBSOLETE, 120 121 122 123 /** 124 * The associated package, class, or method should be considered 125 * part of the OpenDS private API and should not be used by 126 * third-party code. No prior notice is required for incompatible 127 * changes to code with a {@code PRIVATE} classification. 128 */ 129 PRIVATE; 130} 131