|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.util.SetupUtils
@PublicAPI(stability=VOLATILE, mayInstantiate=false, mayExtend=false, mayInvoke=true) public class SetupUtils
This class provides a number of utility methods that may be used during the graphical or command-line setup process.
Field Summary | |
---|---|
static java.lang.String |
BUILD_ID
Build ID. |
static java.lang.String |
BUILD_JAVA_VENDOR
The java vendor of the JVM used to build. |
static java.lang.String |
BUILD_JAVA_VERSION
The java version used to generate the build. |
static java.lang.String |
BUILD_JVM_VENDOR
The vendor of the JVM used to create the build. |
static java.lang.String |
BUILD_JVM_VERSION
The version of the JVM used to create the build. |
static java.lang.String |
BUILD_NUMBER
The build number. |
static java.lang.String |
BUILD_OS
The OS used during the build. |
static java.lang.String |
BUILD_USER
The user that generated the build. |
static java.lang.String |
DEBUG_BUILD
Debug build identifier. |
static java.lang.String |
FIX_IDS
Fix IDs associated with the build. |
static java.lang.String |
INCOMPATIBILITY_EVENTS
Incompatibilities found between builds (used by the upgrade tool). |
static java.lang.String |
IS_WEBSTART
Java property used to known if we are using web start or not. |
static java.lang.String |
LAZY_JAR_URLS
Java property used to know which are the jar files that must be downloaded lazily. |
static java.lang.String |
LIBRARIES_PATH_RELATIVE
The relative path where all the libraries (jar files) are. |
static java.lang.String |
MAJOR_VERSION
Major version. |
static java.lang.String |
MINOR_VERSION
Minor version. |
static java.lang.String |
NAME
Product name. |
static java.lang.String |
OPENDS_JAVA_HOME
Specific environment variable used by the scripts to find java. |
static java.lang.String |
POINT_VERSION
Point version of the product. |
static java.lang.String |
REVISION_NUMBER
Revision number in SVN. |
static java.lang.String |
VERSION_QUALIFIER
The version qualifier. |
static java.lang.String |
ZIP_FILE_NAME
Java property used to know which is the name of the zip file that must be unzipped and whose contents must be extracted during the Web Start based setup. |
Constructor Summary | |
---|---|
SetupUtils()
|
Method Summary | |
---|---|
static boolean |
canUseAsPort(int port)
Returns true if the provided port is free and we can use it,
false otherwise. |
static boolean |
canUseAsPort(java.lang.String hostname,
int port)
Returns true if the provided port is free and we can use it,
false otherwise. |
static java.io.File |
createTemplateFile(java.lang.String baseDN,
int numEntries)
Creates a MakeLDIF template file using the provided information. |
static int |
getDefaultJMXPort()
Returns the default value for the JMX Port. |
static OperatingSystem |
getOperatingSystem()
Commodity method to help identifying the OS we are running on. |
static java.lang.String |
getOSString()
Returns a String representation of the OS we are running. |
static java.lang.String |
getScriptPath(java.lang.String script)
Returns the String that can be used to launch an script using Runtime.exec. |
static boolean |
isMacOS()
Returns true if we are running under Mac OS and
false otherwise. |
static boolean |
isPriviledgedPort(int port)
Returns true if the provided port is a priviledged port,
false otherwise. |
static boolean |
isUnix()
Returns true if we are running under Unix and
false otherwise. |
static boolean |
isVista()
Indicates whether the underlying operating system is Windows Vista. |
static boolean |
isWebStart()
Indicates whether we are in a web start installation or not. |
static boolean |
isWindows()
Indicates whether the underlying operating system is a Windows variant. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String IS_WEBSTART
public static final java.lang.String OPENDS_JAVA_HOME
public static final java.lang.String LAZY_JAR_URLS
public static final java.lang.String ZIP_FILE_NAME
public static final java.lang.String LIBRARIES_PATH_RELATIVE
public static final java.lang.String NAME
public static final java.lang.String BUILD_ID
public static final java.lang.String MAJOR_VERSION
public static final java.lang.String MINOR_VERSION
public static final java.lang.String POINT_VERSION
public static final java.lang.String REVISION_NUMBER
public static final java.lang.String VERSION_QUALIFIER
public static final java.lang.String INCOMPATIBILITY_EVENTS
public static final java.lang.String FIX_IDS
public static final java.lang.String DEBUG_BUILD
public static final java.lang.String BUILD_OS
public static final java.lang.String BUILD_USER
public static final java.lang.String BUILD_JAVA_VERSION
public static final java.lang.String BUILD_JAVA_VENDOR
public static final java.lang.String BUILD_JVM_VERSION
public static final java.lang.String BUILD_JVM_VENDOR
public static final java.lang.String BUILD_NUMBER
Constructor Detail |
---|
public SetupUtils()
Method Detail |
---|
public static java.io.File createTemplateFile(java.lang.String baseDN, int numEntries) throws java.io.IOException
baseDN
- The base DN for the data in the template file.numEntries
- The number of user entries the template file should
create.
File
object that references the created template file.
java.io.IOException
- If a problem occurs while writing the template file.public static boolean isMacOS()
true
if we are running under Mac OS and
false
otherwise.
true
if we are running under Mac OS and
false
otherwise.public static boolean isUnix()
true
if we are running under Unix and
false
otherwise.
true
if we are running under Unix and
false
otherwise.public static boolean isWindows()
true
if the underlying operating system is a Windows
variant, or false
if not.public static boolean isVista()
true
if the underlying operating system is Windows
Vista, or false
if not.public static java.lang.String getOSString()
public static OperatingSystem getOperatingSystem()
public static boolean canUseAsPort(java.lang.String hostname, int port)
true
if the provided port is free and we can use it,
false
otherwise.
hostname
- the host name we are analyzing.port
- the port we are analyzing.
true
if the provided port is free and we can use it,
false
otherwise.public static boolean canUseAsPort(int port)
true
if the provided port is free and we can use it,
false
otherwise.
port
- the port we are analyzing.
true
if the provided port is free and we can use it,
false
otherwise.public static boolean isPriviledgedPort(int port)
true
if the provided port is a priviledged port,
false
otherwise.
port
- the port we are analyzing.
true
if the provided port is a priviledged port,
false
otherwise.public static int getDefaultJMXPort()
public static boolean isWebStart()
true
if we are in a web start installation and
false
if not.public static java.lang.String getScriptPath(java.lang.String script)
script
- the script name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |