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 2006-2009 Sun Microsystems, Inc. 025 * Portions Copyright 2011-2015 ForgeRock AS 026 */ 027package org.opends.server.util; 028 029/** 030 * This file contains a number of constants that are used throughout the 031 * Directory Server source. It was dynamically generated as part of the 032 * Directory Server build process and should not be edited directly. 033 */ 034@org.opends.server.types.PublicAPI( 035 stability=org.opends.server.types.StabilityLevel.UNCOMMITTED, 036 mayInstantiate=false, 037 mayExtend=false, 038 mayInvoke=true) 039public final class DynamicConstants 040{ 041 /** 042 * The official full product name for the Directory Server. 043 */ 044 public static String PRODUCT_NAME = "OpenDJ"; 045 046 /** 047 * The short product name for the Directory Server. 048 */ 049 public static String SHORT_NAME = "OpenDJ"; 050 051 /** 052 * The major version number for the Directory Server. 053 */ 054 public static int MAJOR_VERSION = 3; 055 056 /** 057 * The minor version number for the Directory Server. 058 */ 059 public static int MINOR_VERSION = 0; 060 061 /** 062 * The point version number for the Directory Server. 063 */ 064 public static int POINT_VERSION = 0; 065 066 /** 067 * The official build number for the Directory Server. 068 */ 069 public static int BUILD_NUMBER = 0; 070 071 /** 072 * The version qualifier string for the Directory Server. 073 */ 074 public static String VERSION_QUALIFIER = "SNAPSHOT"; 075 076 /** 077 * The set of bug IDs for fixes included in this build of the Directory 078 * Server. 079 */ 080 public static String FIX_IDS = ""; 081 082 /** 083 * The build ID for the generated build of the Directory Server. 084 */ 085 public static String BUILD_ID = "20150826053805"; 086 087 /** 088 * The username of the user that created this build. 089 */ 090 public static String BUILD_USER = "www-data"; 091 092 /** 093 * The Java version used to generate this build. 094 */ 095 public static String BUILD_JAVA_VERSION = "1.7.0_76"; 096 097 /** 098 * The vendor for the Java version used to generate this build. 099 */ 100 public static String BUILD_JAVA_VENDOR = "Oracle Corporation"; 101 102 /** 103 * The JVM version used to generate this build. 104 */ 105 public static String BUILD_JVM_VERSION = "24.76-b04"; 106 107 /** 108 * The vendor for the JVM used to generate this build. 109 */ 110 public static String BUILD_JVM_VENDOR = "Oracle Corporation"; 111 112 /** 113 * The operating system on which this build was generated. 114 */ 115 public static String BUILD_OS = "Linux 2.6.32-34-pve amd64"; 116 117 /** 118 * Indicates whether this is a debug build of the Directory Server that may 119 * include additional debugging facilities not available in standard release 120 * versions. 121 */ 122 public static boolean DEBUG_BUILD = false; 123 124 /** 125 * The Subversion revision number on which this build is based. 126 */ 127 public static long REVISION_NUMBER = 12788; 128 129 /** 130 * The Subversion url repository location on which this build is based. 131 */ 132 public static String URL_REPOSITORY = "https://svn.forgerock.org/opendj/trunk/opendj/opendj-server-legacy/"; 133 134 /** 135 * The documentation home. 136 */ 137 public static String DOC_REFERENCE_HOME = 138 "http://opendj.forgerock.org/"; 139 140 /** 141 * The documentation url. 142 */ 143 public static String DOC_REFERENCE_WIKI = 144 "http://opendj.forgerock.org/docs.html"; 145 146 /** 147 * The documentation url. 148 */ 149 public static String DOC_QUICK_REFERENCE_GUIDE = 150 "http://opendj.forgerock.org/opendj-server-legacy/doc/bootstrap/admin-guide/"; 151 152 /** 153 * The administration guide. 154 */ 155 public static String ADMINISTRATION_GUIDE_URL = 156 "http://opendj.forgerock.org/opendj-server-legacy/doc/bootstrap/admin-guide/"; 157 158 /** 159 * A string representation of the version number. 160 */ 161 public static String VERSION_NUMBER_STRING = String.format("%s.%s.%s", MAJOR_VERSION, MINOR_VERSION, POINT_VERSION); 162 163 /** 164 * A string representation of the version number. 165 */ 166 public static String OPENDJ_NUMBER_STRING = VERSION_NUMBER_STRING; 167 168 /** 169 * A string representation of the release version. 170 */ 171 public static String RELEASE_VERSION_STRING = 172 OPENDJ_NUMBER_STRING; 173 174 175 /** 176 * Test if a specific class is provided to overwrite the BUILD definitions 177 * By the release definitions provided by 178 * org.opends.server.util.ReleaseDefinition 179 */ 180 181 static { 182 183 try { 184 Class c; 185 if (org.opends.server.util.SetupUtils.isWebStart()) 186 { 187 Class<?> cS = Class.forName("org.opends.server.util.SetupUtils"); 188 java.net.URL[] urls = new java.net.URL[] 189 { 190 cS.getProtectionDomain().getCodeSource().getLocation() 191 }; 192 ClassLoader webstartClassLoader = new java.net.URLClassLoader(urls); 193 c = webstartClassLoader.loadClass( 194 "org.opends.server.util.ReleaseDefinition"); 195 } 196 else 197 { 198 c = Class.forName("org.opends.server.util.ReleaseDefinition"); 199 } 200 Object obj = c.newInstance(); 201 202 try { 203 PRODUCT_NAME = (String)c.getField("PRODUCT_NAME").get(obj); 204 } 205 catch (Exception ex) {} 206 try { 207 SHORT_NAME = (String)c.getField("SHORT_NAME").get(obj); 208 } 209 catch (Exception ex) {} 210 try { 211 MAJOR_VERSION = (Integer)c.getField("MAJOR_VERSION").get(obj); 212 } 213 catch (Exception ex) {} 214 try { 215 MINOR_VERSION = (Integer)c.getField("MINOR_VERSION").get(obj); 216 } 217 catch (Exception ex) {} 218 try { 219 POINT_VERSION = (Integer)c.getField("POINT_VERSION").get(obj); 220 } 221 catch (Exception ex) {} 222 try { 223 BUILD_NUMBER = (Integer)c.getField("BUILD_NUMBER").get(obj); 224 } 225 catch (Exception ex) {} 226 try { 227 VERSION_QUALIFIER = (String)c.getField("VERSION_QUALIFIER").get(obj); 228 } 229 catch (Exception ex) {} 230 try { 231 FIX_IDS = (String)c.getField("FIX_IDS").get(obj); 232 } 233 catch (Exception ex) {} 234 try{ 235 BUILD_ID = (String)c.getField("BUILD_ID").get(obj); 236 } 237 catch (Exception ex) {} 238 try{ 239 BUILD_USER = (String)c.getField("BUILD_USER").get(obj); 240 } 241 catch (Exception ex) {} 242 try{ 243 REVISION_NUMBER = (Long)c.getField("REVISION_NUMBER").get(obj); 244 } 245 catch (Exception ex) {} 246 try{ 247 BUILD_JAVA_VERSION = (String)c.getField("BUILD_JAVA_VERSION").get(obj); 248 } 249 catch (Exception ex) {} 250 try{ 251 BUILD_JAVA_VENDOR = (String)c.getField("BUILD_JAVA_VENDOR").get(obj); 252 } 253 catch (Exception ex) {} 254 try{ 255 BUILD_JVM_VERSION = (String)c.getField("BUILD_JVM_VERSION").get(obj); 256 } 257 catch (Exception ex) {} 258 try{ 259 BUILD_JVM_VENDOR = (String)c.getField("BUILD_JVM_VENDOR").get(obj); 260 } 261 catch (Exception ex) {} 262 try{ 263 BUILD_OS = (String)c.getField("BUILD_OS").get(obj); 264 } 265 catch (Exception ex) {} 266 try{ 267 DEBUG_BUILD = (Boolean)c.getField("DEBUG_BUILD").get(obj); 268 } 269 catch (Exception ex) {} 270 try{ 271 URL_REPOSITORY = (String)c.getField("URL_REPOSITORY").get(obj); 272 } 273 catch (Exception ex) {} 274 try{ 275 DOC_REFERENCE_WIKI = 276 (String)c.getField("DOC_REFERENCE_WIKI").get(obj); 277 } 278 catch(Exception ex) {} 279 try{ 280 DOC_QUICK_REFERENCE_GUIDE = 281 (String)c.getField("DOC_QUICK_REFERENCE_GUIDE").get(obj); 282 } 283 catch(Exception ex) {} 284 try{ 285 ADMINISTRATION_GUIDE_URL = 286 (String)c.getField("ADMINISTRATION_GUIDE_URL").get(obj); 287 } 288 catch(Exception ex) {} 289 try{ 290 VERSION_NUMBER_STRING = 291 (String)c.getField("VERSION_NUMBER_STRING").get(obj); 292 } 293 catch (Exception ex) {} 294 try{ 295 RELEASE_VERSION_STRING = VERSION_NUMBER_STRING 296 + " (OpenDJ version = " 297 + OPENDJ_NUMBER_STRING + ")" ; 298 } 299 catch (Exception ex) {} 300 } catch (Exception ex) { 301 } 302 } 303 /** 304 * A compact version string for this product, suitable for use in path 305 * names and similar cases. 306 */ 307 public static String COMPACT_VERSION_STRING = 308 SHORT_NAME + "-" + VERSION_NUMBER_STRING; 309 310 /** 311 * A full version string for this product. 312 */ 313 public static String FULL_VERSION_STRING = PRODUCT_NAME + " " + RELEASE_VERSION_STRING 314 + (VERSION_QUALIFIER != null && !VERSION_QUALIFIER.isEmpty() ? "-" + VERSION_QUALIFIER : "") 315 + (FIX_IDS != null && !FIX_IDS.isEmpty() ? "+" + FIX_IDS : ""); 316 317 /** 318 * A printable version string for this product. 319 */ 320 public static final String PRINTABLE_VERSION_STRING = 321 FULL_VERSION_STRING + System.getProperty("line.separator") + 322 "Build " + BUILD_ID + System.getProperty("line.separator"); 323 324}