001    /*
002     * Copyright 2016 UnboundID Corp.
003     * All Rights Reserved.
004     */
005    /*
006     * Copyright (C) 2016 UnboundID Corp.
007     *
008     * This program is free software; you can redistribute it and/or modify
009     * it under the terms of the GNU General Public License (GPLv2 only)
010     * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
011     * as published by the Free Software Foundation.
012     *
013     * This program is distributed in the hope that it will be useful,
014     * but WITHOUT ANY WARRANTY; without even the implied warranty of
015     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
016     * GNU General Public License for more details.
017     *
018     * You should have received a copy of the GNU General Public License
019     * along with this program; if not, see <http://www.gnu.org/licenses>.
020     */
021    package com.unboundid.ldap.sdk;
022    
023    
024    
025    import java.util.ArrayList;
026    import java.util.Collections;
027    import java.util.List;
028    
029    
030    
031    
032    /**
033     * This class provides information about the current version of the UnboundID
034     * LDAP SDK for Java.
035     */
036    public final class Version
037    {
038      //
039      // NOTE -- This file is dynamically generated.  Do not edit it.  If you need
040      //         to add something to it, then add it to the
041      //         resource/Version.java.stub file below the LDAP SDK build root.
042      //
043    
044    
045    
046      /**
047       * The official full product name for the LDAP SDK.  For this build, the
048       * value is "UnboundID LDAP SDK for Java".
049       */
050      public static final String PRODUCT_NAME =
051           "UnboundID LDAP SDK for Java";
052    
053    
054    
055      /**
056       * The short product name for the LDAP SDK.  This will not have any spaces.
057       * For this build, the value is "unboundid-ldapsdk".
058       */
059      public static final String SHORT_NAME =
060           "unboundid-ldapsdk";
061    
062    
063    
064      /**
065       * The major version number for the LDAP SDK.  For this build, the value is
066       * 3.
067       */
068      public static final int MAJOR_VERSION = 3;
069    
070    
071    
072      /**
073       * The minor version number for the LDAP SDK.  For this build, the value is
074       * 2.
075       */
076      public static final int MINOR_VERSION = 2;
077    
078    
079    
080      /**
081       * The point version number for the LDAP SDK.  For this build, the value is
082       * 0.
083       */
084      public static final int POINT_VERSION = 0;
085    
086    
087    
088      /**
089       * The version qualifier string for the LDAP SDK.  It will often be a
090       * zero-length string, but may be non-empty for special builds that should be
091       * tagged in some way (e.g., "-beta1" or "-rc2").  For this build, the value
092       * is "".
093       */
094      public static final String VERSION_QUALIFIER =
095           "";
096    
097    
098    
099      /**
100       * A timestamp that indicates when this build of the LDAP SDK was generated.
101       * For this build, the value is "20160919222148Z".
102       */
103      public static final String BUILD_TIMESTAMP = "20160919222148Z";
104    
105    
106    
107      /**
108       * The Subversion path associated with the build root directory from which
109       * this build of the LDAP SDK was generated.  It may be an absolute local
110       * filesystem path if the Subversion path isn't available at build time.
111       * For this build, the value is "/directory/tags/ldapsdk/ldapsdk-3.2.0".
112       */
113      public static final String REPOSITORY_PATH =
114           "/directory/tags/ldapsdk/ldapsdk-3.2.0";
115    
116    
117    
118      /**
119       * The source revision number from which this build of the LDAP SDK was
120       * generated.  It may be -1 if the Subversion revision isn't available at
121       * build time.  For this build, the value is 24201.
122       */
123      public static final long REVISION_NUMBER = 24201;
124    
125    
126    
127      /**
128       * The full version string for the LDAP SDK.  For this build, the value is
129       * "UnboundID LDAP SDK for Java 3.2.0".
130       */
131      public static final String FULL_VERSION_STRING =
132           PRODUCT_NAME + ' ' + MAJOR_VERSION + '.' + MINOR_VERSION + '.' +
133           POINT_VERSION + VERSION_QUALIFIER;
134    
135    
136    
137      /**
138       * The short version string for the LDAP SDK.  This will not have any spaces.
139       * For this build, the value is
140       * "unboundid-ldapsdk-3.2.0".
141       */
142      public static final String SHORT_VERSION_STRING =
143           SHORT_NAME + '-' + MAJOR_VERSION + '.' + MINOR_VERSION + '.' +
144           POINT_VERSION + VERSION_QUALIFIER;
145    
146    
147    
148      /**
149       *The version number string for the LDAP SDK, which contains just the major,
150       * minor, and point version, and optional version qualifier.  For this build,
151       * the version string is
152       * "3.2.0".
153       */
154      public static final String NUMERIC_VERSION_STRING =
155           MAJOR_VERSION + "." + MINOR_VERSION + '.' +
156           POINT_VERSION + VERSION_QUALIFIER;
157    
158    
159    
160      /**
161       * Prevent this class from being instantiated.
162       */
163      private Version()
164      {
165        // No implementation is required.
166      }
167    
168    
169    
170      /**
171       * Prints version information from this class to standard output.
172       *
173       * @param  args  The command-line arguments provided to this program.
174       */
175      public static void main(final String... args)
176      {
177        for (final String line : getVersionLines())
178        {
179          System.out.println(line);
180        }
181      }
182    
183    
184    
185      /**
186       * Retrieves a list of lines containing information about the LDAP SDK
187       * version.
188       *
189       * @return  A list of lines containing information about the LDAP SDK
190       *          version.
191       */
192      public static List<String> getVersionLines()
193      {
194        final ArrayList<String> versionLines = new ArrayList<String>(11);
195    
196        versionLines.add("Full Version String:   " + FULL_VERSION_STRING);
197        versionLines.add("Short Version String:  " + SHORT_VERSION_STRING);
198        versionLines.add("Product Name:          " + PRODUCT_NAME);
199        versionLines.add("Short Name:            " + SHORT_NAME);
200        versionLines.add("Major Version:         " + MAJOR_VERSION);
201        versionLines.add("Minor Version:         " + MINOR_VERSION);
202        versionLines.add("Point Version:         " + POINT_VERSION);
203        versionLines.add("Version Qualifier:     " + VERSION_QUALIFIER);
204        versionLines.add("Build Timestamp:       " + BUILD_TIMESTAMP);
205        versionLines.add("Repository Path:       " + REPOSITORY_PATH);
206        versionLines.add("Revision Number:       " + REVISION_NUMBER);
207    
208        return Collections.unmodifiableList(versionLines);
209      }
210    }