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 2006-2009 Sun Microsystems, Inc. 015 * Portions Copyright 2011-2016 ForgeRock AS. 016 */ 017package org.opends.server.util; 018 019/** 020 * This file contains a number of constants that are used throughout the 021 * Directory Server source. It was dynamically generated as part of the 022 * Directory Server build process and should not be edited directly. 023 */ 024@org.opends.server.types.PublicAPI( 025 stability=org.opends.server.types.StabilityLevel.UNCOMMITTED, 026 mayInstantiate=false, 027 mayExtend=false, 028 mayInvoke=true) 029public final class DynamicConstants 030{ 031 /** The official full product name for the Directory Server. */ 032 public static String PRODUCT_NAME = "OpenDJ Server"; 033 /** The short product name for the Directory Server. */ 034 public static String SHORT_NAME = "OpenDJ"; 035 036 /** The major version number for the Directory Server. */ 037 public static int MAJOR_VERSION = 3; 038 /** The minor version number for the Directory Server. */ 039 public static int MINOR_VERSION = 5; 040 041 /** The point version number for the Directory Server. */ 042 public static int POINT_VERSION = 3; 043 044 /** The official build number for the Directory Server. s*/ 045 public static int BUILD_NUMBER = 0; 046 047 /** The version qualifier string for the Directory Server. */ 048 public static String VERSION_QUALIFIER = ""; 049 050 /** The set of bug IDs for fixes included in this build of the Directory Server. */ 051 public static String FIX_IDS = ""; 052 053 /** The build ID for the generated build of the Directory Server. */ 054 public static String BUILD_ID = "20171030133016"; 055 /** The username of the user that created this build. */ 056 public static String BUILD_USER = "root"; 057 /** The Java version used to generate this build. */ 058 public static String BUILD_JAVA_VERSION = "1.7.0_79"; 059 /** The vendor for the Java version used to generate this build. */ 060 public static String BUILD_JAVA_VENDOR = "Oracle Corporation"; 061 /** The JVM version used to generate this build. */ 062 public static String BUILD_JVM_VERSION = "24.79-b02"; 063 /** The vendor for the JVM used to generate this build. */ 064 public static String BUILD_JVM_VENDOR = "Oracle Corporation"; 065 /** The operating system on which this build was generated. */ 066 public static String BUILD_OS = "Linux 4.11.6-coreos amd64"; 067 068 /** 069 * Indicates whether this is a debug build of the Directory Server that may 070 * include additional debugging facilities not available in standard release 071 * versions. 072 */ 073 public static boolean DEBUG_BUILD = false; 074 075 /** The revision on which this build is based. */ 076 public static String REVISION = "7552a73246985a6cbedd23c6a67f7bd222904577"; 077 078 /** The version control url repository location on which this build is based. */ 079 public static String URL_REPOSITORY = "https://stash.forgerock.org/projects/OPENDJ/repos/opendj-sustaining/browse/opendj-server-legacy"; 080 /** The documentation home. */ 081 public static String DOC_REFERENCE_HOME = "https://backstage.forgerock.com/#!/docs/opendj"; 082 /** The documentation url. */ 083 public static String DOC_REFERENCE_WIKI = "https://backstage.forgerock.com/#!/docs/opendj"; 084 /** The documentation url. */ 085 public static String DOC_QUICK_REFERENCE_GUIDE = "https://backstage.forgerock.com/#!/docs/opendj/3.5/admin-guide"; 086 087 /** The administration guide. */ 088 public static String ADMINISTRATION_GUIDE_URL = "https://backstage.forgerock.com/#!/docs/opendj/3.5/admin-guide"; 089 090 /** A string representation of the version number. */ 091 public static String VERSION_NUMBER_STRING = String.format("%s.%s.%s", MAJOR_VERSION, MINOR_VERSION, POINT_VERSION); 092 /** A string representation of the version number. */ 093 public static String OPENDJ_NUMBER_STRING = VERSION_NUMBER_STRING; 094 /** A string representation of the release version. */ 095 public static String RELEASE_VERSION_STRING = OPENDJ_NUMBER_STRING; 096 097 098 /** 099 * Test if a specific class is provided to overwrite the BUILD definitions 100 * By the release definitions provided by 101 * org.opends.server.util.ReleaseDefinition 102 */ 103 104 static { 105 try { 106 Class<?> c = Class.forName("org.opends.server.util.ReleaseDefinition"); 107 Object obj = c.newInstance(); 108 109 try { 110 PRODUCT_NAME = (String)c.getField("PRODUCT_NAME").get(obj); 111 } 112 catch (Exception ex) {} 113 try { 114 SHORT_NAME = (String)c.getField("SHORT_NAME").get(obj); 115 } 116 catch (Exception ex) {} 117 try { 118 MAJOR_VERSION = (Integer)c.getField("MAJOR_VERSION").get(obj); 119 } 120 catch (Exception ex) {} 121 try { 122 MINOR_VERSION = (Integer)c.getField("MINOR_VERSION").get(obj); 123 } 124 catch (Exception ex) {} 125 try { 126 POINT_VERSION = (Integer)c.getField("POINT_VERSION").get(obj); 127 } 128 catch (Exception ex) {} 129 try { 130 BUILD_NUMBER = (Integer)c.getField("BUILD_NUMBER").get(obj); 131 } 132 catch (Exception ex) {} 133 try { 134 VERSION_QUALIFIER = (String)c.getField("VERSION_QUALIFIER").get(obj); 135 } 136 catch (Exception ex) {} 137 try { 138 FIX_IDS = (String)c.getField("FIX_IDS").get(obj); 139 } 140 catch (Exception ex) {} 141 try{ 142 BUILD_ID = (String)c.getField("BUILD_ID").get(obj); 143 } 144 catch (Exception ex) {} 145 try{ 146 BUILD_USER = (String)c.getField("BUILD_USER").get(obj); 147 } 148 catch (Exception ex) {} 149 try{ 150 REVISION = (String)c.getField("REVISION_NUMBER").get(obj); 151 } 152 catch (Exception ex) {} 153 try{ 154 BUILD_JAVA_VERSION = (String)c.getField("BUILD_JAVA_VERSION").get(obj); 155 } 156 catch (Exception ex) {} 157 try{ 158 BUILD_JAVA_VENDOR = (String)c.getField("BUILD_JAVA_VENDOR").get(obj); 159 } 160 catch (Exception ex) {} 161 try{ 162 BUILD_JVM_VERSION = (String)c.getField("BUILD_JVM_VERSION").get(obj); 163 } 164 catch (Exception ex) {} 165 try{ 166 BUILD_JVM_VENDOR = (String)c.getField("BUILD_JVM_VENDOR").get(obj); 167 } 168 catch (Exception ex) {} 169 try{ 170 BUILD_OS = (String)c.getField("BUILD_OS").get(obj); 171 } 172 catch (Exception ex) {} 173 try{ 174 DEBUG_BUILD = (Boolean)c.getField("DEBUG_BUILD").get(obj); 175 } 176 catch (Exception ex) {} 177 try{ 178 URL_REPOSITORY = (String)c.getField("URL_REPOSITORY").get(obj); 179 } 180 catch (Exception ex) {} 181 try{ 182 DOC_REFERENCE_WIKI = 183 (String)c.getField("DOC_REFERENCE_WIKI").get(obj); 184 } 185 catch(Exception ex) {} 186 try{ 187 DOC_QUICK_REFERENCE_GUIDE = 188 (String)c.getField("DOC_QUICK_REFERENCE_GUIDE").get(obj); 189 } 190 catch(Exception ex) {} 191 try{ 192 ADMINISTRATION_GUIDE_URL = 193 (String)c.getField("ADMINISTRATION_GUIDE_URL").get(obj); 194 } 195 catch(Exception ex) {} 196 try{ 197 VERSION_NUMBER_STRING = 198 (String)c.getField("VERSION_NUMBER_STRING").get(obj); 199 } 200 catch (Exception ex) {} 201 try{ 202 RELEASE_VERSION_STRING = VERSION_NUMBER_STRING 203 + " (OpenDJ version = " 204 + OPENDJ_NUMBER_STRING + ")" ; 205 } 206 catch (Exception ex) {} 207 } catch (Exception ex) {} 208 } 209 210 /** A compact version string for this product, suitable for use in path names and similar cases. */ 211 public static String COMPACT_VERSION_STRING = 212 SHORT_NAME + "-" + VERSION_NUMBER_STRING; 213 214 /** A full version string for this product. */ 215 public static String FULL_VERSION_STRING = PRODUCT_NAME + " " + RELEASE_VERSION_STRING 216 + (VERSION_QUALIFIER != null && !VERSION_QUALIFIER.isEmpty() ? "-" + VERSION_QUALIFIER : "") 217 + (FIX_IDS != null && !FIX_IDS.isEmpty() ? "+" + FIX_IDS : ""); 218 219 /** A printable version string for this product. */ 220 public static final String PRINTABLE_VERSION_STRING = 221 FULL_VERSION_STRING + System.getProperty("line.separator") + 222 "Build " + BUILD_ID + System.getProperty("line.separator"); 223}