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