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